Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 324436 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rwt/internal/theme/QxColor.java (-17 / +87 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2007, 2011 Innoopract Informationssysteme GmbH.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     Innoopract Informationssysteme GmbH - initial API and implementation
9
 *     Innoopract Informationssysteme GmbH - initial API and implementation
10
 *     EclipseSource - ongoing development
10
 ******************************************************************************/
11
 ******************************************************************************/
11
12
12
package org.eclipse.rwt.internal.theme;
13
package org.eclipse.rwt.internal.theme;
Lines 24-32 Link Here
24
25
25
  private static final Map NAMED_COLORS = new HashMap();
26
  private static final Map NAMED_COLORS = new HashMap();
26
27
27
  public static final QxColor BLACK = new QxColor( 0, 0, 0 );
28
  public static final QxColor BLACK = new QxColor( 0, 0, 0, 1f );
28
29
29
  public static final QxColor WHITE = new QxColor( 255, 255, 255 );
30
  public static final QxColor WHITE = new QxColor( 255, 255, 255, 1f );
30
31
31
  public static final QxColor TRANSPARENT = new QxColor();
32
  public static final QxColor TRANSPARENT = new QxColor();
32
33
Lines 35-42 Link Here
35
  public final int green;
36
  public final int green;
36
37
37
  public final int blue;
38
  public final int blue;
38
39
  
39
  public final boolean transparent;
40
  public final float alpha;
40
41
41
  static {
42
  static {
42
    // register 16 standard HTML colors
43
    // register 16 standard HTML colors
Lines 62-75 Link Here
62
    this.red = 0;
63
    this.red = 0;
63
    this.green = 0;
64
    this.green = 0;
64
    this.blue = 0;
65
    this.blue = 0;
65
    this.transparent = true;
66
    this.alpha = 0f;
66
  }
67
  }
67
68
68
  private QxColor( final int red, final int green, final int blue ) {
69
  private QxColor( final int red,
70
                   final int green,
71
                   final int blue,
72
                   final float alpha )
73
  {
69
    this.red = red;
74
    this.red = red;
70
    this.green = green;
75
    this.green = green;
71
    this.blue = blue;
76
    this.blue = blue;
72
    this.transparent = false;
77
    this.alpha = alpha;
73
  }
78
  }
74
79
75
  public static QxColor create( final int red, final int green, final int blue )
80
  public static QxColor create( final int red, final int green, final int blue )
Lines 80-89 Link Here
80
    } else if( red == 255 && green == 255 && blue == 255 ) {
85
    } else if( red == 255 && green == 255 && blue == 255 ) {
81
      result = WHITE;
86
      result = WHITE;
82
    } else {
87
    } else {
83
      result = new QxColor( red, green, blue );
88
      result = new QxColor( red, green, blue, 1f );
84
    }
89
    }
85
    return result;
90
    return result;
86
  }
91
  }
92
  
93
  public static QxColor create( final int red,
94
                                final int green,
95
                                final int blue,
96
                                final float alpha )
97
  {
98
    checkAlpha( alpha );
99
    QxColor result;
100
    if( alpha == 1f ) {
101
      result = create( red, green, blue );
102
    } else {
103
      result = new QxColor( red, green, blue, alpha );
104
    }
105
    return result;
106
  }
107
108
  private static void checkAlpha( final float alpha ) {
109
    if( alpha < 0 || alpha > 1 ) {
110
      String msg = "Alpha out of range [ 0, 1 ]: " + alpha;
111
      throw new IllegalArgumentException( msg );
112
    }
113
  }
87
114
88
  public static QxColor valueOf( final String input ) {
115
  public static QxColor valueOf( final String input ) {
89
    QxColor result;
116
    QxColor result;
Lines 94-99 Link Here
94
      result = TRANSPARENT;
121
      result = TRANSPARENT;
95
    } else {
122
    } else {
96
      int red, green, blue;
123
      int red, green, blue;
124
      float alpha = 1f;
97
      String lowerCaseInput = input.toLowerCase( Locale.ENGLISH );
125
      String lowerCaseInput = input.toLowerCase( Locale.ENGLISH );
98
      if( input.startsWith( "#" ) ) {
126
      if( input.startsWith( "#" ) ) {
99
        try {
127
        try {
Lines 124-134 Link Here
124
        blue = values[ 2 ];
152
        blue = values[ 2 ];
125
      } else {
153
      } else {
126
        String[] parts = input.split( "\\s*,\\s*" );
154
        String[] parts = input.split( "\\s*,\\s*" );
127
        if( parts.length == 3 ) {
155
        if( parts.length >= 3 && parts.length <= 4 ) {
128
          try {
156
          try {
129
            red = Integer.parseInt( parts[ 0 ] );
157
            red = Integer.parseInt( parts[ 0 ] );
130
            green = Integer.parseInt( parts[ 1 ] );
158
            green = Integer.parseInt( parts[ 1 ] );
131
            blue = Integer.parseInt( parts[ 2 ] );
159
            blue = Integer.parseInt( parts[ 2 ] );
160
            if( parts.length == 4 ) {
161
              alpha = Float.parseFloat( parts[ 3 ] );
162
            }
132
          } catch( final NumberFormatException e ) {
163
          } catch( final NumberFormatException e ) {
133
            String pattern = "Illegal number format in color definition ''{0}''";
164
            String pattern = "Illegal number format in color definition ''{0}''";
134
            Object[] arguments = new Object[] { input };
165
            Object[] arguments = new Object[] { input };
Lines 142-154 Link Here
142
          throw new IllegalArgumentException( message );
173
          throw new IllegalArgumentException( message );
143
        }
174
        }
144
      }
175
      }
145
      result = create( red, green, blue );
176
      result = create( red, green, blue, alpha );
146
    }
177
    }
147
    return result;
178
    return result;
148
  }
179
  }
149
180
181
  public boolean isTransparent() {
182
    return alpha == 0f;
183
  }
184
150
  public String toDefaultString() {
185
  public String toDefaultString() {
151
    return transparent ? TRANSPARENT_STR : toHtmlString( red, green, blue );
186
    String result;
187
    if( isTransparent() ) {
188
      result = TRANSPARENT_STR;
189
    } else if( alpha == 1f ) {
190
      result = toHtmlString( red, green, blue );
191
    } else {
192
      result = toRgbaString( red, green, blue, alpha );
193
    }
194
    return result;
152
  }
195
  }
153
196
154
  public boolean equals( final Object obj ) {
197
  public boolean equals( final Object obj ) {
Lines 159-176 Link Here
159
      QxColor other = ( QxColor )obj;
202
      QxColor other = ( QxColor )obj;
160
      result =  other.red == red
203
      result =  other.red == red
161
             && other.green == green
204
             && other.green == green
162
             && other.blue == blue;
205
             && other.blue == blue
206
             && other.alpha == alpha;
163
    }
207
    }
164
    return result;
208
    return result;
165
  }
209
  }
166
210
167
  public int hashCode() {
211
  public int hashCode() {
168
    return transparent ? -1 : red + green * 256 + blue * 65536;
212
    int result = -1;
213
    if( !isTransparent() ) {
214
      result = 41;
215
      result += 19 * result + red;
216
      result += 19 * result + green;
217
      result += 19 * result + blue;
218
      result += 19 * result + Float.floatToIntBits( alpha );
219
    }
220
    return result;
169
  }
221
  }
170
222
171
  public String toString() {
223
  public String toString() {
172
    String colors = red + ", " + green + ", " + blue;
224
    String colors = red + ", " + green + ", " + blue + ", " + alpha;
173
    return "QxColor{ " + ( transparent ? TRANSPARENT_STR : colors ) + " }";
225
    return "QxColor{ " + ( isTransparent() ? TRANSPARENT_STR : colors ) + " }";
174
  }
226
  }
175
227
176
  public static String toHtmlString( final int red,
228
  public static String toHtmlString( final int red,
Lines 187-193 Link Here
187
239
188
  public static Color createColor( final QxColor color ) {
240
  public static Color createColor( final QxColor color ) {
189
    Color result = null;
241
    Color result = null;
190
    if( !color.transparent ) {
242
    if( color.alpha == 1f ) {
191
      result = Graphics.getColor( color.red, color.green, color.blue );
243
      result = Graphics.getColor( color.red, color.green, color.blue );
192
    }
244
    }
193
    return result;
245
    return result;
Lines 197-200 Link Here
197
    String hex = Integer.toHexString( value );
249
    String hex = Integer.toHexString( value );
198
    return hex.length() == 1 ? "0" + hex : hex;
250
    return hex.length() == 1 ? "0" + hex : hex;
199
  }
251
  }
252
253
  private static String toRgbaString( final int red,
254
                                      final int green,
255
                                      final int blue,
256
                                      final float alpha )
257
  {
258
    StringBuffer sb = new StringBuffer();
259
    sb.append( "rgba(" );
260
    sb.append( red );
261
    sb.append( "," );
262
    sb.append( green );
263
    sb.append( "," );
264
    sb.append( blue );
265
    sb.append( "," );
266
    sb.append( alpha );
267
    sb.append( ")" );
268
    return sb.toString();
269
  }
200
}
270
}
(-)src/org/eclipse/rwt/internal/theme/QxShadow.java (+158 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 EclipseSource and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution, 
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
6
 *
7
 * Contributors:
8
 *   EclipseSource - initial API and implementation
9
 ******************************************************************************/
10
package org.eclipse.rwt.internal.theme;
11
12
13
public class QxShadow implements QxType {
14
  
15
  public static final QxShadow NONE
16
    = new QxShadow( false, 0 , 0, 0, 0, null, 0 );
17
  
18
  public final boolean inset;
19
  public final int offsetX;
20
  public final int offsetY;
21
  public final int blur;
22
  public final int spread;
23
  public final String color;
24
  public final float opacity;
25
  
26
  private QxShadow( final boolean inset,
27
                    final int offsetX,
28
                    final int offsetY,
29
                    final int blur,
30
                    final int spread,
31
                    final String color,
32
                    final float opacity )
33
  {
34
    this.inset = inset;
35
    this.offsetX = offsetX;
36
    this.offsetY = offsetY;
37
    this.blur = blur;
38
    this.spread = spread;
39
    this.color = color;
40
    this.opacity = opacity;
41
  }
42
  
43
  public static QxShadow create( final boolean inset,
44
                                 final int offsetX,
45
                                 final int offsetY,
46
                                 final int blur,
47
                                 final int spread,
48
                                 final QxColor color )
49
  {
50
    String msg;
51
    if( inset ) {
52
      msg = "Shadow \"inset\" keyword is not supported";
53
      throw new IllegalArgumentException( msg );
54
    }
55
    if( blur < 0 ) {
56
      msg = "Shadow blur distance can't be negative";
57
      throw new IllegalArgumentException( msg );
58
    }
59
    if( spread != 0 ) {
60
      msg = "Shadow spread distance is not supported";
61
      throw new IllegalArgumentException( msg );
62
    }
63
    if( color == null ) {
64
      throw new NullPointerException( "null argument" );
65
    }
66
    String htmlColor = QxColor.toHtmlString( color.red,
67
                                             color.green,
68
                                             color.blue );
69
    return new QxShadow( inset,
70
                         offsetX,
71
                         offsetY,
72
                         blur,
73
                         spread,
74
                         htmlColor,
75
                         color.alpha );
76
  }
77
78
  public boolean equals( final Object obj ) {
79
    boolean result = false;
80
    if( obj == this ) {
81
      result = true;
82
    } else if( obj instanceof QxShadow ) {
83
      QxShadow other = ( QxShadow )obj;
84
      result =  other.inset == inset
85
             && other.offsetX == offsetX
86
             && other.offsetY == offsetY
87
             && other.blur == blur
88
             && other.spread == spread
89
             && ( color == null
90
                  ? other.color == null
91
                  : color.equals( other.color ) )
92
             && other.opacity == opacity;
93
    }
94
    return result;
95
  }
96
  
97
  public int hashCode() {
98
    int result = 17;
99
    result += 11 * result + offsetX;
100
    result += 11 * result + offsetY;
101
    result += 11 * result + blur;
102
    result += 11 * result + spread;
103
    if( color != null ) {
104
      result += 11 * result + color.hashCode();
105
    }
106
    result += 11 * result + Float.floatToIntBits( opacity );
107
    result += inset ? 0 : 11 * result + 13;
108
    return result;
109
  }
110
111
  public String toDefaultString() {
112
    StringBuffer buffer = new StringBuffer();
113
    if( color == null ) {
114
      buffer.append( "none" );
115
    } else {
116
      if( inset ) {
117
        buffer.append( "inset " );
118
      }
119
      buffer.append( offsetX );
120
      buffer.append( "px " );
121
      buffer.append( offsetY );
122
      buffer.append( "px " );
123
      buffer.append( blur );
124
      buffer.append( "px " );
125
      buffer.append( spread );
126
      buffer.append( "px " );
127
      buffer.append( "rgba( " );
128
      QxColor qxColor = QxColor.valueOf( color );
129
      buffer.append( qxColor.red );
130
      buffer.append( ", " );
131
      buffer.append( qxColor.green );
132
      buffer.append( ", " );
133
      buffer.append( qxColor.blue );
134
      buffer.append( ", " );
135
      buffer.append( opacity );
136
      buffer.append( " )" );
137
    }
138
    return buffer.toString();
139
  }
140
  
141
  public String toString() {
142
    StringBuffer buffer = new StringBuffer();
143
    buffer.append( inset );
144
    buffer.append( ", " );
145
    buffer.append( offsetX );
146
    buffer.append( ", " );
147
    buffer.append( offsetY );
148
    buffer.append( ", " );
149
    buffer.append( blur );
150
    buffer.append( ", " );
151
    buffer.append( spread );
152
    buffer.append( ", " );    
153
    buffer.append( color );
154
    buffer.append( ", " );
155
    buffer.append( opacity );
156
    return "QxShadow{ " + buffer.toString() + " }";
157
  }
158
}
(-)src/org/eclipse/rwt/internal/theme/ThemeStoreWriter.java (-2 / +19 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved.
2
 * Copyright (c) 2009, 2011 EclipseSource and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the
3
 * This program and the accompanying materials are made available under the
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
Lines 54-59 Link Here
54
    JsonObject borderMap = new JsonObject();
54
    JsonObject borderMap = new JsonObject();
55
    JsonObject cursorMap = new JsonObject();
55
    JsonObject cursorMap = new JsonObject();
56
    JsonObject animationMap = new JsonObject();
56
    JsonObject animationMap = new JsonObject();
57
    JsonObject shadowMap = new JsonObject();
57
    QxType[] values = new QxType[ valueSet.size() ];
58
    QxType[] values = new QxType[ valueSet.size() ];
58
    valueSet.toArray( values );
59
    valueSet.toArray( values );
59
    for( int i = 0; i < values.length; i++ ) {
60
    for( int i = 0; i < values.length; i++ ) {
Lines 94-100 Link Here
94
        }
95
        }
95
      } else if( value instanceof QxColor ) {
96
      } else if( value instanceof QxColor ) {
96
        QxColor color = ( QxColor )value;
97
        QxColor color = ( QxColor )value;
97
        if( color.transparent ) {
98
        if( color.isTransparent() ) {
98
          colorMap.append( key, "undefined" );
99
          colorMap.append( key, "undefined" );
99
        } else {
100
        } else {
100
          colorMap.append( key, QxColor.toHtmlString( color.red,
101
          colorMap.append( key, QxColor.toHtmlString( color.red,
Lines 137-142 Link Here
137
                                  currentAnimationArray );
138
                                  currentAnimationArray );
138
        }
139
        }
139
        animationMap.append( key, animationObject );
140
        animationMap.append( key, animationObject );
141
      } else if( value instanceof QxShadow ) {
142
        QxShadow shadow = ( QxShadow )value;        
143
        if( shadow.equals( QxShadow.NONE ) ) {
144
          shadowMap.append( key, JsonValue.NULL );
145
        } else {
146
          JsonArray shadowArray = new JsonArray();
147
          shadowArray.append( shadow.inset );
148
          shadowArray.append( shadow.offsetX );
149
          shadowArray.append( shadow.offsetY );
150
          shadowArray.append( shadow.blur );
151
          shadowArray.append( shadow.spread );
152
          shadowArray.append( shadow.color );
153
          shadowArray.append( shadow.opacity );
154
          shadowMap.append( key, shadowArray );
155
        }
140
      }
156
      }
141
    }
157
    }
142
    JsonObject valuesMap = new JsonObject();
158
    JsonObject valuesMap = new JsonObject();
Lines 149-154 Link Here
149
    valuesMap.append( "borders", borderMap );
165
    valuesMap.append( "borders", borderMap );
150
    valuesMap.append( "cursors", cursorMap );
166
    valuesMap.append( "cursors", cursorMap );
151
    valuesMap.append( "animations", animationMap );
167
    valuesMap.append( "animations", animationMap );
168
    valuesMap.append( "shadows", shadowMap );
152
    return valuesMap;
169
    return valuesMap;
153
  }
170
  }
154
171
(-)src/org/eclipse/rwt/internal/theme/css/PropertyResolver.java (-1 / +137 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2010 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2008, 2011 Innoopract Informationssysteme GmbH.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 119-124 Link Here
119
      result = readFloat( unit );
119
      result = readFloat( unit );
120
    } else if( isAnimationProperty( name ) ) {
120
    } else if( isAnimationProperty( name ) ) {
121
      result = readAnimation( unit );
121
      result = readAnimation( unit );
122
    } else if( isShadowProperty( name ) ) {
123
      result = readShadow( unit );
122
    } else {
124
    } else {
123
      throw new IllegalArgumentException( "Unknown property " + name );
125
      throw new IllegalArgumentException( "Unknown property " + name );
124
    }
126
    }
Lines 183-188 Link Here
183
    return result;
185
    return result;
184
  }
186
  }
185
187
188
  static QxColor readColorWithAlpha( final LexicalUnit unit ) {
189
    QxColor result = null;
190
    int[] values = new int[ 3 ];
191
    float alpha = 1f;
192
    short type = unit.getLexicalUnitType();
193
    if(    type == LexicalUnit.SAC_FUNCTION
194
        && "rgba".equals( unit.getFunctionName() )  )
195
    {
196
      LexicalUnit nextUnit = unit.getParameters();
197
      boolean ok = nextUnit != null;
198
      boolean mixedTypes = false;
199
      short previousType = -1;
200
      int pos = 0;
201
      while( ok ) {
202
        type = nextUnit.getLexicalUnitType();
203
        if( pos == 0 || pos == 2 || pos == 4 ) {
204
          // color number
205
          if( type == LexicalUnit.SAC_INTEGER ) {
206
            values[ pos / 2 ] = normalizeRGBValue( nextUnit.getIntegerValue() );
207
          } else if( type == LexicalUnit.SAC_PERCENTAGE ) {
208
            float percentValue
209
              = normalizePercentValue( nextUnit.getFloatValue() );
210
            values[ pos / 2 ] = ( int )( 255 * percentValue / 100 );
211
          } else {
212
            ok = false;
213
          }
214
          mixedTypes = previousType != -1 && previousType != type;
215
          previousType = type;
216
        } else if( pos == 1 || pos == 3 || pos == 5 ) {
217
          // comma
218
          if( type != LexicalUnit.SAC_OPERATOR_COMMA ) {
219
            ok = false;
220
          }
221
        } else if( pos == 6 ) {
222
          // alpha number
223
          if( type == LexicalUnit.SAC_REAL ) {
224
            alpha = normalizeAlphaValue( nextUnit.getFloatValue() );
225
          } else {
226
            ok = false;
227
          }
228
        }
229
        pos++;
230
        nextUnit = nextUnit.getNextLexicalUnit();
231
        ok &= nextUnit != null && pos < 7 && !mixedTypes;
232
      }
233
      if( pos == 7 ) {
234
        result = QxColor.create( values[ 0 ], values[ 1 ], values[ 2 ], alpha );
235
      }
236
    }
237
    if( result == null ) {
238
      throw new IllegalArgumentException( "Failed to parse rgba color" );
239
    }
240
    return result;
241
  }
242
186
  static boolean isDimensionProperty( final String property ) {
243
  static boolean isDimensionProperty( final String property ) {
187
    return    "spacing".equals( property )
244
    return    "spacing".equals( property )
188
           || "width".equals( property )
245
           || "width".equals( property )
Lines 771-776 Link Here
771
    return result;
828
    return result;
772
  }
829
  }
773
830
831
  static boolean isShadowProperty( final String property ) {
832
    return "box-shadow".equals( property );
833
  }
834
835
  static QxShadow readShadow( final LexicalUnit unit ) {
836
    QxShadow result = null;
837
    boolean inset = false;
838
    Integer offsetX = null;
839
    Integer offsetY = null;
840
    int blur = 0;
841
    int spread = 0;
842
    QxColor color = QxColor.BLACK;
843
    LexicalUnit nextUnit = unit;
844
    short type = nextUnit.getLexicalUnitType();
845
    if( type == LexicalUnit.SAC_IDENT ) {
846
      String value = nextUnit.getStringValue();
847
      if( NONE.equals( value ) ) {
848
        result = QxShadow.NONE;
849
      } else if( INSET.equals( value ) ) {
850
        inset = true;
851
      }
852
      nextUnit = nextUnit.getNextLexicalUnit();
853
    }
854
    if( result == null ) {
855
      boolean ok = true;
856
      int pos = 0;
857
      while( nextUnit != null && ok ) {
858
        pos++;
859
        Integer nextValue = readSingleLengthUnit( nextUnit );
860
        ok &= nextValue != null && pos <= 4; 
861
        if( ok ) {
862
          if( pos == 1 ) {
863
            offsetX = nextValue;
864
          } else if( pos == 2 ) {
865
            offsetY = nextValue;
866
          } else if( pos == 3 ) {
867
            blur = nextValue.intValue();
868
          } else if( pos == 4 ) {
869
            spread = nextValue.intValue();
870
          }
871
          nextUnit = nextUnit.getNextLexicalUnit();
872
        }
873
      }
874
      if( nextUnit != null ) {
875
        type = nextUnit.getLexicalUnitType();
876
        if(    type == LexicalUnit.SAC_FUNCTION
877
            && "rgba".equals( nextUnit.getFunctionName() )  )
878
        {
879
          color = readColorWithAlpha( nextUnit );
880
        } else {
881
          color = readColor( nextUnit );
882
        }
883
      }
884
    }
885
    if( offsetX != null && offsetY != null ) {
886
      result = QxShadow.create( inset,
887
                                offsetX.intValue(),
888
                                offsetY.intValue(),
889
                                blur,
890
                                spread,
891
                                color );
892
    }
893
    if( result == null ) {
894
      throw new IllegalArgumentException( "Failed to parse shadow "
895
                                          + toString( unit ) );
896
    }
897
    return result;
898
  }
899
774
  private static Integer readSingleLengthUnit( final LexicalUnit unit ) {
900
  private static Integer readSingleLengthUnit( final LexicalUnit unit ) {
775
    Integer result = null;
901
    Integer result = null;
776
    short type = unit.getLexicalUnitType();
902
    short type = unit.getLexicalUnitType();
Lines 795-800 Link Here
795
    return result;
921
    return result;
796
  }
922
  }
797
923
924
  private static float normalizeAlphaValue( final float input ) {
925
    float result = input;
926
    if( input < 0 ) {
927
      result = 0f;
928
    } else if( input > 1 ) {
929
      result = 1f;
930
    }
931
    return result;
932
  }
933
798
  private static float normalizePercentValue( final float input ) {
934
  private static float normalizePercentValue( final float input ) {
799
    float result = input;
935
    float result = input;
800
    if( input < 0f ) {
936
    if( input < 0f ) {
(-)src/org/eclipse/swt/internal/widgets/shellkit/Shell.default.css (+4 lines)
Lines 18-26 Link Here
18
  padding: 0px;
18
  padding: 0px;
19
  background-image: none;
19
  background-image: none;
20
  opacity: 1;
20
  opacity: 1;
21
  box-shadow: none;
21
}
22
}
22
23
23
Shell[TITLE], Shell[BORDER] {
24
Shell[TITLE], Shell[BORDER] {
25
  box-shadow: 5px 5px 3px rgba( 0, 0, 0, 0.5 );
24
  background-color: white;
26
  background-color: white;
25
  border: 2px solid #005092;
27
  border: 2px solid #005092;
26
  border-radius: 5px 5px 0px 0px;
28
  border-radius: 5px 5px 0px 0px;
Lines 29-38 Link Here
29
31
30
Shell[BORDER]:inactive, Shell[TITLE]:inactive {
32
Shell[BORDER]:inactive, Shell[TITLE]:inactive {
31
  border: 2px solid #4b4b4b;
33
  border: 2px solid #4b4b4b;
34
  box-shadow: none;
32
}
35
}
33
36
34
Shell:maximized, Shell:maximized:inactive {
37
Shell:maximized, Shell:maximized:inactive {
35
  border: none;
38
  border: none;
39
  box-shadow: none;
36
  border-radius: 0px 0px 0px 0px;
40
  border-radius: 0px 0px 0px 0px;
37
}
41
}
38
42
(-)src/org/eclipse/swt/internal/widgets/shellkit/Shell.theme.xml (-3 / +6 lines)
Lines 1-6 Link Here
1
<?xml version="1.0" encoding="UTF-8" ?>
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
2
<!--
3
 Copyright (c) 2008, 2009 Innoopract Informationssysteme GmbH.
3
 Copyright (c) 2008, 2011 Innoopract Informationssysteme GmbH.
4
 All rights reserved. This program and the accompanying materials
4
 All rights reserved. This program and the accompanying materials
5
 are made available under the terms of the Eclipse Public License v1.0
5
 are made available under the terms of the Eclipse Public License v1.0
6
 which accompanies this distribution, and is available at
6
 which accompanies this distribution, and is available at
Lines 35-42 Link Here
35
    <property name="background-color"
35
    <property name="background-color"
36
        description="Background color for shells." />
36
        description="Background color for shells." />
37
37
38
	<property name="opacity" 
38
    <property name="opacity" 
39
	    description="The opacity of the shell. A value between 0 and 1." />
39
        description="The opacity of the shell. A value between 0 and 1." />
40
        
41
    <property name="box-shadow" 
42
        description="The shadow behind the shell." />
40
43
41
    <style name="BORDER"
44
    <style name="BORDER"
42
        description="Indicates that the shell should have a border." />
45
        description="Indicates that the shell should have a border." />
(-)js/org/eclipse/rwt/GraphicsMixin.js (-73 / +239 lines)
Lines 19-31 Link Here
19
      apply : "_applyBackgroundGradient",
19
      apply : "_applyBackgroundGradient",
20
      event : "changeBackgroundGradient",      
20
      event : "changeBackgroundGradient",      
21
      themeable : true
21
      themeable : true
22
    },
23
24
    /**
25
     * Syntax for shadow:
26
     * [
27
     *    inset, //boolean, currently not supported
28
     *    offsetX, // positive or negative number
29
     *    offsetY, // positive or negative number
30
     *    blurRadius, // positive number or zero
31
     *    spread, // positive or negative number
32
     *    color, // string
33
     *    opacity, // number between 0 and 1
34
     * ]
35
     */
36
    shadow : {
37
      check : "Array",
38
      nullable : true,
39
      init : null,
40
      apply : "_applyShadow",
41
      event : "changeShadow",      
42
      themeable : true
22
    }
43
    }
23
44
24
  },
45
  },
46
  
47
  statics : {
48
    
49
    getSupportsShadows : function() {
50
      if( this._shadowSupport === undefined ) {
51
        var engine = org.eclipse.rwt.Client.getEngine();
52
        var version = org.eclipse.rwt.Client.getVersion();
53
        this._shadowSupport = false;
54
        switch( engine ) {
55
          case "gecko":
56
            this._shadowSupport = version >= 1.9;
57
          break;
58
          case "mshtml":
59
            this._shadowSupport = version >= 7;
60
          break;
61
          case "opera":
62
            this._shadowSupport = version >= 9.8;
63
          break;
64
          case "webkit":
65
            var browser = org.eclipse.rwt.Client.getBrowser();
66
            this._shadowSupport = /* browser === "chrome" && */ version >= 532.9;
67
          break;
68
        }
69
      }
70
      return this._shadowSupport;
71
    }
72
    
73
  },
25
74
26
  members : {
75
  members : {
27
    // NOTE : "gfx" (short for "graphics") is used in field-names to prevent
76
    // NOTE : "gfx" (short for "graphics") is used in field-names to prevent
28
    //        potential name-clashes with the classes including this mixin.
77
    //        potential name-clashes with the classes including this mixin.
78
    // TODO [tb] : refactor to work entirely with gfxData (with setter/getter)
29
    _gfxData : null,
79
    _gfxData : null,
30
    _gfxProperties : null,
80
    _gfxProperties : null,
31
    _gfxCanvas : null,
81
    _gfxCanvas : null,
Lines 41-47 Link Here
41
      // color-theme values are NOT supported for gradient
91
      // color-theme values are NOT supported for gradient
42
      this.setGfxProperty( "gradient", value );
92
      this.setGfxProperty( "gradient", value );
43
      this._handleGfxBackground();
93
      this._handleGfxBackground();
44
    } ,
94
    },
95
96
    _applyShadow : function( value, oldValue ) {
97
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
98
        this.setGfxProperty( "shadow", value );
99
        this._handleGfxShadow();
100
      }
101
    },
45
102
46
    //overwritten
103
    //overwritten
47
    _styleBackgroundColor : function( value ) {
104
    _styleBackgroundColor : function( value ) {
Lines 105-111 Link Here
105
      this.setGfxProperty( "borderMaxWidth", max );
162
      this.setGfxProperty( "borderMaxWidth", max );
106
      this.setGfxProperty( "borderColor", color );
163
      this.setGfxProperty( "borderColor", color );
107
      this.setGfxProperty( "borderRadii", renderRadii );
164
      this.setGfxProperty( "borderRadii", renderRadii );
108
      this.setGfxProperty( "borderLayouted", false ); // use GfxBorder to chcek
165
      this.setGfxProperty( "borderLayouted", null ); // use GfxBorder to chcek
109
      this._handleGfxBorder();
166
      this._handleGfxBorder();
110
    },
167
    },
111
168
Lines 160-172 Link Here
160
      // if gfxBorder is not used, canvas can still ready for background
217
      // if gfxBorder is not used, canvas can still ready for background
161
      if( ( toggle || useBorder ) && this._isCanvasReady() ) {
218
      if( ( toggle || useBorder ) && this._isCanvasReady() ) {
162
        this._renderGfxBorder();
219
        this._renderGfxBorder();
163
        if ( useBorder && this._willBeLayouted() ) {
220
        if( !useBorder || !this._willBeLayouted() ) {
164
          this._enableGfxLayout( true );
221
          // TODO [tb] : refactor conditions, "!useBorder" is only for padding
165
          //_layoutGfxBorder will be called on the next _layoutPost anyway
166
        } else {
167
          this._layoutGfxBorder();
222
          this._layoutGfxBorder();
223
          if( this._gfxShadowEnabled ) {
224
            this._layoutGfxShadow();
225
          }
168
        }
226
        }
227
        this._handleFlushListener();
169
      } else if( toggle && !useBorder && this._innerStyle ) {
228
      } else if( toggle && !useBorder && this._innerStyle ) {
229
        this._handleFlushListener();
170
        this._setSimulatedPadding();
230
        this._setSimulatedPadding();
171
      }
231
      }
172
    },
232
    },
Lines 203-216 Link Here
203
          this.setGfxProperty( "backgroundImage", null );
263
          this.setGfxProperty( "backgroundImage", null );
204
        }
264
        }
205
        this._handleGfxStatus();
265
        this._handleGfxStatus();
206
     }
266
      }
207
     if( ( toggle || useBackground ) && this._isCanvasReady() ) {
267
      if( ( toggle || useBackground ) && this._isCanvasReady() ) {
208
        this._renderGfxBackground();
268
        this._renderGfxBackground();
269
      } else if(    !useBackground 
270
                 && this._gfxData 
271
                 && this._gfxData.backgroundInsert ) 
272
      {
273
        this._prepareBackgroundShape(); 
274
      }
275
    },
276
277
    _handleGfxShadow : function() {
278
      var hasShadow = this.getGfxProperty( "shadow" ) != null;
279
      this._gfxShadowEnabled = hasShadow;
280
      this._handleGfxStatus();
281
      this._handleFlushListener();
282
      if( this._isCanvasReady() ) {
283
        this._renderGfxShadow();
284
      } else if(    !this._gfxShadowEnabled 
285
                 && this._gfxData 
286
                 && this._gfxData.shadowInsert ) 
287
      {
288
        // remove shape from canvas
289
        this._prepareShadowShape();
209
      }
290
      }
210
    },
291
    },
211
292
212
    _handleGfxStatus : function() {
293
    _handleGfxStatus : function() {
213
      var useGfx = ( this._gfxBorderEnabled || this._gfxBackgroundEnabled );
294
      var useGfx =    this._gfxBorderEnabled 
295
                   || this._gfxBackgroundEnabled 
296
                   || this._gfxShadowEnabled;
214
      if( useGfx != this._gfxEnabled ) {
297
      if( useGfx != this._gfxEnabled ) {
215
        if( useGfx ) {
298
        if( useGfx ) {
216
          this.addEventListener( "changeElement",
299
          this.addEventListener( "changeElement",
Lines 230-250 Link Here
230
    // internals - canvas
313
    // internals - canvas
231
314
232
    _isCanvasReady : function() {
315
    _isCanvasReady : function() {
233
      var ret = false;
316
      var result = false;
234
      if( this._isCreated ) {
317
      if( this._isCreated ) {
235
        if( this._gfxEnabled && this._gfxCanvasAppended ) {
318
        if( this._gfxEnabled && this._gfxCanvasAppended ) {
236
          ret = true;
319
          result = true;
237
        } else if( this._gfxEnabled && !this._gfxCanvasAppended ) {
320
        } else if( this._gfxEnabled && !this._gfxCanvasAppended ) {
238
          if( this._gfxCanvas == null ) {
321
          if( this._gfxCanvas == null ) {
239
            this._createCanvas();
322
            this._createCanvas();
240
          }
323
          }
241
          this._appendCanvas();
324
          this._appendCanvas();
242
          ret = true;
325
          result = true;
243
        } else if( !this._gfxEnabled && this._gfxCanvasAppended ) {
326
        } else if( !this._gfxEnabled && this._gfxCanvasAppended ) {
244
          this._removeCanvas();
327
          this._removeCanvas();
245
        }
328
        }
246
      }
329
      }
247
      return ret;
330
      return result;
248
    },
331
    },
249
332
250
    _createCanvas : function() {
333
    _createCanvas : function() {
Lines 273-279 Link Here
273
      }
356
      }
274
      this._gfxData = {};      
357
      this._gfxData = {};      
275
      this._gfxCanvas = org.eclipse.rwt.GraphicsUtil.createCanvas();
358
      this._gfxCanvas = org.eclipse.rwt.GraphicsUtil.createCanvas();
276
      this._prepareGfxShape();
359
      // TODO [tb] : can be removed?
360
      this._prepareBackgroundShape();
277
    },
361
    },
278
    
362
    
279
    _appendCanvas : function() {
363
    _appendCanvas : function() {
Lines 300-346 Link Here
300
      }
384
      }
301
    },
385
    },
302
386
303
    //overwritten, analog to the above function:
387
    //////////////////////////////
304
    _getTargetNode : function() {
388
    // internals - backgroundShape
305
        return this._targetNode || this._element;
306
    },
307
308
    ////////////////////
309
    // internals - shape
310
389
311
    _prepareGfxShape : function() {
390
    _prepareBackgroundShape : function() {
312
      var util = org.eclipse.rwt.GraphicsUtil;
391
      var util = org.eclipse.rwt.GraphicsUtil;
313
      var shape = this._gfxData.currentShape;
392
      var backgroundShape = this._gfxData.backgroundShape;
314
      if( shape ) {
393
      if( this._gfxBackgroundEnabled ) {
315
        if( !this._gfxBorderEnabled && shape !== this._gfxData.rect ) {
394
        var usePath = this._gfxBorderEnabled;
316
          util.removeFromCanvas( this._gfxCanvas, shape );
395
        if( backgroundShape === undefined ) {
317
          if( !this._gfxData.rect ) {
396
          this._gfxData.backgroundShape
318
            shape = this._createGfxShape( false );
397
             = this._createBackgroundShape( usePath );
319
          } else {
398
        } else {
320
            shape = this._gfxData.rect;
399
          if( usePath && backgroundShape === this._gfxData.rectShape ) {
321
          }
400
            util.removeFromCanvas( this._gfxCanvas, backgroundShape );
322
          util.addToCanvas( this._gfxCanvas, shape );
401
            this._gfxData.backgroundInsert = false;
323
          this._gfxData.currentShape = shape;
402
            delete this._gfxData.rectShape;
324
        } else if(    this._gfxBorderEnabled 
403
            this._gfxData.backgroundShape
325
                   && shape !== this._gfxData.pathElement ) 
404
               = this._createBackgroundShape( usePath );
326
        {
405
          } else if( !usePath && backgroundShape === this._gfxData.pathElement ) {
327
          util.removeFromCanvas( this._gfxCanvas, shape );
406
            util.removeFromCanvas( this._gfxCanvas, backgroundShape );
328
          if( !this._gfxData.pathElement ) {
407
            this._gfxData.backgroundInsert = false;
329
            shape = this._createGfxShape( true );
408
            delete this._gfxData.pathElement;
330
          } else {
409
            this._gfxData.backgroundShape
331
            shape = this._gfxData.pathElement;
410
              = this._createBackgroundShape( usePath );
332
          }
411
          }
412
        }
413
        if( !this._gfxData.backgroundInsert ) {
414
          var shape = this._gfxData.backgroundShape;
333
          util.addToCanvas( this._gfxCanvas, shape );
415
          util.addToCanvas( this._gfxCanvas, shape );
334
          this._gfxData.currentShape = shape;
416
          this._gfxData.backgroundInsert = true;
335
        }
417
        }
336
      } else { // no shape created at all
418
      } else if( this._gfxData.backgroundInsert ) {
337
        shape = this._createGfxShape( this._gfxBorderEnabled );
419
        util.removeFromCanvas( this._gfxCanvas, backgroundShape );
338
        util.addToCanvas( this._gfxCanvas, shape );
420
        this._gfxData.backgroundInsert = false;
339
        this._gfxData.currentShape = shape;
340
      }
421
      }
341
    },
422
    },
342
423
343
    _createGfxShape : function( usePath ) {
424
    _createBackgroundShape : function( usePath ) {
344
      var shape = null;
425
      var shape = null;
345
      var util = org.eclipse.rwt.GraphicsUtil;
426
      var util = org.eclipse.rwt.GraphicsUtil;
346
      if( usePath ) {
427
      if( usePath ) {
Lines 349-355 Link Here
349
      } else {
430
      } else {
350
        var shape = util.createShape( "rect" );
431
        var shape = util.createShape( "rect" );
351
        util.setRectBounds( shape, "0%", "0%", "100%", "100%" );
432
        util.setRectBounds( shape, "0%", "0%", "100%", "100%" );
352
        this._gfxData.rect = shape;
433
        this._gfxData.rectShape = shape;
353
      }
434
      }
354
      return shape;
435
      return shape;
355
    },
436
    },
Lines 359-379 Link Here
359
    // internals - background
440
    // internals - background
360
441
361
    _renderGfxBackground : function() {
442
    _renderGfxBackground : function() {
362
      this._prepareGfxShape();
443
      this._prepareBackgroundShape();
363
      var fillType = this.getGfxProperty( "fillType" );
444
      var fillType = this.getGfxProperty( "fillType" );
364
      var util = org.eclipse.rwt.GraphicsUtil;
445
      var util = org.eclipse.rwt.GraphicsUtil;
365
      if( fillType == "gradient" ) {
446
      if( fillType == "gradient" ) {
366
        var gradient = this.getGfxProperty( "gradient" );
447
        var gradient = this.getGfxProperty( "gradient" );
367
        util.setFillGradient( this._gfxData.currentShape, gradient );
448
        util.setFillGradient( this._gfxData.backgroundShape, gradient );
368
      } else if( fillType == "image" ) { 
449
      } else if( fillType == "image" ) { 
369
        var image = this.getGfxProperty( "backgroundImage" );
450
        var image = this.getGfxProperty( "backgroundImage" );
370
        image = typeof image == "undefined" ? null : image;
451
        image = typeof image == "undefined" ? null : image;
371
        var size = this._getImageSize( image );
452
        var size = this._getImageSize( image );
372
        util.setFillPattern( this._gfxData.currentShape, image, size[ 0 ], size[ 1 ] );
453
        util.setFillPattern( this._gfxData.backgroundShape, image, size[ 0 ], size[ 1 ] );
373
      } else { //assume fillType is "solid"
454
      } else { //assume fillType is "solid"
374
        var color = this.getGfxProperty( "backgroundColor" );
455
        var color = this.getGfxProperty( "backgroundColor" );
375
        color = color == "" ? null : color;
456
        color = color == "" ? null : color;
376
        util.setFillColor( this._gfxData.currentShape, color );
457
        util.setFillColor( this._gfxData.backgroundShape, color );
377
      }
458
      }
378
    },
459
    },
379
    
460
    
Lines 384-391 Link Here
384
      this._style.borderWidth = 0;
465
      this._style.borderWidth = 0;
385
      var inner = this._innerStyle;
466
      var inner = this._innerStyle;
386
      inner.borderWidth = 0;
467
      inner.borderWidth = 0;
387
      this._prepareGfxShape();
468
      this._prepareBackgroundShape();
388
      var shape = this._gfxData.currentShape;
469
      var shape = this._gfxData.backgroundShape;
389
      var width = this.getGfxProperty( "borderMaxWidth" );
470
      var width = this.getGfxProperty( "borderMaxWidth" );
390
      var color = this.getGfxProperty( "borderColor" );
471
      var color = this.getGfxProperty( "borderColor" );
391
      org.eclipse.rwt.GraphicsUtil.setStroke( shape, color, width );
472
      org.eclipse.rwt.GraphicsUtil.setStroke( shape, color, width );
Lines 393-412 Link Here
393
474
394
    _layoutGfxBorder : function() {
475
    _layoutGfxBorder : function() {
395
      var rectDimension = [ this.getBoxWidth(), this.getBoxHeight() ];
476
      var rectDimension = [ this.getBoxWidth(), this.getBoxHeight() ];
396
      var oldDimension = this.getGfxProperty( "rectDimension" );
477
      var oldDimension = this.getGfxProperty( "borderLayouted" );
397
      if(    !this.getGfxProperty( "borderLayouted" )
478
      var changedX 
398
          || ( rectDimension[ 0 ] != oldDimension[ 0 ] )
479
        = !oldDimension || ( rectDimension[ 0 ] !== oldDimension[ 0 ] );
399
          || ( rectDimension[ 1 ] != oldDimension[ 1 ] ) )
480
      var changedY
400
      {
481
        = !oldDimension || ( rectDimension[ 1 ] !== oldDimension[ 1 ] );
401
        this.setGfxProperty( "rectDimension", rectDimension );
482
      if( changedX || changedY ) {
483
        this.setGfxProperty( "borderLayouted", rectDimension );
402
        this._setSimulatedPadding();
484
        this._setSimulatedPadding();
485
        var rectDimension = [ this.getBoxWidth(), this.getBoxHeight() ];
403
        var radii = this.getGfxProperty( "borderRadii" );
486
        var radii = this.getGfxProperty( "borderRadii" );
404
        var borderWidth = this.getGfxProperty( "borderWidths" );
487
        var borderWidth = this.getGfxProperty( "borderWidths" );
405
        if( borderWidth != null && radii != null ) {
488
        if( borderWidth != null && radii != null ) {
406
          var shape = this._gfxData.pathElement;
407
          var maxWidth = this.getGfxProperty( "borderMaxWidth" );
489
          var maxWidth = this.getGfxProperty( "borderMaxWidth" );
408
          this._enableGfxLayout( true );
409
          var rectDimension = this.getGfxProperty( "rectDimension" );
410
          var borderTop = 0;
490
          var borderTop = 0;
411
          var borderRight = 0;
491
          var borderRight = 0;
412
          var borderBottom = 0;
492
          var borderBottom = 0;
Lines 430-445 Link Here
430
          //a few safeguards:
510
          //a few safeguards:
431
          rectWidth = Math.max( 0, rectWidth );
511
          rectWidth = Math.max( 0, rectWidth );
432
          rectHeight = Math.max( 0, rectHeight );
512
          rectHeight = Math.max( 0, rectHeight );
513
          var shape = this._gfxData.pathElement;
433
          org.eclipse.rwt.GraphicsUtil.setRoundRectLayout( shape, 
514
          org.eclipse.rwt.GraphicsUtil.setRoundRectLayout( shape, 
434
                                                           left, 
515
                                                           left, 
435
                                                           top, 
516
                                                           top, 
436
                                                           rectWidth, 
517
                                                           rectWidth, 
437
                                                           rectHeight, 
518
                                                           rectHeight, 
438
                                                           radii );
519
                                                           radii );
439
        } else {
440
          this._enableGfxLayout( false );
441
        }
520
        }
442
        this.setGfxProperty( "borderLayouted", true );
443
      }
521
      }
444
    },
522
    },
445
523
Lines 447-453 Link Here
447
      var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" );
525
      var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" );
448
      var width = this.getGfxProperty( "borderWidths" );
526
      var width = this.getGfxProperty( "borderWidths" );
449
      if( width ) {
527
      if( width ) {
450
        var rect = this.getGfxProperty( "rectDimension" );
528
        var rect = this.getGfxProperty( "borderLayouted" );
451
        var style = this._innerStyle;
529
        var style = this._innerStyle;
452
        style.top = width[ 0 ] + "px";
530
        style.top = width[ 0 ] + "px";
453
        style.left = width[ 3 ] + "px";
531
        style.left = width[ 3 ] + "px";
Lines 468-482 Link Here
468
      }
546
      }
469
    },
547
    },
470
548
471
    _enableGfxLayout : function( value ) {
549
    _handleFlushListener : function( value ) {
472
      this._layoutTargetNode = !value;
550
      var enhanced = this._innerStyle || this._gfxEnabled;
473
      if( value ) {
551
      this._layoutTargetNode = enhanced && !this._gfxBorderEnabled;
552
      if( this._gfxBorderEnabled || this._gfxShadowEnabled ) {
474
        this.addEventListener( "flush", this._gfxOnFlush, this );
553
        this.addEventListener( "flush", this._gfxOnFlush, this );
475
      } else {
554
      } else {
476
        this.removeEventListener( "flush", this._gfxOnFlush, this );      
555
        this.removeEventListener( "flush", this._gfxOnFlush, this );      
477
      }
556
      }
478
    },
557
    },
479
    
558
    
559
    ////////////////////
560
    // internal - shadow
561
    
562
    _prepareShadowShape : function() {
563
      var util = org.eclipse.rwt.GraphicsUtil;
564
      if( this._gfxShadowEnabled ) {
565
        if( this._gfxData.shadowShape === undefined ) {
566
          this._createShadowShape();
567
          var canvasNode = util.getCanvasNode( this._gfxCanvas );
568
          org.eclipse.rwt.HtmlUtil.setPointerEvents( canvasNode, "none" );
569
        }
570
        var shape = this._gfxData.shadowShape;
571
        if( !this._gfxData.shadowInsert ) {
572
          var before = null;
573
          if( this._gfxData.backgroundInsert ) {
574
            before = this._gfxData.backgroundShape;
575
          }
576
          util.addToCanvas( this._gfxCanvas, shape, before );
577
          this._gfxData.shadowInsert = true;
578
        }
579
      } else if( this._gfxData.shadowInsert ) {
580
        util.removeFromCanvas( this._gfxCanvas, this._gfxData.shadowShape );
581
        // disable overflow:
582
        util.enableOverflow( this._gfxCanvas, 0, 0, null, null );
583
        delete this._gfxData.shadowInsert;
584
      }
585
    },
586
587
    _createShadowShape : function() {
588
      var shape = null;
589
      var util = org.eclipse.rwt.GraphicsUtil;
590
      var shape = util.createShape( "roundrect" );
591
      this._gfxData.shadowShape = shape;
592
      return shape;
593
    },
594
    
595
    _renderGfxShadow : function() {
596
      this._prepareShadowShape();
597
      if( this._gfxShadowEnabled ) {
598
        var util = org.eclipse.rwt.GraphicsUtil;
599
        var shadow = this.getGfxProperty( "shadow" );
600
        var shape = this._gfxData.shadowShape;
601
        util.setBlur( shape, shadow[ 3 ] );
602
        util.setFillColor( shape, shadow[ 5 ] );
603
        util.setOpacity( shape, shadow[ 6 ] );
604
        this._layoutGfxShadow();
605
      }
606
    },
607
    
608
    _layoutGfxShadow : function() {
609
      var util = org.eclipse.rwt.GraphicsUtil;
610
      var rect = [ this.getBoxWidth(), this.getBoxHeight() ];
611
      var shape = this._gfxData.shadowShape;
612
      var shadow = this.getGfxProperty( "shadow" );
613
      var radii = this.getGfxProperty( "borderRadii" );
614
      radii = radii === null ? [ 0, 0, 0, 0 ] : radii;
615
      var left = shadow[ 1 ];
616
      var top = shadow[ 2 ];
617
      var width = rect[ 0 ];
618
      var height = rect[ 1 ];
619
      var blur = shadow[ 3 ];
620
      var overflowLeft = left < 0 ? Math.abs( left ) + blur : 0;
621
      var overflowTop = top < 0 ? Math.abs( top ) + blur : 0;
622
      var overflowRight = Math.max( 0, blur + left );
623
      var overflowBottom = Math.max( 0, blur + top );
624
      var overflowWidth = width + overflowRight;
625
      var overflowHeight = height + overflowBottom;
626
      // overflow-area must be defined every time:
627
      util.enableOverflow( this._gfxCanvas, 
628
                           overflowLeft, 
629
                           overflowTop, 
630
                           overflowWidth, 
631
                           overflowHeight );
632
      util.setRoundRectLayout( shape, left, top, width, height, radii );
633
    },
634
    
480
    ////////////////////////////////////
635
    ////////////////////////////////////
481
    // internals - helper & eventhandler
636
    // internals - helper & eventhandler
482
    
637
    
Lines 500-506 Link Here
500
        this._removeCanvas();
655
        this._removeCanvas();
501
      }
656
      }
502
      if( event.getValue() != null && this._isCanvasReady() ) {
657
      if( event.getValue() != null && this._isCanvasReady() ) {
503
        this._renderGfxBackground();
658
        if( this._gfxBackgroundEnabled ) {
659
          this._renderGfxBackground();
660
        }
661
        if( this._gfxShadowEnabled ) {
662
          this._renderGfxShadow();
663
        }
504
        // border is handled by widget queue
664
        // border is handled by widget queue
505
      }
665
      }
506
    },
666
    },
Lines 519-529 Link Here
519
    },
679
    },
520
680
521
    _gfxOnFlush : function( event ) {
681
    _gfxOnFlush : function( event ) {
682
      // TODO [tb] : refactor / optimize
522
      var changes = event.getData();
683
      var changes = event.getData();
523
      if ( changes.paddingRight || changes.paddingBottom ) {
684
      if ( changes.paddingRight || changes.paddingBottom ) {
524
        this.setGfxProperty( "borderLayouted", false ); 
685
        this.setGfxProperty( "borderLayouted", null ); 
686
      }
687
      if( this._gfxBorderEnabled ) {
688
        this._layoutGfxBorder();
689
      }
690
      if( this._gfxShadowEnabled ) {
691
        this._layoutGfxShadow();
525
      }
692
      }
526
      this._layoutGfxBorder();
527
    }
693
    }
528
        
694
        
529
  }
695
  }
(-)js/org/eclipse/rwt/GraphicsUtil.js (-2 / +27 lines)
Lines 64-69 Link Here
64
    },
64
    },
65
    
65
    
66
    /**
66
    /**
67
     * Grants the canvas at least 50 px overflow in every direction.
68
     * The overflow captures events, so HtmlUtil.setPointerEvents should be 
69
     * used on canvas. Not setting this does not mean that overflow is hidden.
70
     */
71
    enableOverflow : function( canvas, x, y, width, height ) {
72
      this._renderClass.enableOverflow( canvas, x, y, width, height );
73
    },
74
    
75
    /**
67
     * Returns a handle for a shape. This objects members are considered
76
     * Returns a handle for a shape. This objects members are considered
68
     * package-private and should not be accessed outside the renderclass. 
77
     * package-private and should not be accessed outside the renderclass. 
69
     * Currently supported types: "rect", "roundrect"
78
     * Currently supported types: "rect", "roundrect"
Lines 78-85 Link Here
78
    
87
    
79
    // TODO [tb] : There might currently be a glitch in IE if a shape is added
88
    // TODO [tb] : There might currently be a glitch in IE if a shape is added
80
    //             to an alreadey visible canvas.
89
    //             to an alreadey visible canvas.
81
    addToCanvas : function( canvas, shape ) {
90
    addToCanvas : function( canvas, shape, beforeShape ) {
82
      this._renderClass.addToCanvas( canvas, shape );
91
      this._renderClass.addToCanvas( canvas, shape, beforeShape );
83
    },
92
    },
84
    
93
    
85
    removeFromCanvas : function( canvas, shape ) {
94
    removeFromCanvas : function( canvas, shape ) {
Lines 202-209 Link Here
202
     */
211
     */
203
    setOpacity : function( shape, opacity ) {
212
    setOpacity : function( shape, opacity ) {
204
      this._renderClass.setOpacity( shape, opacity );
213
      this._renderClass.setOpacity( shape, opacity );
214
    },
215
    
216
    getOpacity : function( shape ) {
217
      return this._renderClass.getOpacity( shape );
218
    },
219
    
220
    /**
221
     * radius is 0 or greater
222
     */
223
    setBlur : function( shape, radius ) {
224
      this._renderClass.setBlur( shape, radius );
225
    },
226
    
227
    getBlur : function( shape ) {
228
      return this._renderClass.getBlur( shape );
205
    }
229
    }
206
230
231
207
  }
232
  }
208
233
209
} );
234
} );
(-)js/org/eclipse/rwt/HtmlUtil.js (-10 / +95 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 *  Copyright: 2004-2010 1&1 Internet AG, Germany, http://www.1und1.de,
2
 *  Copyright: 2004, 2011 1&1 Internet AG, Germany, http://www.1und1.de,
3
 *                       and EclipseSource
3
 *                       and EclipseSource
4
 *
4
 *
5
 * This program and the accompanying materials are made available under the
5
 * This program and the accompanying materials are made available under the
Lines 24-30 Link Here
24
    setOpacity  : qx.core.Variant.select("qx.client", {
24
    setOpacity  : qx.core.Variant.select("qx.client", {
25
      "mshtml" : function( target, value ) {
25
      "mshtml" : function( target, value ) {
26
        if( value == null || value >= 1 || value < 0 ) {
26
        if( value == null || value >= 1 || value < 0 ) {
27
          this._removeCssFilter( target );
27
          this.removeCssFilter( target );
28
        } else {
28
        } else {
29
          var valueStr = "Alpha(opacity=" + Math.round( value * 100 ) + ")";
29
          var valueStr = "Alpha(opacity=" + Math.round( value * 100 ) + ")";
30
          this.setStyleProperty( target, "filter", valueStr );
30
          this.setStyleProperty( target, "filter", valueStr );
Lines 46-51 Link Here
46
      }
46
      }
47
    } ),
47
    } ),
48
    
48
    
49
    setPointerEvents : function( target, value ) {
50
      var version = org.eclipse.rwt.Client.getVersion();
51
      var ffSupport 
52
        = org.eclipse.rwt.Client.getEngine() === "gecko" && version >= 1.9;
53
      // NOTE: chrome does not support pointerEvents, but not on svg-nodes
54
      var webKitSupport 
55
        = org.eclipse.rwt.Client.getBrowser() === "safari" && version >= 530;
56
      if( ffSupport || webKitSupport ) {
57
        this.setStyleProperty( target, "pointerEvents", value );
58
        target.setAttribute( "pointerEvents", value );
59
      } else {
60
        this._passEventsThrough( target, value );
61
      }
62
    },
63
49
    setStyleProperty : function( target, property, value ) {
64
    setStyleProperty : function( target, property, value ) {
50
      if( target instanceof qx.ui.core.Widget ) {
65
      if( target instanceof qx.ui.core.Widget ) {
51
        target.setStyleProperty( property, value );          
66
        target.setStyleProperty( property, value );          
Lines 53-59 Link Here
53
        target.style[ property ] = value;          
68
        target.style[ property ] = value;          
54
      }
69
      }
55
    },
70
    },
56
    
71
57
    removeStyleProperty : function( target, property ) {
72
    removeStyleProperty : function( target, property ) {
58
      if( target instanceof qx.ui.core.Widget ) {
73
      if( target instanceof qx.ui.core.Widget ) {
59
        target.removeStyleProperty( property );
74
        target.removeStyleProperty( property );
Lines 61-71 Link Here
61
        target.style[ property ] = "";
76
        target.style[ property ] = "";
62
      }
77
      }
63
    },
78
    },
64
    
79
65
    //////////
80
    removeCssFilter : function( target ) {
66
    // Private
67
    
68
    _removeCssFilter : function( target ) {
69
      var element = null;
81
      var element = null;
70
      if( target instanceof qx.ui.core.Widget ) {
        if( target.isCreated() ) {
82
      if( target instanceof qx.ui.core.Widget ) {
        if( target.isCreated() ) {
71
          element = target.getElement();
83
          element = target.getElement();
Lines 80-86 Link Here
80
        cssText = cssText.replace( /FILTER:[^;]*(;|$)/, "" );
92
        cssText = cssText.replace( /FILTER:[^;]*(;|$)/, "" );
81
        element.style.cssText = cssText;
93
        element.style.cssText = cssText;
82
      }
94
      }
83
    }
95
    },
84
  }
96
97
    /////////
98
    // Helper
99
    
100
    _passEventsThrough : function( target, value ) {
101
      // TODO [tb] : This is a very limited implementation that allowes
102
      // to click "through" the elmement, but won't handle hover and cursor.
103
      var util = qx.html.EventRegistration;
104
      var types = org.eclipse.rwt.EventHandler._mouseEventTypes;
105
      var handler = this._passEventThroughHandler;
106
      if( value === "none" ) {
107
        this.setStyleProperty( target, "cursor", "default" );
108
        for( var i = 0; i < types.length; i++ ) {
109
          util.addEventListener( target, types[ i ], handler );
110
        }
111
      } else {
112
        // TODO
113
      }
114
    },
115
    
116
    _passEventThroughHandler : function() {
117
      var util = org.eclipse.rwt.EventHandlerUtil;
118
      var domEvent = util.getDomEvent( arguments );
119
      var domTarget = util.getDomTarget( domEvent );
120
      var type = domEvent.type;
121
      domTarget.style.display = "none";
122
      var newTarget 
123
        = document.elementFromPoint( domEvent.clientX, domEvent.clientY );
124
      domEvent.cancelBubble = true;
125
      util.stopDomEvent( domEvent );
126
      if(    newTarget
127
          && type !== "mousemove" 
128
          && type !== "mouseover" 
129
          && type !== "mouseout" )  
130
      {
131
        if( type === "mousedown" ) {
132
          org.eclipse.rwt.HtmlUtil._refireEvent( newTarget, "mouseover", domEvent );
133
        } 
134
        org.eclipse.rwt.HtmlUtil._refireEvent( newTarget, type, domEvent );
135
        if( type === "mouseup" ) {
136
          org.eclipse.rwt.HtmlUtil._refireEvent( newTarget, "mouseout", domEvent );          
137
        }
138
      }
139
      domTarget.style.display = "";
140
    },
141
    
142
    _refireEvent : qx.core.Variant.select("qx.client", {
143
      "mshtml" : function( target, type, originalEvent ) { 
144
        var newEvent = document.createEventObject( originalEvent );
145
        target.fireEvent( "on" + type , newEvent );
146
      }, 
147
      "default" : function( target, type, originalEvent ) {
148
        var newEvent = document.createEvent( "MouseEvents" );
149
        newEvent.initMouseEvent( type, 
150
                                 true,  /* can bubble */
151
                                 true, /*cancelable */
152
                                 originalEvent.view, 
153
                                 originalEvent.detail, 
154
                                 originalEvent.screenX, 
155
                                 originalEvent.screenY, 
156
                                 originalEvent.clientX, 
157
                                 originalEvent.clientY, 
158
                                 originalEvent.ctrlKey, 
159
                                 originalEvent.altKey, 
160
                                 originalEvent.shiftKey, 
161
                                 originalEvent.metaKey, 
162
                                 originalEvent.button, 
163
                                 originalEvent.relatedTarget);
164
        console.log( "dispatch " + event.type );
165
        target.dispatchEvent( newEvent );
166
      }
167
    } )
85
168
169
  }
170
  
86
} );
171
} );
(-)js/org/eclipse/rwt/SVG.js (-33 / +102 lines)
Lines 11-46 Link Here
11
qx.Class.define( "org.eclipse.rwt.SVG", {
11
qx.Class.define( "org.eclipse.rwt.SVG", {
12
12
13
  statics : {
13
  statics : {
14
    
14
15
    init : function(){ 
15
    init : function(){ 
16
      // nothing to do
16
      // nothing to do
17
    },
17
    },
18
    
18
19
    createCanvas : function() {
19
    createCanvas : function() {
20
      var result = {};
20
      var result = {};
21
      var node = this._createNode( "svg" );
21
      var node = this._createNode( "svg" );
22
      node.style.position = "absolute"
22
      node.style.position = "absolute"
23
      node.style.left = "0px";
23
      node.style.left = "0px";
24
      node.style.right = "0px";
24
      node.style.top = "0px";
25
      node.style.width = "100%";
25
      node.style.width = "100%";
26
      node.style.height = "100%"
26
      node.style.height = "100%";
27
      node.style.overflow = "hidden";
28
      var defs = this._createNode( "defs" );
27
      var defs = this._createNode( "defs" );
29
      node.appendChild( defs );
28
      node.appendChild( defs );
30
      result.type = "svgCanvas";
29
      result.type = "svgCanvas";
31
      result.node = node;     
30
      result.node = node;     
31
      result.group = node;
32
      result.defsNode = defs;
32
      result.defsNode = defs;
33
      return result;
33
      return result;
34
    },
34
    },
35
    
35
36
    getCanvasNode : function( canvas ) {
36
    getCanvasNode : function( canvas ) {
37
      return canvas.node;
37
      return canvas.node;
38
    },
38
    },
39
    
39
40
    handleAppear : function( canvas ) {
40
    handleAppear : function( canvas ) {
41
      // nothing to do
41
      // nothing to do
42
    },
42
    },
43
       
43
    
44
    enableOverflow : function( canvas, x, y, width, height ) {
45
      // Supported in firefox 3.0+, safari and chrome (with limitations)
46
      if( canvas.group === canvas.node ) {
47
        var node = canvas.node;
48
        var group = this._createNode( "g" );
49
        canvas.group = group;
50
        while( node.firstChild ) {
51
          group.appendChild( node.firstChild );
52
        }
53
        node.appendChild( group );
54
      }
55
      canvas.node.style.left = ( x * -1 ) + "px";
56
      canvas.node.style.top = ( y * -1 ) + "px";
57
      if( width ) {
58
        canvas.node.style.width = ( x + width ) + "px";
59
      } else {
60
        canvas.node.style.width = "100%";        
61
      }
62
      if( height ) {
63
        canvas.node.style.height = ( y + height ) + "px";
64
      } else {
65
        canvas.node.style.height = "100%";
66
      }
67
      if( x === 0 && y === 0 ) {
68
        canvas.group.setAttribute( "transform", "" );
69
      } else {
70
        canvas.group.setAttribute( "transform", "translate(" + x + "," + y + ")" );        
71
      }
72
    },
73
44
    createShape : function( type ) {
74
    createShape : function( type ) {
45
      var result;
75
      var result;
46
      switch( type ) {
76
      switch( type ) {
Lines 61-83 Link Here
61
      result.parent = null
91
      result.parent = null
62
      return result;
92
      return result;
63
    },
93
    },
64
    
94
65
    addToCanvas : function( canvas, shape ) {
95
    addToCanvas : function( canvas, shape, beforeShape ) {
66
      shape.parent = canvas;
96
      shape.parent = canvas;
67
      canvas.node.appendChild( shape.node );
97
      if( beforeShape ) {
98
        canvas.group.insertBefore( shape.node, beforeShape.node );
99
      } else {
100
        canvas.group.appendChild( shape.node );
101
      }
68
      this._attachDefinitions( shape );
102
      this._attachDefinitions( shape );
69
    },
103
    },
70
    
104
71
    removeFromCanvas : function( canvas, shape ) {
105
    removeFromCanvas : function( canvas, shape ) {
72
      this._detachDefinitions( shape );
106
      this._detachDefinitions( shape );
73
      canvas.node.removeChild( shape.node );
107
      canvas.group.removeChild( shape.node );
74
      shape.parent = null;
108
      shape.parent = null;
75
    },
109
    },
76
    
110
77
    setDisplay : function( shape, value ) {
111
    setDisplay : function( shape, value ) {
78
      shape.node.setAttribute( "display", value ? "inline" : "none" );
112
      shape.node.setAttribute( "display", value ? "inline" : "none" );
79
    },
113
    },
80
    
114
81
    getDisplay : function( shape ) {
115
    getDisplay : function( shape ) {
82
      var display = shape.node.getAttribute( "display" );
116
      var display = shape.node.getAttribute( "display" );
83
      var result = display == "none" ? false : true;
117
      var result = display == "none" ? false : true;
Lines 91-97 Link Here
91
      node.setAttribute( "x", this._convertNumeric( x ) );
125
      node.setAttribute( "x", this._convertNumeric( x ) );
92
      node.setAttribute( "y", this._convertNumeric( y ) );
126
      node.setAttribute( "y", this._convertNumeric( y ) );
93
    },
127
    },
94
    
128
95
    setRoundRectLayout : function( shape, x, y, width, height, radii ) {
129
    setRoundRectLayout : function( shape, x, y, width, height, radii ) {
96
      var radiusLeftTop = radii[ 0 ];
130
      var radiusLeftTop = radii[ 0 ];
97
      var radiusTopRight = radii[ 1 ];
131
      var radiusTopRight = radii[ 1 ];
Lines 140-146 Link Here
140
        shape.node.setAttribute( "fill", "none" );
174
        shape.node.setAttribute( "fill", "none" );
141
      }
175
      }
142
    },
176
    },
143
    
177
144
    getFillColor : function( shape ) {
178
    getFillColor : function( shape ) {
145
      var result = null;
179
      var result = null;
146
      if( this.getFillType( shape ) == "color" ) {
180
      if( this.getFillType( shape ) == "color" ) {
Lines 148-154 Link Here
148
      }
182
      }
149
      return result;
183
      return result;
150
    },
184
    },
151
    
185
152
    setFillGradient : function( shape, gradient ) {
186
    setFillGradient : function( shape, gradient ) {
153
      if( gradient != null ) {
187
      if( gradient != null ) {
154
        var id = "gradient_" + qx.core.Object.toHashCode( shape );
188
        var id = "gradient_" + qx.core.Object.toHashCode( shape );
Lines 230-236 Link Here
230
        shape.node.setAttribute( "fill", "none" );
264
        shape.node.setAttribute( "fill", "none" );
231
      }
265
      }
232
    },
266
    },
233
    
267
234
    getFillType : function( shape ) {
268
    getFillType : function( shape ) {
235
      var result = shape.node.getAttribute( "fill" );     
269
      var result = shape.node.getAttribute( "fill" );     
236
      if( result.search( "pattern_") != -1 ) {
270
      if( result.search( "pattern_") != -1 ) {
Lines 259-272 Link Here
259
      // this assumes that only px can be set, which is true within this class
293
      // this assumes that only px can be set, which is true within this class
260
      return parseFloat( shape.node.getAttribute( "stroke-width" ) );
294
      return parseFloat( shape.node.getAttribute( "stroke-width" ) );
261
    },
295
    },
262
    
296
263
    setOpacity : function( shape, opacity ) {
297
    setOpacity : function( shape, opacity ) {
264
      shape.node.setAttribute( "opacity", opacity );
298
      shape.node.setAttribute( "opacity", opacity );
265
    },
299
    },
300
    
301
    getOpacity : function( shape ) {
302
      var result = shape.node.getAttribute( "opacity" );
303
      return result ? result : 0;
304
    },
305
306
    setBlur : function( shape, blurRadius ) {
307
      if( blurRadius > 0 ) {
308
        var id = "filter_" + qx.core.Object.toHashCode( shape );
309
        var filterNode;
310
        if( typeof shape.defNodes[ id ] === "undefined" ) {
311
          filterNode = this._createNode( "filter" ); 
312
          filterNode.setAttribute( "id", id );
313
          filterNode.appendChild( this._createNode( "feGaussianBlur" ) );
314
          this._addNewDefinition( shape, filterNode, id );
315
        } else {
316
          filterNode = shape.defNodes[ id ];
317
        }
318
        filterNode.firstChild.setAttribute( "stdDeviation", blurRadius / 2 );
319
        shape.node.setAttribute( "filter", "url(#" + id + ")" );
320
      } else {
321
        shape.node.setAttribute( "filter", "none" );
322
      }
323
    },
324
    
325
    getBlur : function( shape ) {
326
      var result = 0;
327
      var filter = shape.node.getAttribute( "filter" );
328
      if( filter && filter !== "none" ) {
329
        var id = "filter_" + qx.core.Object.toHashCode( shape );
330
        var filterNode = shape.defNodes[ id ];
331
        result = filterNode.firstChild.getAttribute( "stdDeviation" ) * 2;
332
      }
333
      return result;
334
    },
266
335
267
    /////////
336
    /////////
268
    // helper
337
    // helper
269
    
338
270
    _onImageLoad : function( source, func ) {
339
    _onImageLoad : function( source, func ) {
271
      var loader = new Image();
340
      var loader = new Image();
272
      loader.src = source;
341
      loader.src = source;
Lines 280-290 Link Here
280
        }
349
        }
281
      };
350
      };
282
    },
351
    },
283
        
352
284
    _createNode : function( type ) {
353
    _createNode : function( type ) {
285
      return document.createElementNS( "http://www.w3.org/2000/svg", type );
354
      return document.createElementNS( "http://www.w3.org/2000/svg", type );
286
    },    
355
    },    
287
    
356
288
    _createRect : function() {
357
    _createRect : function() {
289
      var result = {};
358
      var result = {};
290
      result.type = "svgRect";
359
      result.type = "svgRect";
Lines 296-302 Link Here
296
      result.node = node;
365
      result.node = node;
297
      return result;      
366
      return result;      
298
    },
367
    },
299
    
368
300
    _setXLink : function( node, value ) {
369
    _setXLink : function( node, value ) {
301
      node.setAttributeNS( "http://www.w3.org/1999/xlink", "href", value );
370
      node.setAttributeNS( "http://www.w3.org/1999/xlink", "href", value );
302
    },
371
    },
Lines 308-321 Link Here
308
      result.node = node;
377
      result.node = node;
309
      return result;      
378
      return result;      
310
    },
379
    },
311
    
380
312
    _addNewDefinition : function( shape, node, id ) {
381
    _addNewDefinition : function( shape, node, id ) {
313
      shape.defNodes[ id ] = node;
382
      shape.defNodes[ id ] = node;
314
      if( shape.parent != null ) {     
383
      if( shape.parent != null ) {     
315
        shape.parent.defsNode.appendChild( node );
384
        shape.parent.defsNode.appendChild( node );
316
      }
385
      }
317
    },
386
    },
318
    
387
319
    // TODO [tb] : optimize so only the currently needed defs. are attached?
388
    // TODO [tb] : optimize so only the currently needed defs. are attached?
320
    _attachDefinitions : function( shape ) {
389
    _attachDefinitions : function( shape ) {
321
      for( var id in shape.defNodes ) {
390
      for( var id in shape.defNodes ) {
Lines 323-340 Link Here
323
        shape.parent.defsNode.appendChild( node );
392
        shape.parent.defsNode.appendChild( node );
324
      }
393
      }
325
    },
394
    },
326
    
395
327
    _detachDefinitions : function( shape ) {
396
    _detachDefinitions : function( shape ) {
328
      for( var id in shape.defNodes ) {
397
      for( var id in shape.defNodes ) {
329
        var node = shape.defNodes[ id ];
398
        var node = shape.defNodes[ id ];
330
        node.parentNode.removeChild( node );
399
        node.parentNode.removeChild( node );
331
      }
400
      }
332
    },
401
    },
333
    
402
334
    _convertNumeric : function( value ) {
403
    _convertNumeric : function( value ) {
335
      return typeof value == "string" ? value : value + "px";
404
      return typeof value == "string" ? value : value + "px";
336
    },
405
    },
337
   
406
338
    _redrawWebkit : function( shape ) {      
407
    _redrawWebkit : function( shape ) {      
339
      var wrapper = function() {
408
      var wrapper = function() {
340
        org.eclipse.rwt.SVG._redrawWebkitCore( shape );
409
        org.eclipse.rwt.SVG._redrawWebkitCore( shape );
Lines 347-364 Link Here
347
        shape.node.style.webkitTransform = "scale(1)"; 
416
        shape.node.style.webkitTransform = "scale(1)"; 
348
      }
417
      }
349
    },
418
    },
350
    
419
351
    // TODO [tb] : remove if no longer needed:
420
    // TODO [tb] : remove if no longer needed:
352
    
421
353
    _dummyNode : null,
422
    _dummyNode : null,
354
    
423
355
    _getDummyNode : function() {
424
    _getDummyNode : function() {
356
      if( this._dummyNode == null ) {
425
      if( this._dummyNode == null ) {
357
        this._dummyNode = this._createNode( "rect" );
426
        this._dummyNode = this._createNode( "rect" );
358
      }
427
      }
359
      return this._dummyNode;
428
      return this._dummyNode;
360
    }
429
    }
361
    
430
362
  }
431
  }
363
432
364
} );
433
} );
(-)js/org/eclipse/rwt/VML.js (-20 / +83 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2010 EclipseSource and others. All rights reserved.
2
 * Copyright (c) 2010, 2011 EclipseSource and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the
3
 * This program and the accompanying materials are made available under the
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
Lines 66-71 Link Here
66
        case "roundrect":
66
        case "roundrect":
67
        case "custom":
67
        case "custom":
68
          result = this._createCustomShape();
68
          result = this._createCustomShape();
69
          result.blurRadius = 0;
69
        break;
70
        break;
70
        case "image":
71
        case "image":
71
          result = this._createImage();
72
          result = this._createImage();
Lines 86-97 Link Here
86
      return result;
87
      return result;
87
    },
88
    },
88
    
89
    
89
    addToCanvas : function( canvas, shape ) {
90
    addToCanvas : function( canvas, shape, beforeShape ) {
90
      var hash = qx.core.Object.toHashCode( shape );
91
      var hash = qx.core.Object.toHashCode( shape );
91
      canvas.children[ hash ] = shape;
92
      canvas.children[ hash ] = shape;
92
      canvas.node.appendChild( shape.node );
93
      //canvas.node.appendChild( shape.node );
94
      if( beforeShape ) {
95
        canvas.node.insertBefore( shape.node, beforeShape.node );
96
      } else {
97
        canvas.node.appendChild( shape.node );
98
      }
93
    },
99
    },
94
    
100
    
101
    enableOverflow : function( canvas ) {
102
      // nothing to do
103
    },
104
95
    removeFromCanvas : function( canvas, shape ) {
105
    removeFromCanvas : function( canvas, shape ) {
96
      var hash = qx.core.Object.toHashCode( shape );
106
      var hash = qx.core.Object.toHashCode( shape );
97
      delete canvas.children[ hash ];
107
      delete canvas.children[ hash ];
Lines 140-149 Link Here
140
      var radiusTopRight = this._convertNumeric( radii[ 1 ], false );
150
      var radiusTopRight = this._convertNumeric( radii[ 1 ], false );
141
      var radiusRightBottom = this._convertNumeric( radii[ 2 ], false );
151
      var radiusRightBottom = this._convertNumeric( radii[ 2 ], false );
142
      var radiusBottomLeft = this._convertNumeric( radii[ 3 ], false );
152
      var radiusBottomLeft = this._convertNumeric( radii[ 3 ], false );
143
      var rectLeft = this._convertNumeric( x, true );
153
      var bluroffsets = this._getBlurOffsets( shape.blurRadius );
144
      var rectTop = this._convertNumeric( y, true )
154
      var rectLeft = this._convertNumeric( x - bluroffsets[ 1 ], true );
145
      var rectWidth = this._convertNumeric( width, false );
155
      var rectTop = this._convertNumeric( y - bluroffsets[ 1 ], true )
146
      var rectHeight = this._convertNumeric( height, false );
156
      var rectWidth = this._convertNumeric( width - bluroffsets[ 2 ], false );
157
      var rectHeight = this._convertNumeric( height - bluroffsets[ 2 ], false );
147
      if(    ( radiusLeftTop + radiusTopRight ) > rectWidth
158
      if(    ( radiusLeftTop + radiusTopRight ) > rectWidth
148
          || ( radiusRightBottom  + radiusBottomLeft ) > rectWidth
159
          || ( radiusRightBottom  + radiusBottomLeft ) > rectWidth
149
          || ( radiusLeftTop + radiusBottomLeft ) > rectHeight
160
          || ( radiusLeftTop + radiusBottomLeft ) > rectHeight
Lines 338-347 Link Here
338
    },
349
    },
339
    
350
    
340
    setOpacity : function( shape, opacity ) {
351
    setOpacity : function( shape, opacity ) {
341
      org.eclipse.rwt.HtmlUtil.setOpacity( shape.node, opacity );
352
      shape.opacity = opacity;
353
      this._renderFilter( shape );
342
      this._setAntiAlias( shape, opacity < 1 );
354
      this._setAntiAlias( shape, opacity < 1 );
343
    },
355
    },
344
    
356
    
357
    getOpacity : function( shape ) {
358
      var result = 1;
359
      if( typeof shape.opacity === "number" && shape.opacity < 1 ) {
360
        result = shape.opacity;
361
      }
362
      return result;
363
    },
364
    
365
    setBlur : function( shape, radius ) {
366
      // NOTE: IE shifts the shape to the bottom-right, 
367
      // compensated ONLY in setRoundRectLayout
368
      shape.blurRadius = radius;
369
      this._renderFilter( shape );
370
    },
371
    
372
    getBlur : function( shape, radius ) {
373
      var result = 0;
374
      if( typeof shape.blurRadius === "number" && shape.blurRadius > 0 ) {
375
        result = shape.blurRadius;
376
      }
377
      return result;
378
    },
379
    
380
    _renderFilter : function( shape ) {
381
      var filterStr = [];
382
      var opacity = this.getOpacity( shape );
383
      var blurRadius = this.getBlur( shape );
384
      if( opacity < 1 ) {
385
        filterStr.push( "Alpha(opacity=" );
386
        filterStr.push( Math.round( opacity * 100 ) );
387
        filterStr.push( ")" );
388
      }
389
      if( blurRadius > 0 ) {
390
        filterStr.push( "progid:DXImageTransform.Microsoft.Blur(pixelradius=" ); 
391
        filterStr.push( this._getBlurOffsets( blurRadius )[ 0 ] );
392
        filterStr.push( ")" );
393
      }
394
      if( filterStr.length > 0 ) {
395
        shape.node.style.filter = filterStr.join( "" );
396
      } else {
397
        org.eclipse.rwt.HtmlUtil.removeCssFilter( shape.node );
398
      }
399
    },
400
    
345
    /////////
401
    /////////
346
    // helper
402
    // helper
347
403
Lines 519-537 Link Here
519
      shape.node.style.antialias = value;
575
      shape.node.style.antialias = value;
520
    },
576
    },
521
    
577
    
522
    _removeFilter : function( shape ) {
578
    _getBlurOffsets : function( blurradius ) {
523
      var str = shape.node.style.cssText;
579
      // returns [ blurradius, location-offset, dimension-offset ]
524
      var start = str.indexOf( "FILTER:" );
580
      var result;
525
      if( start != -1 ) {
581
      var offsets = this._BLUROFFSETS[ blurradius ];
526
        var end = str.indexOf( ";", start ) + 1;
582
      if( offsets !== undefined ) {
527
        var newStr = str.slice( 0, start );
583
        result = offsets;
528
        if( end !== -1 ) {
584
      } else {
529
           newStr += str.slice( end );
585
        result = [ blurradius, blurradius, 1 ];
530
        }
531
        shape.node.style.cssText = newStr;
532
      }
586
      }
533
    }
587
      return result;
534
588
    },
589
    
590
    _BLUROFFSETS : [
591
      // NOTE: these values are chosen to resemble the blur-effect on css3-shadows
592
      // as closely as possible, but in doubt going for the stronger effect. 
593
      [ 0, 0, 0 ],
594
      [ 2, 2, 1 ],
595
      [ 3, 3, 1 ], 
596
      [ 4, 4, 1 ] 
597
    ]
535
  }
598
  }
536
599
537
} );
600
} );
(-)js/org/eclipse/swt/theme/AppearancesBase.js (+1 lines)
Lines 455-460 Link Here
455
      result.minWidth = states.rwt_TITLE ? 80 : 5;
455
      result.minWidth = states.rwt_TITLE ? 80 : 5;
456
      result.minHeight = states.rwt_TITLE ? 25 : 5;
456
      result.minHeight = states.rwt_TITLE ? 25 : 5;
457
      result.opacity = tv.getCssFloat( "Shell", "opacity" );
457
      result.opacity = tv.getCssFloat( "Shell", "opacity" );
458
      result.shadow = tv.getCssShadow( "Shell", "box-shadow" );
458
      return result;
459
      return result;
459
    }
460
    }
460
  },
461
  },
(-)js/org/eclipse/swt/theme/ThemeStore.js (-2 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2010 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2007, 2011 Innoopract Informationssysteme GmbH.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 31-37 Link Here
31
      colors : {},
31
      colors : {},
32
      borders : {},
32
      borders : {},
33
      cursors : {},
33
      cursors : {},
34
      animations : {}
34
      animations : {},
35
      shadows : {}
35
    };
36
    };
36
    this._cssValues = {};
37
    this._cssValues = {};
37
    this._statesMap = {
38
    this._statesMap = {
(-)js/org/eclipse/swt/theme/ThemeValues.js (-1 / +8 lines)
Lines 168-174 Link Here
168
    getCssAnimation : function( element, key ) {
168
    getCssAnimation : function( element, key ) {
169
      var vkey = this._store.getCssValue( element, this._states, key );
169
      var vkey = this._store.getCssValue( element, this._states, key );
170
      var values = this._store.getThemeValues();
170
      var values = this._store.getThemeValues();
171
      var result = values.animations[ vkey ];      
171
      var result = values.animations[ vkey ];
172
      return result;
173
    },
174
175
    getCssShadow : function( element, key ) {
176
      var vkey = this._store.getCssValue( element, this._states, key );
177
      var values = this._store.getThemeValues();
178
      var result = values.shadows[ vkey ];
172
      return result;
179
      return result;
173
    }
180
    }
174
181
(-)js/org/eclipse/rwt/test/tests/GraphicsMixinTest.js (-28 / +333 lines)
Lines 16-24 Link Here
16
	  this.cssBorder = new qx.ui.core.Border( 1, "solid", "black" );
16
	  this.cssBorder = new qx.ui.core.Border( 1, "solid", "black" );
17
	  this.gradient = [ [ 0, "red" ], [ 1, "yellow" ] ];
17
	  this.gradient = [ [ 0, "red" ], [ 1, "yellow" ] ];
18
	},
18
	},
19
	
19
20
  members : {
20
  members : {
21
    
21
22
    testSetGradient : function() {
22
    testSetGradient : function() {
23
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
23
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
24
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
24
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
Lines 26-32 Link Here
26
      assertTrue( shell.isSeeable() );      
26
      assertTrue( shell.isSeeable() );      
27
      assertFalse( this.usesGfxBackground( shell ) );
27
      assertFalse( this.usesGfxBackground( shell ) );
28
      shell.setBackgroundGradient( this.gradient );
28
      shell.setBackgroundGradient( this.gradient );
29
      var shape = shell._gfxData.currentShape;
29
      var shape = shell._gfxData.backgroundShape;
30
      assertTrue( this.usesGfxBackground( shell ) );
30
      assertTrue( this.usesGfxBackground( shell ) );
31
      assertTrue( gfxUtil.getFillType( shape ) == "gradient" );
31
      assertTrue( gfxUtil.getFillType( shape ) == "gradient" );
32
      shell.setBackgroundGradient( null );
32
      shell.setBackgroundGradient( null );
Lines 35-41 Link Here
35
      shell.destroy();
35
      shell.destroy();
36
      testUtil.flush();
36
      testUtil.flush();
37
    },
37
    },
38
    
38
39
    testSetGradientWhileNotInDOM : function() {    
39
    testSetGradientWhileNotInDOM : function() {    
40
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
40
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
41
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
41
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
Lines 45-51 Link Here
45
      shell.setBackgroundGradient( this.gradient );
45
      shell.setBackgroundGradient( this.gradient );
46
      shell.addToDocument();
46
      shell.addToDocument();
47
      testUtil.flush();
47
      testUtil.flush();
48
      var shape = shell._gfxData.currentShape;
48
      var shape = shell._gfxData.backgroundShape;
49
      assertTrue( this.usesGfxBackground( shell ) );
49
      assertTrue( this.usesGfxBackground( shell ) );
50
      assertTrue( gfxUtil.getFillType( shape ) == "gradient" );
50
      assertTrue( gfxUtil.getFillType( shape ) == "gradient" );
51
      shell.setParent( null );
51
      shell.setParent( null );
Lines 65-71 Link Here
65
      shell.setBorder( this.gfxBorder );
65
      shell.setBorder( this.gfxBorder );
66
      testUtil.flush();
66
      testUtil.flush();
67
      assertTrue( this.usesGfxBackground( shell ) );
67
      assertTrue( this.usesGfxBackground( shell ) );
68
      var shape = shell._gfxData.currentShape;
68
      var shape = shell._gfxData.backgroundShape;
69
      assertNull( gfxUtil.getFillType( shape ) );
69
      assertNull( gfxUtil.getFillType( shape ) );
70
      shell.setBackgroundColor( "green" );
70
      shell.setBackgroundColor( "green" );
71
      assertEquals( "color", gfxUtil.getFillType( shape ) );
71
      assertEquals( "color", gfxUtil.getFillType( shape ) );
Lines 82-94 Link Here
82
      shell.setBorder( this.gfxBorder );
82
      shell.setBorder( this.gfxBorder );
83
      testUtil.flush();
83
      testUtil.flush();
84
      assertTrue( this.usesGfxBackground( shell ) );
84
      assertTrue( this.usesGfxBackground( shell ) );
85
      var shape = shell._gfxData.currentShape;
85
      var shape = shell._gfxData.backgroundShape;
86
      assertEquals( "color", gfxUtil.getFillType( shape ) );
86
      assertEquals( "color", gfxUtil.getFillType( shape ) );
87
      assertEquals( "green", gfxUtil.getFillColor( shape ) );
87
      assertEquals( "green", gfxUtil.getFillColor( shape ) );
88
      shell.destroy();
88
      shell.destroy();
89
      testUtil.flush();
89
      testUtil.flush();
90
    },
90
    },
91
    
91
92
    testRestoreBackgroundColor : function() {
92
    testRestoreBackgroundColor : function() {
93
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
93
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
94
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
94
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
Lines 102-108 Link Here
102
      shell.destroy();
102
      shell.destroy();
103
      testUtil.flush();
103
      testUtil.flush();
104
    },
104
    },
105
    
105
106
    testCssBorder : function() {
106
    testCssBorder : function() {
107
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
107
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
108
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
108
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
Lines 161-167 Link Here
161
      widget.setBorder( this.gfxBorder ); 
161
      widget.setBorder( this.gfxBorder ); 
162
      testUtil.flush();
162
      testUtil.flush();
163
      assertTrue( this.usesGfxBorder( widget ) );
163
      assertTrue( this.usesGfxBorder( widget ) );
164
      var shape = widget._gfxData.currentShape;
164
      var shape = widget._gfxData.backgroundShape;
165
      assertEquals( 0, gfxUtil.getStrokeWidth( shape ) );
165
      assertEquals( 0, gfxUtil.getStrokeWidth( shape ) );
166
      this.gfxBorder.setWidth( 2 );
166
      this.gfxBorder.setWidth( 2 );
167
      testUtil.flush();
167
      testUtil.flush();
Lines 172-178 Link Here
172
      widget.destroy();
172
      widget.destroy();
173
      testUtil.flush();
173
      testUtil.flush();
174
    },
174
    },
175
        
175
176
    testOutline : function() {
176
    testOutline : function() {
177
      // in Safari the outline must always be set because the default 
177
      // in Safari the outline must always be set because the default 
178
      // outline is visually incompatible with SVG (glitch)
178
      // outline is visually incompatible with SVG (glitch)
Lines 200-206 Link Here
200
      shell.destroy();
200
      shell.destroy();
201
      testUtil.flush();     
201
      testUtil.flush();     
202
    },
202
    },
203
    
203
204
    testGfxRadiusInvisibleEdges : function() {
204
    testGfxRadiusInvisibleEdges : function() {
205
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
205
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
206
      var widget = new org.eclipse.rwt.widgets.MultiCellWidget( [] ); 
206
      var widget = new org.eclipse.rwt.widgets.MultiCellWidget( [] ); 
Lines 220-226 Link Here
220
      widget.destroy();
220
      widget.destroy();
221
      testUtil.flush();      
221
      testUtil.flush();      
222
    },
222
    },
223
    
223
224
    testGfxRadiusInvisibleBorder : function() {
224
    testGfxRadiusInvisibleBorder : function() {
225
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
225
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
226
      var widget = new org.eclipse.rwt.widgets.MultiCellWidget( [] ); 
226
      var widget = new org.eclipse.rwt.widgets.MultiCellWidget( [] ); 
Lines 250-261 Link Here
250
      qx.ui.core.Widget.flushGlobalQueues();
250
      qx.ui.core.Widget.flushGlobalQueues();
251
      assertTrue( this.usesGfxBackground( widget ) );
251
      assertTrue( this.usesGfxBackground( widget ) );
252
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
252
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
253
      var shape = widget._gfxData.currentShape;
253
      var shape = widget._gfxData.backgroundShape;
254
      assertTrue( gfxUtil.getFillType( shape ) == "pattern" );
254
      assertTrue( gfxUtil.getFillType( shape ) == "pattern" );
255
      widget.destroy();
255
      widget.destroy();
256
      qx.ui.core.Widget.flushGlobalQueues();
256
      qx.ui.core.Widget.flushGlobalQueues();
257
    },
257
    },
258
    
258
259
    testGfxBackgroundColorToImage : function() {
259
    testGfxBackgroundColorToImage : function() {
260
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
260
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
261
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
261
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
Lines 264-270 Link Here
264
      shell.setBorder( this.gfxBorder );
264
      shell.setBorder( this.gfxBorder );
265
      testUtil.flush();
265
      testUtil.flush();
266
      assertTrue( this.usesGfxBackground( shell ) );
266
      assertTrue( this.usesGfxBackground( shell ) );
267
      var shape = shell._gfxData.currentShape;
267
      var shape = shell._gfxData.backgroundShape;
268
      assertEquals( "color", gfxUtil.getFillType( shape ) );
268
      assertEquals( "color", gfxUtil.getFillType( shape ) );
269
      shell.setBackgroundImage( "bla.jpg" );
269
      shell.setBackgroundImage( "bla.jpg" );
270
      testUtil.flush();
270
      testUtil.flush();
Lines 356-362 Link Here
356
      assertFalse( testUtil.hasElementOpacity( widget._getTargetNode() ) );
356
      assertFalse( testUtil.hasElementOpacity( widget._getTargetNode() ) );
357
      widget.destroy();
357
      widget.destroy();
358
    },
358
    },
359
    
359
360
    testAntialiasingBugIE : qx.core.Variant.select("qx.client", {
360
    testAntialiasingBugIE : qx.core.Variant.select("qx.client", {
361
      "mshtml" : function() {
361
      "mshtml" : function() {
362
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
362
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
Lines 373-380 Link Here
373
      },
373
      },
374
      "default" : function(){}
374
      "default" : function(){}
375
    } ),
375
    } ),
376
    
376
377
    
378
    testAntialiasingBugIEWithOpacitySet : qx.core.Variant.select("qx.client", {
377
    testAntialiasingBugIEWithOpacitySet : qx.core.Variant.select("qx.client", {
379
      "mshtml" : function() {
378
      "mshtml" : function() {
380
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
379
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
Lines 397-403 Link Here
397
      },
396
      },
398
      "default" : function(){}
397
      "default" : function(){}
399
    } ),
398
    } ),
400
401
    
399
    
402
    testSetBackgroundImageOverwritesGradient : function() {
400
    testSetBackgroundImageOverwritesGradient : function() {
403
      // Note: a gradient and background-image can note be set at the same
401
      // Note: a gradient and background-image can note be set at the same
Lines 414-424 Link Here
414
      testUtil.flush();
412
      testUtil.flush();
415
      assertTrue( this.usesGfxBackground( widget ) );
413
      assertTrue( this.usesGfxBackground( widget ) );
416
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
414
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
417
      var shape = widget._gfxData.currentShape;
415
      var shape = widget._gfxData.backgroundShape;
418
      assertEquals( "pattern", gfxUtil.getFillType( shape )  );
416
      assertEquals( "pattern", gfxUtil.getFillType( shape )  );
419
      widget.destroy();
417
      widget.destroy();
420
    },
418
    },
421
    
419
422
    testChangeBackgroundImageWhileBackgoundGradientSet : function() {
420
    testChangeBackgroundImageWhileBackgoundGradientSet : function() {
423
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
421
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
424
      var widget = new org.eclipse.rwt.widgets.MultiCellWidget( [] ); 
422
      var widget = new org.eclipse.rwt.widgets.MultiCellWidget( [] ); 
Lines 440-445 Link Here
440
      widget.destroy();
438
      widget.destroy();
441
    },
439
    },
442
    
440
    
441
    testSetShadowCreatesCanvas : function() {
442
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
443
        var widget = this._createWidget();
444
        widget.setShadow( [ false, 10, 10, 10, 3, "#ff00ff", 1 ] );
445
        assertTrue( this.widgetContainsCanvas( widget ) );
446
        widget.setShadow( null );
447
        assertFalse( this.widgetContainsCanvas( widget ) );
448
        widget.destroy();
449
      }
450
    },
451
    
452
    testSetShadowCreatesShape : function() {
453
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
454
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
455
        var widget = this._createWidget();
456
        widget.setShadow( [ false, 10, 10, 10, 3, "#ff00ff", 1 ] );
457
        var canvas = this._getCanvasGroupNode( widget._gfxCanvas );
458
        var shape = widget._gfxData.shadowShape.node;
459
        assertTrue( shape.parentNode === canvas );
460
        widget.setShadow( null );
461
        assertTrue( shape.parentNode !== canvas );
462
        widget.setShadow( [ false, 10, 10, 10, 3, "#ff00ff", 1 ] );
463
        assertTrue( shape.parentNode === canvas );
464
        widget.destroy();
465
      }
466
    },
467
    
468
    testDisableShadow : function() {
469
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
470
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
471
        var widget = this._createWidget();
472
        widget.setBackgroundGradient( this.gradient );
473
        widget.setBorder( this.gfxBorder );
474
        widget.setShadow( [ false, 10, 10, 10, 3, "#ff00ff", 1 ] );
475
        var canvas = this._getCanvasGroupNode( widget._gfxCanvas );
476
        var shape = widget._gfxData.shadowShape.node;
477
        assertTrue( shape.parentNode === canvas );
478
        widget.setShadow( null );
479
        assertTrue( shape.parentNode !== canvas );
480
        widget.destroy();
481
      }
482
    },
483
    
484
    testSetShadowEnablesOverflow : function() {
485
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
486
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
487
        var widget = this._createWidget();
488
        widget.setShadow( [ false, 10, 10, 10, 3, "#ff00ff", 1 ] );
489
        var canvas = widget._gfxCanvas;
490
        var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" );
491
        if( !isMshtml )  {
492
          assertTrue( canvas.node !== canvas.group );
493
        }
494
        var node = gfxUtil.getCanvasNode( canvas );
495
        var pointerEvents = node.style.pointerEvents === "none";
496
        // indicates that HtmlUtil.passEventsThrough is activated:
497
        var cursorDefault = node.style.cursor === "default"; 
498
        assertTrue( pointerEvents || cursorDefault );
499
        widget.destroy();
500
      }
501
    },
502
503
    testSetShadowAndGradient : function() {
504
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
505
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
506
        var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
507
        var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" );
508
        var childOffset = isMshtml ? 0 : 1;// Count defs-node
509
        var widget = this._createWidget();
510
        widget.setBackgroundGradient( this.gradient );
511
        testUtil.flush();
512
        widget.setShadow( [ false, 10, 10, 10, 3, "#ff00ff", 1 ] );
513
        var canvasNode = this._getCanvasGroupNode( widget._gfxCanvas );
514
        var shadow = widget._gfxData.shadowShape.node;
515
        var background = widget._gfxData.backgroundShape.node;
516
        assertEquals( 2 + childOffset, canvasNode.childNodes.length );  
517
        assertIdentical( canvasNode, background.parentNode );
518
        assertIdentical( canvasNode, shadow.parentNode );
519
        assertIdentical( shadow, canvasNode.childNodes[ 0 + childOffset ] );
520
        assertIdentical( background, canvasNode.childNodes[ 1 + childOffset ] );
521
        widget.setBackgroundGradient( null );
522
        testUtil.flush();
523
        assertFalse( background.parentNode === canvasNode );
524
        assertIdentical( canvasNode, shadow.parentNode );
525
        assertEquals( 1 + childOffset, canvasNode.childNodes.length );
526
        widget.destroy();
527
      }
528
    },
529
    
530
    testSetShadowBeforeCreate : function() {
531
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
532
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
533
        var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
534
        var widget = this._createWidget( true );
535
        widget.setShadow( [ false, 10, 10, 10, 3, "#ff00ff", 1 ] );
536
        testUtil.flush();
537
        var canvas = this._getCanvasGroupNode( widget._gfxCanvas );
538
        var shadow = widget._gfxData.shadowShape.node;
539
        assertIdentical( canvas, shadow.parentNode );
540
        widget.destroy();
541
      }
542
    },
543
    
544
    testRemoveGradientSetShadow : function() {
545
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
546
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
547
        var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
548
        var widget = this._createWidget();
549
        widget.setBackgroundGradient( this.gradient );
550
        testUtil.flush();
551
        var canvas = this._getCanvasGroupNode( widget._gfxCanvas );
552
        var background = widget._gfxData.backgroundShape.node;
553
        assertTrue( canvas === background.parentNode );
554
        widget.setBackgroundGradient( null );
555
        widget.setShadow( [ false, 10, 10, 10, 3, "#ff00ff", 1 ] );
556
        canvas = this._getCanvasGroupNode( widget._gfxCanvas );
557
        var shadow = widget._gfxData.shadowShape.node;
558
        assertTrue( canvas === shadow.parentNode );
559
        assertFalse( canvas === background.parentNode );
560
        widget.destroy();
561
      }
562
    },
563
564
    testSetShadowColorAndOpacity : function() {
565
      // Note: In the CSS3 speficifcation the opacity is part of the color,
566
      // for simplicity this is a sepearate value in our shadow-array.
567
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
568
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
569
        var widget = this._createWidget();
570
        widget.setShadow( [ false, 10, 10, 3, 10, "#ff00ff", 1 ] );
571
        var shape = widget._gfxData.shadowShape;
572
        assertEquals( 3, gfxUtil.getBlur( shape ) );
573
        assertEquals( "#ff00ff", gfxUtil.getFillColor( shape ) );
574
        assertEquals( 1, gfxUtil.getOpacity( shape ) );
575
        widget.setShadow( [ false, 10, 10, 5, 10, "#000000", 0.5 ] );
576
        assertEquals( 5, gfxUtil.getBlur( shape ) );
577
        assertEquals( "#000000", gfxUtil.getFillColor( shape ) );
578
        assertEquals( 0.5, gfxUtil.getOpacity( shape ) );
579
        widget.setShadow( [ false, 10, 10, 0, 0, "#ffffff", 0.5 ] );
580
        assertEquals( 0, gfxUtil.getBlur( shape ) );
581
        assertEquals( "#ffffff", gfxUtil.getFillColor( shape ) );
582
        assertEquals( 0.5, gfxUtil.getOpacity( shape ) );
583
        widget.destroy();
584
      }
585
    },
586
    
587
    testBasicShadowLayout : function() {
588
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
589
        var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
590
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
591
        var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" );
592
        var widget = this._createWidget();
593
        widget.setShadow( [ false, 0, 0, 0, 0, "#000000", 1 ] );
594
        var shape = widget._gfxData.shadowShape;
595
        var expected1;
596
        var expected2;
597
        if( isMshtml ) {
598
          expected1 = " m-5,-5 l995,-5,995,995,-5,995 xe";
599
          expected2 = " m-5,-5 l1195,-5,1195,1495,-5,1495 xe";
600
        } else {
601
          expected1 = "M 0 0 L 100 0 100 0 L 100 100 100 100 L 0 100 0 100 Z";
602
          expected2 = "M 0 0 L 120 0 120 0 L 120 150 120 150 L 0 150 0 150 Z";
603
        }
604
        assertEquals( expected1, this._getPath( shape ) );
605
        widget.setWidth( 120 );
606
        widget.setHeight( 150 );
607
        testUtil.flush();
608
        assertEquals( expected2, this._getPath( shape ) );
609
        widget.destroy();
610
      }
611
    },
612
    
613
    testRoundedShadowLayout : function() {
614
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
615
        var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
616
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
617
        var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" );
618
        var widget = this._createWidget();
619
        widget.setShadow( [ false, 0, 0, 0, 0, "#000000", 1 ] );
620
        this.gfxBorder.setRadius( 5 );
621
        widget.setBorder( this.gfxBorder );
622
        testUtil.flush(); 
623
        var shape = widget._gfxData.shadowShape;
624
        var expected1;
625
        var expected2;
626
        if( isMshtml ) {
627
          expected1 = " al45,45,50,50,-11796300,-5898150 ae945,45,50,50,-17694450,-5898150 ae945,945,50,50,0,-5898150 ae45,945,50,50,-5898150,-5898150 x e";
628
          expected2 = " m-5,-5 l995,-5,995,995,-5,995 xe";
629
        } else {
630
          expected1 = "M 0 5 A 5 5 0 0 1 5 0 L 95 0 A 5 5 0 0 1 100 5 L 100 95 A 5 5 0 0 1 95 100 L 5 100 A 5 5 0 0 1 0 95 Z";
631
          expected2 = "M 0 0 L 100 0 100 0 L 100 100 100 100 L 0 100 0 100 Z";
632
        }
633
        assertEquals( expected1, this._getPath( shape ) );
634
        widget.setBorder( null );
635
        testUtil.flush();
636
        assertEquals( expected2, this._getPath( shape ) );
637
        widget.destroy();
638
      }
639
    },
640
641
    testShiftShadowLayout : function() {
642
      if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
643
        var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
644
        var gfxUtil = org.eclipse.rwt.GraphicsUtil;
645
        var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" );
646
        var widget = this._createWidget();
647
        widget.setShadow( [ false, 3, 5, 0, 0, "#000000", 1 ] );
648
        var shape = widget._gfxData.shadowShape;
649
        var expected1;
650
        var expected2;
651
        if( isMshtml ) {
652
          expected1 = " m55,35 l1055,35,1055,1035,55,1035 xe";
653
          expected2 = " m55,35 l1255,35,1255,1535,55,1535 xe";
654
        } else {
655
          expected1 = "M 6 4 L 106 4 106 4 L 106 104 106 104 L 6 104 6 104 Z";
656
          expected2 = "M 6 4 L 126 4 126 4 L 126 154 126 154 L 6 154 6 154 Z";
657
        }
658
        widget.setShadow( [ false, 6, 4, 0, 0, "#000000", 1 ] );
659
        assertEquals( expected1, this._getPath( shape ) );
660
        widget.setWidth( 120 );
661
        widget.setHeight( 150 );
662
        testUtil.flush();
663
        assertEquals( expected2, this._getPath( shape ) );
664
        widget.destroy();
665
      }
666
    },
667
    
668
    testEnableDisableOverflowForShadow : qx.core.Variant.select("qx.client", {
669
      "mshtml" : function() {
670
      },
671
      "default" : function(){
672
        if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {  
673
          var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
674
          var gfxUtil = org.eclipse.rwt.GraphicsUtil;
675
          var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" );
676
          var widget = this._createWidget();
677
          widget.setShadow( [ false, -3, -5, 4, 0, "#000000", 1 ] );
678
          testUtil.flush();
679
          var canvas = widget._gfxCanvas;
680
          assertEquals( "108px", canvas.node.style.width );
681
          assertEquals( "109px", canvas.node.style.height );
682
          assertEquals( "-7px", canvas.node.style.left );
683
          assertEquals( "-9px", canvas.node.style.top );
684
          widget.setShadow( [ false, 3, 5, 2, 0, "#000000", 1 ] );
685
          testUtil.flush();
686
          assertTrue( canvas.node.style.left == "0px" );
687
          assertTrue( canvas.node.style.top == "0px" );
688
          assertTrue( canvas.node.style.width == "105px" );
689
          assertTrue( canvas.node.style.height == "107px" );
690
          widget.setShadow( null );
691
          testUtil.flush();
692
          assertTrue( canvas.node.style.left == "0px" );
693
          assertTrue( canvas.node.style.top == "0px" );
694
          assertTrue( canvas.node.style.width == "100%" );
695
          assertTrue( canvas.node.style.height == "100%" );
696
          widget.destroy();
697
        }
698
      }
699
    } ),
700
    
701
702
    testLayoutTargetNodeAfterBorderRemove : qx.core.Variant.select("qx.client", {
703
      "mshtml" : function() {
704
        if( org.eclipse.rwt.GraphicsMixin.getSupportsShadows() ) {
705
          var gfxUtil = org.eclipse.rwt.GraphicsUtil;
706
          var widget = this._createWidget();
707
          widget.setBorder( this.gfxBorder );
708
          testUtil.flush();
709
          assertTrue( this.widgetContainsCanvas( widget ) );
710
          widget.setBorder( null );
711
          assertFalse( this.widgetContainsCanvas( widget ) );
712
          widget.setWidth( 400 );
713
          testUtil.flush();
714
          assertEquals( "400px", widget._getTargetNode().style.width );
715
          widget.destroy();
716
        }
717
      },
718
      "default" : function(){}
719
    } ),
443
    /////////
720
    /////////
444
    // Helper
721
    // Helper
445
722
Lines 447-474 Link Here
447
      var result = new org.eclipse.swt.widgets.Shell();
724
      var result = new org.eclipse.swt.widgets.Shell();
448
      result.addToDocument();
725
      result.addToDocument();
449
      result.setBackgroundColor( null );
726
      result.setBackgroundColor( null );
727
      result.setShadow( null );
450
      result.open();
728
      result.open();
451
      qx.ui.core.Widget.flushGlobalQueues();
729
      qx.ui.core.Widget.flushGlobalQueues();
452
      return result;      
730
      return result;      
453
    },
731
    },
454
    
732
455
    _createWidget : function() {
733
    _createWidget : function( noFlush ) {
734
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
456
      var result = new org.eclipse.rwt.widgets.MultiCellWidget( [] );
735
      var result = new org.eclipse.rwt.widgets.MultiCellWidget( [] );
457
      result.addToDocument();
736
      result.addToDocument();
458
      result.setLocation( 0, 0 );
737
      result.setLocation( 0, 0 );
459
      result.setDimension( 100, 100 );
738
      result.setDimension( 100, 100 );
460
      qx.ui.core.Widget.flushGlobalQueues();
739
      if( !noFlush ) {
740
        testUtil.flush();
741
      }
461
      return result;
742
      return result;
462
    },
743
    },
463
744
464
    usesGfxBorder : function( widget ) {      
745
    usesGfxBorder : function( widget ) {      
465
      return    widget._gfxBorderEnabled 
746
      return    widget._gfxBorderEnabled 
466
             && this.widgetContainsCanvas( widget )
747
             && this.widgetContainsCanvas( widget )
467
             && widget._gfxData.currentShape == widget._gfxData.pathElement; 
748
             && widget._gfxData.backgroundShape == widget._gfxData.pathElement; 
468
    },
749
    },
469
750
470
    usesGfxBackground : function( widget ) {
751
    usesGfxBackground : function( widget ) {
471
      var result =    widget._gfxBackgroundEnabled 
752
      var canvas = widget._gfxCanvas;
753
      var shape = widget._gfxData ? widget._gfxData.backgroundShape : null;
754
      var shapeInsert = false;
755
      if( canvas && shape ) {
756
        var parent = this._getCanvasGroupNode( widget._gfxCanvas );
757
        var child = shape.node;
758
        shapeInsert = parent === child.parentNode;
759
      }
760
      var result =    shapeInsert
761
                   && widget._gfxBackgroundEnabled 
472
                   && this.widgetContainsCanvas( widget );
762
                   && this.widgetContainsCanvas( widget );
473
      return result;
763
      return result;
474
    },
764
    },
Lines 508-519 Link Here
508
      }
798
      }
509
      return result;
799
      return result;
510
    },
800
    },
511
    
801
512
    getBorderCache : function( widget ) {
802
    getBorderCache : function( widget ) {
513
      return [ widget._cachedBorderTop,
803
      return [ widget._cachedBorderTop,
514
               widget._cachedBorderRight,
804
               widget._cachedBorderRight,
515
               widget._cachedBorderBottom,
805
               widget._cachedBorderBottom,
516
               widget._cachedBorderLeft ];
806
               widget._cachedBorderLeft ];
807
    },
808
    
809
    _getPath : function( shape ) {
810
      var result = null;
811
      var isMshtml = qx.core.Variant.isSet( "qx.client", "mshtml" );
812
      if( isMshtml ) {
813
        result = shape.node.path.v;
814
      } else {
815
        result = shape.node.getAttribute( "d" );
816
      }
817
      return result;
818
    },
819
    
820
    _getCanvasGroupNode : function( canvas ) {
821
      return canvas.group ? canvas.group : canvas.node;
517
    }
822
    }
518
823
519
  }
824
  }
(-)js/org/eclipse/rwt/test/tests/ProgressBarTest.js (+1 lines)
Lines 105-110 Link Here
105
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
105
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
106
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
106
      var gfxUtil = org.eclipse.rwt.GraphicsUtil;
107
      var shell = new org.eclipse.swt.widgets.Shell();
107
      var shell = new org.eclipse.swt.widgets.Shell();
108
      shell.setShadow( null );
108
      shell.addToDocument();
109
      shell.addToDocument();
109
      shell.setBackgroundColor( null );
110
      shell.setBackgroundColor( null );
110
      shell.open();
111
      shell.open();
(-)js/org/eclipse/rwt/test/tests/SVGTest.js (+106 lines)
Lines 250-255 Link Here
250
      }
250
      }
251
      assertEquals( "pattern", gfxUtil.getFillType( shape ) );
251
      assertEquals( "pattern", gfxUtil.getFillType( shape ) );
252
      parent.removeChild( gfxUtil.getCanvasNode( canvas ) );
252
      parent.removeChild( gfxUtil.getCanvasNode( canvas ) );
253
    },
254
255
    testBlurFilter : function() {
256
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
257
      var gfxUtil = org.eclipse.rwt.GraphicsUtil
258
      var canvas = gfxUtil.createCanvas();
259
      var parent = document.body;
260
      var shape = gfxUtil.createShape( "rect" );
261
      gfxUtil.setRectBounds( shape, 10, 10, 100, 100 );
262
      gfxUtil.setBlur( shape, 4 );
263
      gfxUtil.addToCanvas( canvas, shape );
264
      parent.appendChild( gfxUtil.getCanvasNode( canvas ) );
265
      gfxUtil.handleAppear( canvas );
266
      var hash = qx.core.Object.toHashCode( shape );
267
      var expected = "url(#filter_" + hash + ")"; 
268
      assertEquals( expected, shape.node.getAttribute( "filter" ) );
269
      var filterNode = canvas.defsNode.firstChild;
270
      assertEquals( "filter", filterNode.tagName ); 
271
      assertEquals( "filter_" + hash, filterNode.getAttribute( "id" ) ); 
272
      assertEquals( "feGaussianBlur", filterNode.firstChild.tagName ); 
273
      assertEquals( "2", filterNode.firstChild.getAttribute( "stdDeviation" ) ); 
274
      assertEquals( "4", gfxUtil.getBlur( shape ) ); 
275
      gfxUtil.setBlur( shape, 0 );
276
      assertEquals( "none", shape.node.getAttribute( "filter" ) );
277
      assertEquals( "0", gfxUtil.getBlur( shape ) ); 
278
      gfxUtil.setBlur( shape, 2 );
279
      assertEquals( expected, shape.node.getAttribute( "filter" ) );
280
      assertEquals( "1", filterNode.firstChild.getAttribute( "stdDeviation" ) );
281
      assertEquals( "2", gfxUtil.getBlur( shape ) ); 
282
      gfxUtil.setBlur( shape, 2 );
283
      parent.removeChild( gfxUtil.getCanvasNode( canvas ) );
284
    },
285
286
    testOpacity : function() {
287
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
288
      var gfxUtil = org.eclipse.rwt.GraphicsUtil
289
      var canvas = gfxUtil.createCanvas();
290
      var parent = document.body;
291
      var shape = gfxUtil.createShape( "rect" );
292
      gfxUtil.setRectBounds( shape, 10, 10, 100, 100 );
293
      assertEquals( 0, gfxUtil.getOpacity( shape ) );
294
      gfxUtil.setOpacity( shape, 0.4 );
295
      gfxUtil.addToCanvas( canvas, shape );
296
      parent.appendChild( gfxUtil.getCanvasNode( canvas ) );
297
      gfxUtil.handleAppear( canvas );
298
      assertEquals( 0.4, shape.node.getAttribute( "opacity" ) );
299
      assertEquals( 0.4, gfxUtil.getOpacity( shape ) );
300
      parent.removeChild( gfxUtil.getCanvasNode( canvas ) );
301
    },
302
    
303
    testNodeOrder : function() {
304
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
305
      var gfxUtil = org.eclipse.rwt.GraphicsUtil
306
      var parent = document.body;
307
      canvas = gfxUtil.createCanvas();
308
      parent.appendChild( gfxUtil.getCanvasNode( canvas ) );
309
      gfxUtil.handleAppear( canvas );
310
      var shape1 = gfxUtil.createShape( "rect" );
311
      var shape2 = gfxUtil.createShape( "rect" );
312
      var shape3 = gfxUtil.createShape( "rect" );
313
      gfxUtil.addToCanvas( canvas, shape1 );
314
      gfxUtil.addToCanvas( canvas, shape3 );
315
      gfxUtil.addToCanvas( canvas, shape2, shape3 );
316
      var nodes = canvas.node.childNodes;
317
      assertIdentical( nodes[ 1 ], shape1.node );
318
      assertIdentical( nodes[ 2 ], shape2.node );
319
      assertIdentical( nodes[ 3 ], shape3.node );
320
      parent.removeChild( canvas.node );
321
    },
322
    
323
    testEnableOverflow : function() {
324
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
325
      var gfxUtil = org.eclipse.rwt.GraphicsUtil
326
      var parent = document.body;
327
      canvas = gfxUtil.createCanvas();
328
      parent.appendChild( gfxUtil.getCanvasNode( canvas ) );
329
      gfxUtil.handleAppear( canvas );
330
      var shape = gfxUtil.createShape( "rect" );
331
      gfxUtil.addToCanvas( canvas, shape );
332
      assertIdentical( canvas.node, canvas.group );
333
      assertIdentical( canvas.node, shape.node.parentNode );
334
      gfxUtil.enableOverflow( canvas, 50, 30, 150, 140 );
335
      assertEquals( "-50px", canvas.node.style.left );
336
      assertEquals( "-30px", canvas.node.style.top );
337
      assertEquals( "200px", canvas.node.style.width );
338
      assertEquals( "170px", canvas.node.style.height );
339
      assertIdentical( canvas.node, canvas.group.parentNode );
340
      assertIdentical( canvas.group, shape.node.parentNode );
341
      var transform = canvas.group.getAttribute( "transform" );
342
      transform = transform.split( " " ).join( "" );
343
      assertEquals( "translate(50,30)", transform );
344
      gfxUtil.enableOverflow( canvas, 0, 0, 110, 120 );
345
      assertEquals( "0px", canvas.node.style.left );
346
      assertEquals( "0px", canvas.node.style.top );
347
      assertEquals( "110px", canvas.node.style.width );
348
      assertEquals( "120px", canvas.node.style.height );
349
      assertIdentical( canvas.node, canvas.group.parentNode );
350
      assertIdentical( canvas.group, shape.node.parentNode );
351
      var transform = canvas.group.getAttribute( "transform" );
352
      assertEquals( "", transform );
353
      gfxUtil.enableOverflow( canvas, 0, 0, null, null );
354
      assertEquals( "0px", canvas.node.style.left );
355
      assertEquals( "0px", canvas.node.style.top );
356
      assertEquals( "100%", canvas.node.style.width );
357
      assertEquals( "100%", canvas.node.style.height );
358
      parent.removeChild( canvas.node );
253
    }
359
    }
254
360
255
  }
361
  }
(-)js/org/eclipse/rwt/test/tests/VMLTest.js (-1 / +71 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2010 EclipseSource and others. All rights reserved.
2
 * Copyright (c) 2010, 2011 EclipseSource and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the
3
 * This program and the accompanying materials are made available under the
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
Lines 241-250 Link Here
241
      gfxUtil.setOpacity( shape, 0.5 );
241
      gfxUtil.setOpacity( shape, 0.5 );
242
      assertTrue( shape.node.style.cssText.indexOf( "FILTER:" ) != -1 );
242
      assertTrue( shape.node.style.cssText.indexOf( "FILTER:" ) != -1 );
243
      assertTrue( shape.node.style.filter.indexOf( "opacity=50" ) != -1 );
243
      assertTrue( shape.node.style.filter.indexOf( "opacity=50" ) != -1 );
244
      assertEquals( 0.5, gfxUtil.getOpacity( shape ) ); 
244
      gfxUtil.setOpacity( shape, 1 );
245
      gfxUtil.setOpacity( shape, 1 );
245
      // It is important for some issues that filter is completely removed:
246
      // It is important for some issues that filter is completely removed:
246
      assertTrue( shape.node.style.cssText.indexOf( "FILTER:" ) == -1 );
247
      assertTrue( shape.node.style.cssText.indexOf( "FILTER:" ) == -1 );
248
      assertEquals( 1, gfxUtil.getOpacity( shape ) ); 
247
      parentNode.removeChild( gfxUtil.getCanvasNode( canvas ) );      
249
      parentNode.removeChild( gfxUtil.getCanvasNode( canvas ) );      
250
    },
251
252
    testBlur : function() {
253
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
254
      var gfxUtil = org.eclipse.rwt.GraphicsUtil
255
      testUtil.flush();
256
      var parentNode = document.body;
257
      var canvas = gfxUtil.createCanvas();
258
      parentNode.appendChild( gfxUtil.getCanvasNode( canvas ) );
259
      var shape = gfxUtil.createShape( "rect" );
260
      gfxUtil.addToCanvas( canvas, shape );
261
      gfxUtil.setBlur( shape, 4 );
262
      assertTrue( shape.node.style.cssText.indexOf( "FILTER:" ) != -1 );
263
      var filter = shape.node.style.filter;
264
      var expected = "progid:DXImageTransform.Microsoft.Blur(pixelradius=4)";
265
      assertTrue( filter.indexOf( expected ) != -1 );
266
      assertEquals( 4, gfxUtil.getBlur( shape ) ); 
267
      gfxUtil.setBlur( shape, 0 );
268
      // It is important for some issues that filter is completely removed:
269
      assertTrue( shape.node.style.cssText.indexOf( "FILTER:" ) == -1 );
270
      assertEquals( 0, gfxUtil.getBlur( shape ) ); 
271
      parentNode.removeChild( gfxUtil.getCanvasNode( canvas ) );
272
    },
273
274
    testBlurWithOpacity : function() {
275
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
276
      var gfxUtil = org.eclipse.rwt.GraphicsUtil
277
      testUtil.flush();
278
      var parentNode = document.body;
279
      var canvas = gfxUtil.createCanvas();
280
      parentNode.appendChild( gfxUtil.getCanvasNode( canvas ) );
281
      var shape = gfxUtil.createShape( "rect" );
282
      gfxUtil.addToCanvas( canvas, shape );
283
      gfxUtil.setBlur( shape, 4 );
284
      gfxUtil.setOpacity( shape, 0.5 );
285
      assertTrue( shape.node.style.cssText.indexOf( "FILTER:" ) != -1 );
286
      var alpha = "Alpha(opacity=50)";
287
      var blur = "progid:DXImageTransform.Microsoft.Blur(pixelradius=4)";
288
      assertEquals( alpha+blur, shape.node.style.filter );
289
      gfxUtil.setBlur( shape, 0 );
290
      assertEquals( alpha, shape.node.style.filter );
291
      gfxUtil.setBlur( shape, 4 );
292
      assertEquals( alpha+blur, shape.node.style.filter );
293
      gfxUtil.setOpacity( shape, 1 );
294
      assertEquals( blur, shape.node.style.filter );
295
      gfxUtil.setBlur( shape, 0 );
296
      assertTrue( shape.node.style.cssText.indexOf( "FILTER:" ) == -1 );
297
      parentNode.removeChild( gfxUtil.getCanvasNode( canvas ) );
298
    },
299
    
300
    testNodeOrder : function() {
301
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
302
      var gfxUtil = org.eclipse.rwt.GraphicsUtil
303
      var parent = document.body;
304
      canvas = gfxUtil.createCanvas();
305
      parent.appendChild( gfxUtil.getCanvasNode( canvas ) );
306
      gfxUtil.handleAppear( canvas );
307
      var shape1 = gfxUtil.createShape( "rect" );
308
      var shape2 = gfxUtil.createShape( "rect" );
309
      var shape3 = gfxUtil.createShape( "rect" );
310
      gfxUtil.addToCanvas( canvas, shape1 );
311
      gfxUtil.addToCanvas( canvas, shape3 );
312
      gfxUtil.addToCanvas( canvas, shape2, shape3 );
313
      var nodes = canvas.node.childNodes;
314
      assertIdentical( nodes[ 0 ], shape1.node );
315
      assertIdentical( nodes[ 1 ], shape2.node );
316
      assertIdentical( nodes[ 2 ], shape3.node );
317
      testUtil.flush();
248
    }
318
    }
249
319
250
320
(-)js/resource/RAPThemeSupport.js (-1 / +1 lines)
Lines 19-25 Link Here
19
qx.Theme.define("org.eclipse.swt.theme.DefaultAppearances",{title:"RAP Default Theme",extend:org.eclipse.swt.theme.AppearancesBase,appearances:{}});
19
qx.Theme.define("org.eclipse.swt.theme.DefaultAppearances",{title:"RAP Default Theme",extend:org.eclipse.swt.theme.AppearancesBase,appearances:{}});
20
qx.Theme.define("org.eclipse.swt.theme.Default",{title:"RAP Default Theme",meta:{"color":org.eclipse.swt.theme.DefaultColors,"border":org.eclipse.swt.theme.DefaultBorders,"font":org.eclipse.swt.theme.DefaultFonts,"icon":org.eclipse.swt.theme.DefaultIcons,"widget":org.eclipse.swt.theme.DefaultWidgets,"appearance":org.eclipse.swt.theme.DefaultAppearances}});
20
qx.Theme.define("org.eclipse.swt.theme.Default",{title:"RAP Default Theme",meta:{"color":org.eclipse.swt.theme.DefaultColors,"border":org.eclipse.swt.theme.DefaultBorders,"font":org.eclipse.swt.theme.DefaultFonts,"icon":org.eclipse.swt.theme.DefaultIcons,"widget":org.eclipse.swt.theme.DefaultWidgets,"appearance":org.eclipse.swt.theme.DefaultAppearances}});
21
ts=org.eclipse.swt.theme.ThemeStore.getInstance();
21
ts=org.eclipse.swt.theme.ThemeStore.getInstance();
22
ts.defineValues({"dimensions":{"0": 0,"40a": 22,"5e": 2,"8d": 3,"bc": 4,"2f0": 16,"eb": 5,"2c1": 15,"34e": 18,"3db": 21},"boxdims":{"1204d3a5": [4,5,4,5],"120509bd": [5,5,5,5],"12043ca2": [1,10,1,10],"120450d9": [1,19,1,1],"12045c02": [2,0,0,2],"1203fb40": [0,5,0,0],"1205a000": [8,0,0,0],"12045c30": [2,0,2,0],"1204990b": [3,3,3,3],"12046534": [2,4,2,4],"1205a4b2": [8,2,2,2],"1204630b": [2,3,3,3],"1203f708": [0,3,3,0],"1204d377": [4,5,2,7],"12050940": [5,5,0,0],"1203fd80": [0,6,0,0],"12049b4c": [3,4,3,4],"12046775": [2,5,2,5],"1203f6c4": [0,3,0,4],"120462f3": [2,3,2,3],"12049203": [3,0,0,3],"120498c0": [3,3,0,0],"120460b1": [2,2,2,1],"120460b2": [2,2,2,2],"12042a9a": [1,2,1,2],"12042cf3": [1,3,2,3],"1204cf0b": [4,3,3,3],"1203f4b0": [0,2,2,0],"1203f480": [0,2,0,0],"12046080": [2,2,0,0],"1203f032": [0,0,2,2],"1203f030": [0,0,2,0],"1203f000": [0,0,0,0],"1203f04b": [0,0,3,3],"1204969c": [3,2,1,4]},"images":{"ed198000": null,"5efe3aa4": ["5efe3aa4",10,7],"df7ccd2b": ["df7ccd2b",16,5],"91dcf9c9": ["91dcf9c9",9,6],"f9835c9c": ["f9835c9c",6,9],"361d46ab": ["361d46ab",16,16],"ecca8c00": null,"3d543571": ["3d543571",10,7],"343b3df0": ["343b3df0",32,32],"6344dd7c": ["6344dd7c",15,15],"5310f593": ["5310f593",10,7],"38e1b619": ["38e1b619",7,7],"ec0d88bb": ["ec0d88bb",11,11],"6b1ea041": ["6b1ea041",6,9],"19d00025": null,"a7f80000": null,"96f80000": null,"4a0314a6": ["4a0314a6",15,15],"6181cefe": ["6181cefe",11,11],"d2e3902": ["d2e3902",10,7],"fbf80000": null,"9ee04c5a": ["9ee04c5a",9,6],"b17f67f9": ["b17f67f9",15,15],"b7351000": null,"5b0e5823": ["5b0e5823",6,9],"9df80cc3": ["9df80cc3",32,32],"63bd404f": ["63bd404f",11,11],"2607b23b": ["2607b23b",6,7],"f1188849": ["f1188849",9,5],"b3abf2ab": ["b3abf2ab",9,6],"44404c00": null,"1f6c63f6": ["1f6c63f6",10,7],"5402a05a": ["5402a05a",16,16],"2ac7a085": ["2ac7a085",6,9],"c049f400": null,"6e49954c": ["6e49954c",6,7],"66f5543e": ["66f5543e",6,7],"f7d3d3a4": ["f7d3d3a4",9,6],"24c84a49": ["24c84a49",7,8],"c8c41a97": ["c8c41a97",8,7],"528db58f": ["528db58f",6,7],"fcf99fc5": ["fcf99fc5",7,4],"560eb7d2": ["560eb7d2",6,9],"44048316": ["44048316",6,9],"38054a38": ["38054a38",32,32],"81f5b807": ["81f5b807",15,15],"7f141d33": ["7f141d33",32,32],"3698ef47": ["3698ef47",10,7],"42f14f4f": ["42f14f4f",15,15],"25ae5c00": null,"b215a2e5": ["b215a2e5",11,11],"98f8b000": null,"1e7357aa": ["1e7357aa",7,7],"dc3f170": ["dc3f170",6,9],"7f9d166a": ["7f9d166a",11,11],"20ce8000": null,"7a6be800": null,"bf9cb6": ["bf9cb6",15,15],"ffffffff": null,"551f1d87": ["551f1d87",6,9],"e37249d4": ["e37249d4",32,32],"8ad6c431": ["8ad6c431",16,7],"f281857c": ["f281857c",1,1600],"9ae0f28": ["9ae0f28",15,15],"dd20909f": ["dd20909f",32,32],"a6cd3400": null,"ec3b45d8": ["ec3b45d8",11,11],"903cec2d": ["903cec2d",16,16],"7f000025": null,"f92762a9": ["f92762a9",11,11],"b2707000": null,"7c0538c2": ["7c0538c2",9,5],"d2eb04f8": ["d2eb04f8",9,6],"af6f6914": ["af6f6914",11,11],"d18fce93": ["d18fce93",9,6],"15180000": null,"7e94854d": ["7e94854d",15,15],"d40ced5e": ["d40ced5e",2,2],"9ece8000": null,"4fb4e47": ["4fb4e47",13,13],"4f80000": null,"6219d800": null,"9f000025": null,"f0f66998": ["f0f66998",6,9],"6da39160": ["6da39160",15,15],"3a888000": null,"fa5acbe": ["fa5acbe",16,16],"ff000025": null,"2282bd8b": ["2282bd8b",6,9],"37dc5d28": ["37dc5d28",32,32],"6356c615": ["6356c615",15,15]},"gradients":{"ed198000":{"percents": [0.0,52.0,100.0],"colors": ["#b0b0b0","#e0e0e0","#ffffff"],"vertical": true},"5efe3aa4": null,"df7ccd2b": null,"91dcf9c9": null,"f9835c9c": null,"361d46ab": null,"ecca8c00":{"percents": [0.0,100.0],"colors": ["#e0e0e0","#ffffff"],"vertical": true},"3d543571": null,"343b3df0": null,"6344dd7c": null,"5310f593": null,"38e1b619": null,"ec0d88bb": null,"6b1ea041": null,"19d00025":{"percents": [0.0,52.0,100.0],"colors": ["#e0e0e0","#e0e0e0","#b0b0b0"],"vertical": false},"a7f80000":{"percents": [0.0,42.0,58.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#cccccc"],"vertical": true},"96f80000":{"percents": [0.0,48.0,52.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#ffffff"],"vertical": true},"4a0314a6": null,"6181cefe": null,"d2e3902": null,"fbf80000":{"percents": [0.0,38.0,62.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#ffffff"],"vertical": true},"9ee04c5a": null,"b17f67f9": null,"b7351000":{"percents": [0.0,100.0],"colors": ["#ffffff","#e0e0e0"],"vertical": true},"5b0e5823": null,"9df80cc3": null,"63bd404f": null,"2607b23b": null,"f1188849": null,"b3abf2ab": null,"44404c00":{"percents": [0.0,100.0],"colors": ["#0078bf","#00589f"],"vertical": true},"1f6c63f6": null,"5402a05a": null,"2ac7a085": null,"c049f400":{"percents": [0.0,100.0],"colors": ["#fbfcfd","#ececec"],"vertical": true},"6e49954c": null,"66f5543e": null,"f7d3d3a4": null,"24c84a49": null,"c8c41a97": null,"528db58f": null,"fcf99fc5": null,"560eb7d2": null,"44048316": null,"38054a38": null,"81f5b807": null,"7f141d33": null,"3698ef47": null,"42f14f4f": null,"25ae5c00":{"percents": [0.0,100.0],"colors": ["#005fac","#005092"],"vertical": true},"b215a2e5": null,"98f8b000":{"percents": [0.0,100.0],"colors": ["#ffffff","#e4e5f0"],"vertical": true},"1e7357aa": null,"dc3f170": null,"7f9d166a": null,"20ce8000":{"percents": [0.0,52.0,100.0],"colors": ["#e0e0e0","#e0e0e0","#b0b0b0"],"vertical": true},"7a6be800":{"percents": [0.0,100.0],"colors": ["#a5a5a5","#858585"],"vertical": true},"bf9cb6": null,"ffffffff": null,"551f1d87": null,"e37249d4": null,"8ad6c431": null,"f281857c": null,"9ae0f28": null,"dd20909f": null,"a6cd3400":{"percents": [0.0,100.0],"colors": ["#595959","#4b4b4b"],"vertical": true},"ec3b45d8": null,"903cec2d": null,"7f000025":{"percents": [0.0,38.0,62.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#ffffff"],"vertical": false},"f92762a9": null,"b2707000":{"percents": [0.0,100.0],"colors": ["#dae9f7","#d2e0ee"],"vertical": true},"7c0538c2": null,"d2eb04f8": null,"af6f6914": null,"d18fce93": null,"15180000":{"percents": [0.0,30.0,70.0,100.0],"colors": ["#e0e0e0","#f0f0f0","#e0e0e0","#b0b0b0"],"vertical": true},"7e94854d": null,"d40ced5e": null,"9ece8000":{"percents": [0.0,52.0,100.0],"colors": ["#ffffff","#e0e0e0","#b0b0b0"],"vertical": true},"4fb4e47": null,"4f80000":{"percents": [0.0,48.0,52.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#cccccc"],"vertical": true},"6219d800":{"percents": [0.0,100.0],"colors": ["#f4f5f6","#e6e6e6"],"vertical": true},"9f000025":{"percents": [0.0,48.0,52.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#cccccc"],"vertical": false},"f0f66998": null,"6da39160": null,"3a888000":{"percents": [0.0,55.0,100.0],"colors": ["#ffffff","#e0e0e0","#f0f0f0"],"vertical": true},"fa5acbe": null,"ff000025":{"percents": [0.0,42.0,58.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#cccccc"],"vertical": false},"2282bd8b": null,"37dc5d28": null,"6356c615": null},"colors":{"0": "#000000","3cc8fe": "#fec83c","959595": "#959595","9f5800": "#00589f","99a8ac": "#aca899","f4f3f3": "#f3f3f4","cfcfcf": "#cfcfcf","9c5600": "#00569c","4a4a4a": "#4a4a4a","2020cb": "#cb2020","8c8785": "#85878c","ebebeb": "#ebebeb","666666": "#666666","a55900": "#0059a5","a59679": "#7996a5","4e4a46": "#464a4e","ffffff": "#ffffff","f7e9da": "#dae9f7","808080": "#808080","ffffffff": "undefined","e4dfdc": "#dcdfe4","993300": "#003399","aaaaaa": "#aaaaaa","a4a4a4": "#a4a4a4","c0c0c0": "#c0c0c0","fff8f8": "#f8f8ff","aaa6a7": "#a7a6aa","dedede": "#dedede","d2d2d2": "#d2d2d2","d0d0d0": "#d0d0d0","c08000": "#0080c0","fcfcfc": "#fcfcfc","f3e3d9": "#d9e3f3"},"fonts":{"dee31769":{"family": ["Verdana","Lucida Sans","Arial","Helvetica","sans-serif"],"size": 12,"bold": false,"italic": false},"67d9a7ad":{"family": ["Segoe UI","Corbel","Calibri","Tahoma","Lucida Sans Unicode"],"size": 11,"bold": false,"italic": false},"dee311c5":{"family": ["Verdana","Lucida Sans","Arial","Helvetica","sans-serif"],"size": 11,"bold": false,"italic": false},"c9a3013":{"family": ["Verdana","Lucida Sans","Arial","Helvetica","sans-serif"],"size": 14,"bold": true,"italic": false},"c9a2fa1":{"family": ["Verdana","Lucida Sans","Arial","Helvetica","sans-serif"],"size": 11,"bold": true,"italic": false}},"borders":{"c411a436":{"width": 1,"style": "outset","color": null},"e2677bf1":{"width": 1,"style": "solid","color": "#cccccc"},"de1b2d87":{"width": 1,"style": "solid","color": "#b4b4b4"},"8879b0d1":{"width": 1,"style": "solid","color": "#000000"},"98585c31":{"width": 1,"style": "solid","color": "#999999"},"92103dff":{"width": 2,"style": "solid","color": "#4b4b4b"},"dfa628db":{"width": 1,"style": "solid","color": "#c1c1c1"},"dc65e06a":{"width": 1,"style": "solid","color": "#a4a4a4"},"887c1e69":{"width": 1,"style": "solid","color": "#0059a5"},"dc902e9c":{"width": 1,"style": "solid","color": "#a7a6aa"},"36a":{"width": 0,"style": null,"color": null},"887bfd69":{"width": 2,"style": "solid","color": "#005092"},"2abfdf6d":{"width": 1,"style": "dotted","color": "#b8b8b8"},"5fbe2ff":{"width": 1,"style": "inset","color": null},"887c1601":{"width": 1,"style": "solid","color": "#00589f"}},"cursors":{"e81f3e3d": "pointer","5c13d641": "default"},"animations":{"7":{},"6d3dee97":{"hoverOut": [500,"easeOut"]},"4bbf0fbf":{"fadeIn": [200,"linear"],"fadeOut": [600,"easeOut"]},"4bbf04cf":{"fadeIn": [200,"linear"],"fadeOut": [400,"easeOut"]}}});ts.setThemeCssValues("org.eclipse.swt.theme.Default",{"Spinner-DownButton":{"background-image": [[[":pressed"],"ed198000"],[[],"ecca8c00"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f030"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"DateTime-DropDownButton":{"background-image": [[[],"4f80000"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f4b0"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"CoolBar":{"background-image": [[[],"ffffffff"]]},"TreeColumn":{"color": [[[":disabled"],"cfcfcf"],[[],"666666"]],"font": [[[],"dee31769"]],"background-color": [[[],"fff8f8"]],"background-image": [[[":hover"],"6219d800"],[[],"c049f400"]],"border-bottom": [[[":hover"],"36a"],[[],"36a"]],"padding": [[[],"12042a9a"]]},"ScrollBar-UpButton":{"background-color": [[[],"ffffffff"]],"border": [[[],"de1b2d87"]],"border-radius": [[["[VERTICAL"],"1203f04b"],[["[HORIZONTAL"],"1203f708"]],"background-image": [[[":pressed","[HORIZONTAL"],"20ce8000"],[[":hover","[HORIZONTAL"],"a7f80000"],[[":pressed","[VERTICAL"],"19d00025"],[[":hover","[VERTICAL"],"ff000025"],[["[HORIZONTAL"],"fbf80000"],[["[VERTICAL"],"7f000025"],[[],"ffffffff"]],"cursor": [[[],"5c13d641"]]},"ExpandItem-Button":{"background-image": [[[":expanded",":hover"],"903cec2d"],[[":expanded"],"fa5acbe"],[[":hover"],"5402a05a"],[[],"361d46ab"]]},"Spinner-UpButton":{"background-image": [[[":pressed"],"9ece8000"],[[],"b7351000"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f480"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"Group":{"background-color": [[[],"ffffff"]],"color": [[[":disabled"],"cfcfcf"],[[],"4a4a4a"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"Label-SeparatorLine":{"border": [[["[SHADOW_OUT"],"c411a436"],[["[SHADOW_IN"],"5fbe2ff"],[[],"dc65e06a"]],"border-radius": [[[],"1203f000"]],"background-color": [[[],"ffffffff"]],"background-image": [[[],"ffffffff"]],"width": [[[],"5e"]]},"Slider-UpButton":{"background-color": [[[],"ffffffff"]],"border": [[[],"dc65e06a"]],"border-radius": [[["[VERTICAL"],"1203f032"],[["[HORIZONTAL"],"1203f4b0"]],"background-image": [[[":pressed","[VERTICAL"],"19d00025"],[[":pressed","[HORIZONTAL"],"20ce8000"],[["[VERTICAL"],"9f000025"],[["[HORIZONTAL"],"4f80000"],[[],"ffffffff"]],"cursor": [[[],"5c13d641"]]},"DateTime":{"color": [[[":disabled"],"cfcfcf"],[[],"4e4a46"]],"background-color": [[[],"fcfcfc"]],"font": [[[],"dee311c5"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"padding": [[[],"12042a9a"]]},"Tree-Cell":{"padding": [[[],"1204630b"]],"spacing": [[[],"8d"]]},"Slider-DownButton":{"background-color": [[[],"ffffffff"]],"border": [[[],"dc65e06a"]],"border-radius": [[["[VERTICAL"],"12046080"],[["[HORIZONTAL"],"12045c02"]],"background-image": [[[":pressed","[VERTICAL"],"19d00025"],[[":pressed","[HORIZONTAL"],"20ce8000"],[["[VERTICAL"],"9f000025"],[["[HORIZONTAL"],"4f80000"],[[],"ffffffff"]],"cursor": [[[],"5c13d641"]]},"CCombo-Button":{"background-image": [[[":pressed"],"20ce8000"],[[],"4f80000"]],"background-color": [[[],"ffffffff"]],"border": [[[":hover","[FLAT"],"c411a436"],[["[FLAT"],"36a"],[[],"36a"]],"border-radius": [[[],"1203f4b0"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"Shell":{"border": [[[":inactive",":maximized"],"36a"],[[":inactive","[TITLE"],"92103dff"],[[":inactive","[BORDER"],"92103dff"],[[":maximized"],"36a"],[["[BORDER"],"887bfd69"],[["[TITLE"],"887bfd69"],[[],"8879b0d1"]],"border-radius": [[[":inactive",":maximized"],"1203f000"],[[":maximized"],"1203f000"],[["[BORDER"],"12050940"],[["[TITLE"],"12050940"]],"background-image": [[[],"ffffffff"]],"padding": [[["[BORDER"],"120509bd"],[["[TITLE"],"120509bd"],[[],"1203f000"]],"background-color": [[["[BORDER"],"ffffff"],[["[TITLE"],"ffffff"],[[],"ffffff"]],"opacity": [[[],"1.0"]]},"Combo":{"color": [[[":disabled"],"cfcfcf"],[[],"4e4a46"]],"background-color": [[[],"fcfcfc"]],"font": [[[],"dee311c5"]],"border": [[[],"dfa628db"]],"border-radius": [[[],"120460b2"]]},"ExpandItem-Header":{"background-color": [[[],"ffffff"]],"background-image": [[[],"3a888000"]],"border": [[[],"36a"]],"border-radius": [],"cursor": [[[":disabled"],"5c13d641"],[[],"e81f3e3d"]]},"Combo-Button":{"background-image": [[[":pressed"],"20ce8000"],[[],"4f80000"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f4b0"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"ToolItem-DropDownIcon":{"background-image": [[[],"fcf99fc5"]],"border": [[[":hover"],"5fbe2ff"],[[],"36a"]]},"DateTime-Calendar-Day":{"color": [[[":hover",":selected"],"ffffff"],[[":otherMonth"],"808080"],[[":selected"],"4a4a4a"],[[],"4a4a4a"]],"background-color": [[[":selected",":unfocused"],"c0c0c0"],[[":hover",":selected"],"9c5600"],[[":hover"],"f3e3d9"],[[":otherMonth"],"ffffffff"],[[":selected"],"d2d2d2"],[[],"ffffff"]]},"TableItem":{"color": [[[":even",":linesvisible",":selected",":unfocused"],"ffffff"],[[":even",":linesvisible",":selected"],"ffffff"],[[":selected",":unfocused"],"ffffff"],[[":selected"],"ffffff"],[[":disabled"],"cfcfcf"],[[],"ffffffff"]],"background-color": [[[":even",":linesvisible",":selected",":unfocused"],"959595"],[[":even",":linesvisible",":selected"],"9f5800"],[[":even",":hover",":linesvisible"],"f7e9da"],[[":even",":linesvisible"],"f4f3f3"],[[":selected",":unfocused"],"959595"],[[":selected"],"9f5800"],[[":hover"],"f7e9da"],[[],"ffffffff"]],"text-decoration": [[[],"none"]]},"*":{"color": [[[":disabled"],"cfcfcf"],[[],"4a4a4a"]],"background-color": [[[],"ffffff"]],"background-image": [[[],"ffffffff"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"padding": [[[],"1203f000"]]},"Tree-GridLine":{"color": [[[":horizontal"],"0"],[[],"d0d0d0"]]},"CCombo-Button-Icon":{"background-image": [[[":hover"],"d2eb04f8"],[[],"91dcf9c9"]]},"Combo-Button-Icon":{"background-image": [[[":hover"],"d2eb04f8"],[[],"91dcf9c9"]]},"DateTime-UpButton-Icon":{"background-image": [[[":hover"],"d18fce93"],[[],"f7d3d3a4"]]},"Sash":{"background-color": [[[":hover"],"f7e9da"],[[],"ffffffff"]],"background-image": [[[],"ffffffff"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"TabItem":{"background-color": [[[":hover"],"f7e9da"],[[":selected"],"ffffff"],[[],"ffffff"]],"background-image": [[[":hover"],"ffffffff"],[[":selected"],"ffffffff"],[[],"ffffffff"]],"border-top-color": [[[":selected"],"9f5800"],[[],"ffffff"]],"border-bottom-color": [[[":selected"],"9f5800"],[[],"ffffff"]]},"ToolItem-Separator":{"width": [[[],"bc"]]},"TableColumn-SortIndicator":{"background-image": [[[":down"],"f1188849"],[[":up"],"7c0538c2"],[[],"ffffffff"]]},"ToolTip-Text":{"color": [[[],"993300"]],"font": [[[],"c9a3013"]]},"ScrollBar":{"background-color": [[[],"f4f3f3"]],"border": [[[],"36a"]],"border-radius": [[[],"1204990b"]],"width": [[[],"2c1"]]},"ProgressBar":{"background-color": [[[],"ffffff"]],"background-image": [[[],"ffffffff"]],"border": [[[],"dc65e06a"]],"border-radius": [[[],"120460b2"]]},"Group-Frame":{"border": [[[],"e2677bf1"]],"border-radius": [[[],"120460b2"]],"margin": [[[],"1205a000"]],"padding": [[[],"1205a4b2"]]},"TreeColumn-SortIndicator":{"background-image": [[[":down"],"f1188849"],[[":up"],"7c0538c2"],[[],"ffffffff"]]},"Shell-MinButton":{"margin": [[[":inactive"],"1203fd80"],[[],"1203fd80"]],"background-image": [[[":hover",":inactive"],"ec3b45d8"],[[":inactive"],"f92762a9"],[[":hover"],"ec3b45d8"],[[],"f92762a9"]]},"TableColumn":{"color": [[[":disabled"],"cfcfcf"],[[],"666666"]],"font": [[[],"dee31769"]],"background-color": [[[],"fff8f8"]],"background-image": [[[":hover"],"6219d800"],[[],"c049f400"]],"border-bottom": [[[":hover"],"36a"],[[],"36a"]],"padding": [[[],"12042a9a"]]},"ToolTip-Image":{"background-image": [[["[ICON_WARNING"],"7f141d33"],[["[ICON_INFORMATION"],"9df80cc3"],[["[ICON_ERROR"],"dd20909f"],[[],"ffffffff"]]},"ScrollBar-Thumb-Icon":{"background-image": [[["[HORIZONTAL"],"c8c41a97"],[["[VERTICAL"],"24c84a49"],[[],"ffffffff"]]},"CTabItem":{"font": [[[],"dee31769"]],"color": [[[":disabled"],"0"],[[":selected"],"ffffff"],[[],"4a4a4a"]],"background-color": [[[":selected"],"9f5800"],[[],"ffffff"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"12046534"]],"spacing": [[[],"bc"]]},"Combo-Field":{"padding": [[[],"120462f3"]]},"Table":{"color": [[[":disabled"],"cfcfcf"],[[],"4a4a4a"]],"background-color": [[[],"ffffff"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"background-image": [[[],"ffffffff"]]},"Text-Message":{"color": [[[],"aaa6a7"]]},"Slider-DownButton-Icon":{"background-image": [[[":hover","[VERTICAL"],"d18fce93"],[[":hover","[HORIZONTAL"],"551f1d87"],[["[VERTICAL"],"f7d3d3a4"],[["[HORIZONTAL"],"f0f66998"],[[],"ffffffff"]]},"Spinner-Field":{"padding": [[[],"120462f3"]]},"Tree":{"color": [[[":disabled"],"cfcfcf"],[[],"4a4a4a"]],"background-color": [[[],"ffffff"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"Widget-ToolTip":{"color": [[[],"4a4a4a"]],"background-color": [[[],"f7e9da"]],"border": [[[],"887c1601"]],"border-radius": [[[],"120460b2"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"12042cf3"]],"font": [[[],"dee31769"]],"opacity": [[[],"1.0"]],"animation": [[[],"4bbf0fbf"]]},"DateTime-Calendar-PreviousYearButton":{"background-image": [[[":hover"],"1f6c63f6"],[[],"3698ef47"]],"cursor": [[[],"5c13d641"]]},"List-Item":{"color": [[[":even",":selected",":unfocused"],"ffffff"],[[":even",":selected"],"ffffff"],[[":selected",":unfocused"],"ffffff"],[[":selected"],"ffffff"],[[":disabled"],"cfcfcf"],[[],"ffffffff"]],"background-color": [[[":even",":selected",":unfocused"],"959595"],[[":even",":selected"],"9f5800"],[[":even",":hover"],"f7e9da"],[[":selected",":unfocused"],"959595"],[[":even"],"f4f3f3"],[[":selected"],"9f5800"],[[":hover"],"f7e9da"],[[],"ffffffff"]],"background-image": [[[":even",":selected",":unfocused"],"7a6be800"],[[":even",":selected"],"44404c00"],[[":selected",":unfocused"],"7a6be800"],[[":selected"],"44404c00"],[[":hover"],"b2707000"],[[],"ffffffff"]]},"Scale-Thumb":{"background-color": [[[],"9f5800"]]},"Link":{"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"Button-CheckIcon":{"background-image": [[[":grayed",":hover",":selected"],"bf9cb6"],[[":grayed",":selected"],"81f5b807"],[[":hover",":selected"],"42f14f4f"],[[":selected"],"6da39160"],[[":hover"],"9ae0f28"],[[],"b17f67f9"]]},"Table-GridLine":{"color": [[[":horizontal"],"ffffffff"],[[],"dedede"]]},"Shell-CloseButton":{"margin": [[[":inactive"],"1203fb40"],[[],"1203fb40"]],"background-image": [[[":hover",":inactive"],"6181cefe"],[[":inactive"],"63bd404f"],[[":hover"],"6181cefe"],[[],"63bd404f"]]},"DateTime-DownButton-Icon":{"background-image": [[[":hover"],"9ee04c5a"],[[],"b3abf2ab"]]},"Label":{"color": [[[":disabled"],"cfcfcf"],[[],"4a4a4a"]],"background-color": [[[],"ffffff"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"cursor": [[[],"5c13d641"]],"background-image": [[[],"ffffffff"]],"text-decoration": [[[],"none"]],"opacity": [[[],"1.0"]]},"Shell-Titlebar":{"color": [[[":inactive"],"aaaaaa"],[[],"ffffff"]],"background-color": [[[":inactive"],"a59679"],[[],"c08000"]],"background-gradient-color": [[[":inactive"],"a59679"],[[],"c08000"]],"background-image": [[[":inactive"],"a6cd3400"],[[],"25ae5c00"]],"font": [[[],"dee31769"]],"margin": [[[],"1203f000"]],"padding": [[[],"12046775"]],"height": [[[],"40a"]],"border": [[[],"36a"]],"border-radius": [[[],"120498c0"]]},"Tree-Indent":{"width": [[[],"2f0"]],"background-image": [[[":expanded",":first",":hover",":last"],"38e1b619"],[[":collapsed",":first",":hover",":last"],"2282bd8b"],[[":expanded",":first",":last"],"1e7357aa"],[[":collapsed",":first",":last"],"f9835c9c"],[[":expanded",":hover",":last"],"38e1b619"],[[":collapsed",":hover",":last"],"2282bd8b"],[[":expanded",":first",":hover"],"38e1b619"],[[":collapsed",":first",":hover"],"2282bd8b"],[[":first",":last"],"ffffffff"],[[":expanded",":last"],"1e7357aa"],[[":collapsed",":last"],"f9835c9c"],[[":expanded",":first"],"1e7357aa"],[[":collapsed",":first"],"f9835c9c"],[[":expanded",":hover"],"38e1b619"],[[":collapsed",":hover"],"2282bd8b"],[[":last"],"ffffffff"],[[":first"],"ffffffff"],[[":line"],"ffffffff"],[[":expanded"],"1e7357aa"],[[":collapsed"],"f9835c9c"],[[],"ffffffff"]]},"Combo-List":{"border": [[[],"dfa628db"]],"border-radius": [[[],"1203f032"]]},"Combo-FocusIndicator":{"background-color": [[[],"ffffffff"]],"border": [[[],"2abfdf6d"]],"margin": [[[],"120450d9"]],"opacity": [[[],"1.0"]]},"DateTime-DownButton":{"background-image": [[[":pressed"],"ed198000"],[[],"ecca8c00"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f030"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"Link-Hyperlink":{"color": [[[":disabled"],"959595"],[[],"9f5800"]]},"Spinner":{"color": [[[":disabled"],"cfcfcf"],[[],"4e4a46"]],"background-color": [[[],"fcfcfc"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"padding": [[[],"12042a9a"]]},"MenuItem-CascadeIcon":{"background-image": [[[],"4fb4e47"]]},"ToolItem":{"color": [[[":disabled"],"cfcfcf"],[[],"ffffffff"]],"background-color": [[[":hover"],"ffffff"],[[],"ffffffff"]],"background-image": [[[":selected"],"d40ced5e"],[[":pressed"],"d40ced5e"],[[],"ffffffff"]],"border": [[[":selected"],"dc65e06a"],[[":pressed"],"dc65e06a"],[[":hover"],"dc65e06a"],[["[FLAT"],"36a"],[[],"36a"]],"border-radius": [[[":selected"],"120460b2"],[[":pressed"],"120460b2"],[[":hover"],"120460b2"],[[],"1203f000"]],"animation": [[[],"7"]],"spacing": [[[],"bc"]],"padding": [[[":selected"],"1204969c"],[[":pressed"],"1204969c"],[[":hover"],"120462f3"],[["[FLAT"],"12049b4c"],[[],"120462f3"]],"opacity": [[[],"1.0"]]},"CTabFolder":{"border-color": [[[],"a4a4a4"]],"border-radius": [[[],"120460b2"]]},"Tree-Checkbox":{"margin": [[[],"1203f480"]],"background-image": [[[":checked",":grayed",":hover"],"bf9cb6"],[[":checked",":grayed"],"81f5b807"],[[":checked",":hover"],"42f14f4f"],[[":checked"],"6da39160"],[[":hover"],"9ae0f28"],[[],"b17f67f9"]]},"Menu":{"color": [[[":disabled"],"cfcfcf"],[[],"a55900"]],"background-color": [[[],"ffffff"]],"background-image": [[[],"ffffffff"]],"font": [[[],"dee31769"]],"border": [[[],"887c1e69"]],"border-radius": [[[],"120460b2"]],"opacity": [[[],"1.0"]],"padding": [[[],"12045c30"]],"animation": [[[],"7"]]},"TabFolder":{},"Button":{"color": [[[":disabled"],"cfcfcf"],[[],"4a4a4a"]],"background-color": [[[],"ffffff"]],"background-image": [[[":hover",":selected","[TOGGLE"],"20ce8000"],[["[BORDER","[RADIO"],"ffffffff"],[["[BORDER","[CHECK"],"ffffffff"],[[":selected","[TOGGLE"],"15180000"],[[":pressed","[TOGGLE"],"20ce8000"],[[":pressed","[PUSH"],"20ce8000"],[[":hover","[TOGGLE"],"4f80000"],[[":hover","[PUSH"],"4f80000"],[["[BORDER"],"96f80000"],[["[TOGGLE"],"96f80000"],[["[PUSH"],"96f80000"],[[],"ffffffff"]],"border": [[["[BORDER"],"dc65e06a"],[["[TOGGLE"],"dc65e06a"],[["[PUSH"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"1204990b"],[["[TOGGLE"],"1204990b"],[["[PUSH"],"1204990b"]],"opacity": [[[],"1.0"]],"animation": [[[":pressed","[TOGGLE"],"7"],[[":pressed","[PUSH"],"7"],[["[BORDER"],"6d3dee97"],[["[TOGGLE"],"6d3dee97"],[["[PUSH"],"6d3dee97"],[[],"7"]],"cursor": [[[":disabled","[TOGGLE"],"5c13d641"],[[":disabled","[PUSH"],"5c13d641"],[["[BORDER"],"e81f3e3d"],[["[TOGGLE"],"e81f3e3d"],[["[PUSH"],"e81f3e3d"],[[],"5c13d641"]],"padding": [[[":pressed","[TOGGLE"],"1204d377"],[[":pressed","[PUSH"],"1204d377"],[["[BORDER"],"12046775"],[["[TOGGLE"],"12046775"],[["[PUSH"],"12046775"],[[],"1204d3a5"]],"spacing": [[["[RADIO"],"bc"],[["[CHECK"],"bc"],[[],"5e"]],"font": [[[],"dee31769"]]},"CLabel":{"color": [[[":disabled"],"cfcfcf"],[[],"4a4a4a"]],"background-color": [[[],"ffffff"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"cursor": [[[],"5c13d641"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"1204990b"]],"spacing": [[[],"eb"]],"opacity": [[[],"1.0"]]},"MenuItem-CheckIcon":{"background-image": [[[],"8ad6c431"]]},"Scale":{"background-color": [[[],"ffffff"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": []},"ToolTip":{"font": [[[],"dee31769"]],"color": [[[],"0"]],"background-color": [[[],"fcfcfc"]],"cursor": [[[],"5c13d641"]],"background-image": [[[],"98f8b000"]],"opacity": [[[],"1.0"]],"border": [[[],"dc65e06a"]],"border-radius": [[[],"120509bd"]],"padding": [[[],"1204990b"]],"animation": [[[],"4bbf0fbf"]]},"Slider-Thumb":{"background-color": [[[],"ffffffff"]],"border": [[[],"dc65e06a"]],"border-radius": [[[],"120460b2"]],"background-image": [[[":pressed","[VERTICAL"],"19d00025"],[[":pressed","[HORIZONTAL"],"20ce8000"],[["[VERTICAL"],"9f000025"],[["[HORIZONTAL"],"4f80000"],[[],"ffffffff"]]},"CCombo-List":{"border": [[[],"dfa628db"]],"border-radius": [[[],"1203f032"]]},"ScrollBar-DownButton-Icon":{"background-image": [[[":hover","[HORIZONTAL"],"560eb7d2"],[[":hover","[VERTICAL"],"d18fce93"],[["[HORIZONTAL"],"5b0e5823"],[["[VERTICAL"],"f7d3d3a4"],[[],"ffffffff"]]},"Display":{"rwt-shadow-color": [[[],"aaa6a7"]],"rwt-highlight-color": [[[],"ffffff"]],"rwt-darkshadow-color": [[[],"8c8785"]],"rwt-lightshadow-color": [[[],"e4dfdc"]],"rwt-thinborder-color": [[[],"99a8ac"]],"rwt-selectionmarker-color": [[[],"3cc8fe"]],"rwt-infobackground-color": [[[],"ffffff"]],"rwt-error-image": [[[],"e37249d4"]],"rwt-information-image": [[[],"38054a38"]],"rwt-working-image": [[[],"38054a38"]],"rwt-question-image": [[[],"343b3df0"]],"rwt-warning-image": [[[],"37dc5d28"]],"rwt-fontlist": [[[],"67d9a7ad"]],"background-image": [[[],"f281857c"]],"font": [[[],"dee31769"]]},"ToolBar":{"color": [[[":disabled"],"cfcfcf"],[[],"0"]],"background-color": [[[],"ffffff"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"1203f000"]],"spacing": [[[],"0"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"opacity": [[[],"1.0"]]},"ExpandBar":{"color": [[[":disabled"],"cfcfcf"],[[],"4a4a4a"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dfa628db"],[[],"36a"]],"border-radius": []},"Button-RadioIcon":{"background-image": [[[":hover",":selected"],"6344dd7c"],[[":selected"],"7e94854d"],[[":hover"],"6356c615"],[[],"4a0314a6"]]},"DateTime-DropDownCalendar":{"border": [[[],"dc902e9c"]]},"DateTime-Field":{"color": [[[":selected"],"4a4a4a"],[[],"4a4a4a"]],"background-color": [[[":selected"],"d2d2d2"],[[],"ffffff"]],"padding": [[[],"120462f3"]]},"DateTime-Calendar-NextYearButton":{"background-image": [[[":hover"],"5310f593"],[[],"5efe3aa4"]],"cursor": [[[],"5c13d641"]]},"ScrollBar-UpButton-Icon":{"background-image": [[[":hover","[HORIZONTAL"],"2ac7a085"],[[":hover","[VERTICAL"],"9ee04c5a"],[["[HORIZONTAL"],"44048316"],[["[VERTICAL"],"b3abf2ab"],[[],"ffffffff"]]},"DateTime-Calendar-NextMonthButton":{"background-image": [[[":hover"],"66f5543e"],[[],"528db58f"]],"cursor": [[[],"5c13d641"]]},"CCombo":{"color": [[[":disabled"],"cfcfcf"],[[],"4e4a46"]],"background-color": [[[],"fcfcfc"]],"font": [[[],"dee311c5"]],"border": [[["[BORDER"],"dfa628db"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"],[[],"120460b2"]]},"ScrollBar-Thumb":{"background-color": [[[],"ffffffff"]],"border": [[[":pressed"],"98585c31"],[[],"de1b2d87"]],"border-radius": [[[],"1203f000"]],"background-image": [[[":pressed","[HORIZONTAL"],"20ce8000"],[[":hover","[HORIZONTAL"],"a7f80000"],[[":pressed","[VERTICAL"],"19d00025"],[[":hover","[VERTICAL"],"ff000025"],[["[HORIZONTAL"],"fbf80000"],[["[VERTICAL"],"7f000025"],[[],"ffffffff"]]},"CCombo-FocusIndicator":{"background-color": [[[],"ffffffff"]],"border": [[[],"2abfdf6d"]],"margin": [[[],"120450d9"]],"opacity": [[[],"1.0"]]},"Composite":{"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [],"background-color": [[["[BORDER"],"ffffff"],[[],"ffffff"]],"background-image": [[["[BORDER"],"ffffffff"],[[],"ffffffff"]],"padding": [[[],"1203f000"]],"opacity": [[[],"1.0"]]},"MenuItem-RadioIcon":{"background-image": [[[],"df7ccd2b"]]},"Slider-UpButton-Icon":{"background-image": [[[":hover","[VERTICAL"],"9ee04c5a"],[[":hover","[HORIZONTAL"],"dc3f170"],[["[VERTICAL"],"b3abf2ab"],[["[HORIZONTAL"],"6b1ea041"],[[],"ffffffff"]]},"Group-Label":{"border": [[[],"36a"]],"border-radius": [],"padding": [[[],"1203f6c4"]],"margin": [[[],"12043ca2"]],"background-color": [[[],"ffffffff"]],"color": [[[],"4e4a46"]]},"Table-Checkbox":{"width": [[[],"3db"]],"margin": [[[],"1203f000"]],"background-image": [[[":checked",":grayed",":hover"],"bf9cb6"],[[":checked",":grayed"],"81f5b807"],[[":checked",":hover"],"42f14f4f"],[[":checked"],"6da39160"],[[":hover"],"9ae0f28"],[[],"b17f67f9"]]},"TreeItem":{"color": [[[":even",":linesvisible",":selected",":unfocused"],"ffffff"],[[":even",":linesvisible",":selected"],"ffffff"],[[":selected",":unfocused"],"ffffff"],[[":selected"],"ffffff"],[[":disabled"],"cfcfcf"],[[],"ffffffff"]],"background-color": [[[":even",":linesvisible",":selected",":unfocused"],"959595"],[[":even",":linesvisible",":selected"],"9f5800"],[[":even",":hover",":linesvisible"],"f7e9da"],[[":even",":linesvisible"],"f4f3f3"],[[":selected",":unfocused"],"959595"],[[":selected"],"9f5800"],[[":hover"],"f7e9da"],[[],"ffffffff"]],"text-decoration": [[[],"none"]]},"DateTime-DropDownButton-Icon":{"background-image": [[[":hover"],"9ee04c5a"],[[],"b3abf2ab"]]},"Slider":{"background-color": [[[],"f4f3f3"]],"border": [[[],"36a"]],"border-radius": []},"Browser":{"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"DateTime-Calendar-Navbar":{"border": [[[],"36a"]],"border-radius": [],"color": [[[":disabled"],"cfcfcf"],[[],"ffffff"]],"background-color": [[[],"9c5600"]],"font": [[[],"c9a2fa1"]]},"CoolItem-Handle":{"border": [[[],"c411a436"]],"width": [[[],"bc"]]},"ToolTip-Message":{"color": [[[],"0"]],"font": [[[],"dee31769"]]},"ScrollBar-DownButton":{"background-color": [[[],"ffffffff"]],"border": [[[],"de1b2d87"]],"border-radius": [[["[VERTICAL"],"120498c0"],[["[HORIZONTAL"],"12049203"]],"background-image": [[[":pressed","[HORIZONTAL"],"20ce8000"],[[":hover","[HORIZONTAL"],"a7f80000"],[[":pressed","[VERTICAL"],"19d00025"],[[":hover","[VERTICAL"],"ff000025"],[["[HORIZONTAL"],"fbf80000"],[["[VERTICAL"],"7f000025"],[[],"ffffffff"]],"cursor": [[[],"5c13d641"]]},"List":{"font": [[[],"dee31769"]],"color": [[[":disabled"],"cfcfcf"],[[],"4a4a4a"]],"background-color": [[[],"ffffff"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"DateTime-UpButton":{"background-image": [[[":pressed"],"9ece8000"],[[],"b7351000"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f480"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"Shell-DisplayOverlay":{"background-color": [[[],"808080"]],"background-image": [[[],"ffffffff"]],"animation": [[[],"4bbf04cf"]],"opacity": [[[],"0.2"]]},"Button-FocusIndicator":{"background-color": [[["[RADIO"],"ffffffff"],[["[CHECK"],"ffffffff"],[["[TOGGLE"],"ffffffff"],[["[PUSH"],"ffffffff"],[[],"ffffff"]],"border": [[["[RADIO"],"2abfdf6d"],[["[CHECK"],"2abfdf6d"],[["[TOGGLE"],"2abfdf6d"],[["[PUSH"],"2abfdf6d"],[["[BORDER"],"dc65e06a"],[[],"36a"]],"padding": [[["[RADIO"],"120460b1"],[["[CHECK"],"120460b1"],[["[TOGGLE"],"1203f000"],[["[PUSH"],"1203f000"],[[],"1203f000"]],"margin": [[["[RADIO"],"1203f000"],[["[CHECK"],"1203f000"],[["[TOGGLE"],"120460b2"],[["[PUSH"],"120460b2"]],"opacity": [[["[RADIO"],"1.0"],[["[CHECK"],"1.0"],[["[TOGGLE"],"1.0"],[["[PUSH"],"1.0"]]},"Sash-Handle":{"background-image": [[[],"ffffffff"]]},"CTabFolder-DropDownButton-Icon":{"background-image": [[[":hover"],"3d543571"],[[],"d2e3902"]]},"DateTime-Calendar-PreviousMonthButton":{"background-image": [[[":hover"],"2607b23b"],[[],"6e49954c"]],"cursor": [[[],"5c13d641"]]},"Spinner-DownButton-Icon":{"background-image": [[[":hover"],"9ee04c5a"],[[],"b3abf2ab"]]},"Table-Cell":{"padding": [[[],"1204cf0b"]],"spacing": [[[],"8d"]]},"Text":{"color": [[[":disabled"],"cfcfcf"],[[],"4e4a46"]],"background-color": [[[],"fcfcfc"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"120462f3"]]},"MenuItem":{"color": [[[":hover"],"4a4a4a"],[[":disabled"],"cfcfcf"],[[],"0"]],"background-color": [[[":hover"],"f7e9da"],[[],"ffffffff"]],"background-image": [[[],"ffffffff"]],"opacity": [[[],"1.0"]]},"ProgressBar-Indicator":{"background-color": [[[":error"],"2020cb"],[[":paused"],"ebebeb"],[[],"9f5800"]],"background-image": [[[],"ffffffff"]],"border": [[[],"36a"]],"opacity": [[[],"1.0"]]},"ExpandItem":{"border": [[[],"dfa628db"]],"border-radius": []},"CCombo-Field":{"padding": [[[],"120462f3"]]},"Shell-MaxButton":{"margin": [[[":inactive"],"1203fd80"],[[],"1203fd80"]],"background-image": [[[":hover",":inactive",":maximized"],"af6f6914"],[[":inactive",":maximized"],"b215a2e5"],[[":hover",":maximized"],"af6f6914"],[[":hover",":inactive"],"7f9d166a"],[[":maximized"],"b215a2e5"],[[":inactive"],"ec0d88bb"],[[":hover"],"7f9d166a"],[[],"ec0d88bb"]]},"Spinner-UpButton-Icon":{"background-image": [[[":hover"],"d18fce93"],[[],"f7d3d3a4"]]}},true);
22
ts.defineValues({"dimensions":{"0": 0,"40a": 22,"5e": 2,"8d": 3,"bc": 4,"2f0": 16,"eb": 5,"2c1": 15,"34e": 18,"3db": 21},"boxdims":{"1204d3a5": [4,5,4,5],"120509bd": [5,5,5,5],"12043ca2": [1,10,1,10],"120450d9": [1,19,1,1],"12045c02": [2,0,0,2],"1203fb40": [0,5,0,0],"1205a000": [8,0,0,0],"12045c30": [2,0,2,0],"1204990b": [3,3,3,3],"12046534": [2,4,2,4],"1205a4b2": [8,2,2,2],"1204630b": [2,3,3,3],"1203f708": [0,3,3,0],"1204d377": [4,5,2,7],"12050940": [5,5,0,0],"1203fd80": [0,6,0,0],"12049b4c": [3,4,3,4],"12046775": [2,5,2,5],"1203f6c4": [0,3,0,4],"120462f3": [2,3,2,3],"12049203": [3,0,0,3],"120498c0": [3,3,0,0],"120460b1": [2,2,2,1],"120460b2": [2,2,2,2],"12042a9a": [1,2,1,2],"12042cf3": [1,3,2,3],"1204cf0b": [4,3,3,3],"1203f4b0": [0,2,2,0],"1203f480": [0,2,0,0],"12046080": [2,2,0,0],"1203f032": [0,0,2,2],"1203f030": [0,0,2,0],"1203f000": [0,0,0,0],"1203f04b": [0,0,3,3],"1204969c": [3,2,1,4]},"images":{"ed198000": null,"5efe3aa4": ["5efe3aa4",10,7],"df7ccd2b": ["df7ccd2b",16,5],"91dcf9c9": ["91dcf9c9",9,6],"f9835c9c": ["f9835c9c",6,9],"361d46ab": ["361d46ab",16,16],"ecca8c00": null,"3d543571": ["3d543571",10,7],"343b3df0": ["343b3df0",32,32],"6344dd7c": ["6344dd7c",15,15],"5310f593": ["5310f593",10,7],"38e1b619": ["38e1b619",7,7],"ec0d88bb": ["ec0d88bb",11,11],"6b1ea041": ["6b1ea041",6,9],"19d00025": null,"a7f80000": null,"96f80000": null,"4a0314a6": ["4a0314a6",15,15],"6181cefe": ["6181cefe",11,11],"d2e3902": ["d2e3902",10,7],"fbf80000": null,"9ee04c5a": ["9ee04c5a",9,6],"b17f67f9": ["b17f67f9",15,15],"b7351000": null,"5b0e5823": ["5b0e5823",6,9],"9df80cc3": ["9df80cc3",32,32],"63bd404f": ["63bd404f",11,11],"2607b23b": ["2607b23b",6,7],"f1188849": ["f1188849",9,5],"b3abf2ab": ["b3abf2ab",9,6],"44404c00": null,"1f6c63f6": ["1f6c63f6",10,7],"5402a05a": ["5402a05a",16,16],"2ac7a085": ["2ac7a085",6,9],"c049f400": null,"6e49954c": ["6e49954c",6,7],"66f5543e": ["66f5543e",6,7],"f7d3d3a4": ["f7d3d3a4",9,6],"24c84a49": ["24c84a49",7,8],"c8c41a97": ["c8c41a97",8,7],"528db58f": ["528db58f",6,7],"fcf99fc5": ["fcf99fc5",7,4],"560eb7d2": ["560eb7d2",6,9],"44048316": ["44048316",6,9],"38054a38": ["38054a38",32,32],"81f5b807": ["81f5b807",15,15],"7f141d33": ["7f141d33",32,32],"3698ef47": ["3698ef47",10,7],"42f14f4f": ["42f14f4f",15,15],"25ae5c00": null,"b215a2e5": ["b215a2e5",11,11],"98f8b000": null,"1e7357aa": ["1e7357aa",7,7],"dc3f170": ["dc3f170",6,9],"7f9d166a": ["7f9d166a",11,11],"20ce8000": null,"7a6be800": null,"bf9cb6": ["bf9cb6",15,15],"ffffffff": null,"551f1d87": ["551f1d87",6,9],"e37249d4": ["e37249d4",32,32],"8ad6c431": ["8ad6c431",16,7],"f281857c": ["f281857c",1,1600],"9ae0f28": ["9ae0f28",15,15],"dd20909f": ["dd20909f",32,32],"a6cd3400": null,"ec3b45d8": ["ec3b45d8",11,11],"903cec2d": ["903cec2d",16,16],"7f000025": null,"f92762a9": ["f92762a9",11,11],"b2707000": null,"7c0538c2": ["7c0538c2",9,5],"d2eb04f8": ["d2eb04f8",9,6],"af6f6914": ["af6f6914",11,11],"d18fce93": ["d18fce93",9,6],"15180000": null,"7e94854d": ["7e94854d",15,15],"d40ced5e": ["d40ced5e",2,2],"9ece8000": null,"4fb4e47": ["4fb4e47",13,13],"4f80000": null,"6219d800": null,"9f000025": null,"f0f66998": ["f0f66998",6,9],"6da39160": ["6da39160",15,15],"3a888000": null,"fa5acbe": ["fa5acbe",16,16],"ff000025": null,"2282bd8b": ["2282bd8b",6,9],"37dc5d28": ["37dc5d28",32,32],"6356c615": ["6356c615",15,15]},"gradients":{"ed198000":{"percents": [0.0,52.0,100.0],"colors": ["#b0b0b0","#e0e0e0","#ffffff"],"vertical": true},"5efe3aa4": null,"df7ccd2b": null,"91dcf9c9": null,"f9835c9c": null,"361d46ab": null,"ecca8c00":{"percents": [0.0,100.0],"colors": ["#e0e0e0","#ffffff"],"vertical": true},"3d543571": null,"343b3df0": null,"6344dd7c": null,"5310f593": null,"38e1b619": null,"ec0d88bb": null,"6b1ea041": null,"19d00025":{"percents": [0.0,52.0,100.0],"colors": ["#e0e0e0","#e0e0e0","#b0b0b0"],"vertical": false},"a7f80000":{"percents": [0.0,42.0,58.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#cccccc"],"vertical": true},"96f80000":{"percents": [0.0,48.0,52.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#ffffff"],"vertical": true},"4a0314a6": null,"6181cefe": null,"d2e3902": null,"fbf80000":{"percents": [0.0,38.0,62.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#ffffff"],"vertical": true},"9ee04c5a": null,"b17f67f9": null,"b7351000":{"percents": [0.0,100.0],"colors": ["#ffffff","#e0e0e0"],"vertical": true},"5b0e5823": null,"9df80cc3": null,"63bd404f": null,"2607b23b": null,"f1188849": null,"b3abf2ab": null,"44404c00":{"percents": [0.0,100.0],"colors": ["#0078bf","#00589f"],"vertical": true},"1f6c63f6": null,"5402a05a": null,"2ac7a085": null,"c049f400":{"percents": [0.0,100.0],"colors": ["#fbfcfd","#ececec"],"vertical": true},"6e49954c": null,"66f5543e": null,"f7d3d3a4": null,"24c84a49": null,"c8c41a97": null,"528db58f": null,"fcf99fc5": null,"560eb7d2": null,"44048316": null,"38054a38": null,"81f5b807": null,"7f141d33": null,"3698ef47": null,"42f14f4f": null,"25ae5c00":{"percents": [0.0,100.0],"colors": ["#005fac","#005092"],"vertical": true},"b215a2e5": null,"98f8b000":{"percents": [0.0,100.0],"colors": ["#ffffff","#e4e5f0"],"vertical": true},"1e7357aa": null,"dc3f170": null,"7f9d166a": null,"20ce8000":{"percents": [0.0,52.0,100.0],"colors": ["#e0e0e0","#e0e0e0","#b0b0b0"],"vertical": true},"7a6be800":{"percents": [0.0,100.0],"colors": ["#a5a5a5","#858585"],"vertical": true},"bf9cb6": null,"ffffffff": null,"551f1d87": null,"e37249d4": null,"8ad6c431": null,"f281857c": null,"9ae0f28": null,"dd20909f": null,"a6cd3400":{"percents": [0.0,100.0],"colors": ["#595959","#4b4b4b"],"vertical": true},"ec3b45d8": null,"903cec2d": null,"7f000025":{"percents": [0.0,38.0,62.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#ffffff"],"vertical": false},"f92762a9": null,"b2707000":{"percents": [0.0,100.0],"colors": ["#dae9f7","#d2e0ee"],"vertical": true},"7c0538c2": null,"d2eb04f8": null,"af6f6914": null,"d18fce93": null,"15180000":{"percents": [0.0,30.0,70.0,100.0],"colors": ["#e0e0e0","#f0f0f0","#e0e0e0","#b0b0b0"],"vertical": true},"7e94854d": null,"d40ced5e": null,"9ece8000":{"percents": [0.0,52.0,100.0],"colors": ["#ffffff","#e0e0e0","#b0b0b0"],"vertical": true},"4fb4e47": null,"4f80000":{"percents": [0.0,48.0,52.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#cccccc"],"vertical": true},"6219d800":{"percents": [0.0,100.0],"colors": ["#f4f5f6","#e6e6e6"],"vertical": true},"9f000025":{"percents": [0.0,48.0,52.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#cccccc"],"vertical": false},"f0f66998": null,"6da39160": null,"3a888000":{"percents": [0.0,55.0,100.0],"colors": ["#ffffff","#e0e0e0","#f0f0f0"],"vertical": true},"fa5acbe": null,"ff000025":{"percents": [0.0,42.0,58.0,100.0],"colors": ["#ffffff","#f0f0f0","#e0e0e0","#cccccc"],"vertical": false},"2282bd8b": null,"37dc5d28": null,"6356c615": null},"colors":{"40024a4c": "#ebebeb","40047970": "#fcfcfc","3ff48b00": "#808080","3ffd1540": "#cb2020","40009eb8": "#dedede","40035180": "#f3f3f4","3ff133d8": "#666666","4004dc1c": "#ffffff","400457b0": "#fec83c","4003f66c": "#f8f8ff","3fe474a4": "#003399","3ff73db4": "#959595","3fe4aeec": "#00589f","3ff9f068": "#aaaaaa","3fed1e38": "#464a4e","3ffa2a74": "#aca899","3ff53320": "#85878c","3ffed240": "#d0d0d0","40006240": "#dcdfe4","3ffeb15c": "#cfcfcf","40000bec": "#d9e3f3","3fe4b0f4": "#0059a5","ffffffff": "undefined","3fe41900": "#000000","3fff1408": "#d2d2d2","3fe4f000": "#0080c0","3fed9ae8": "#4a4a4a","3ff3d584": "#7996a5","3ff92b10": "#a4a4a4","400034dc": "#dae9f7","3ffcc400": "#c0c0c0","3fe4ab90": "#00569c","3ff98c68": "#a7a6aa"},"fonts":{"dee31769":{"family": ["Verdana","Lucida Sans","Arial","Helvetica","sans-serif"],"size": 12,"bold": false,"italic": false},"67d9a7ad":{"family": ["Segoe UI","Corbel","Calibri","Tahoma","Lucida Sans Unicode"],"size": 11,"bold": false,"italic": false},"dee311c5":{"family": ["Verdana","Lucida Sans","Arial","Helvetica","sans-serif"],"size": 11,"bold": false,"italic": false},"c9a3013":{"family": ["Verdana","Lucida Sans","Arial","Helvetica","sans-serif"],"size": 14,"bold": true,"italic": false},"c9a2fa1":{"family": ["Verdana","Lucida Sans","Arial","Helvetica","sans-serif"],"size": 11,"bold": true,"italic": false}},"borders":{"c411a436":{"width": 1,"style": "outset","color": null},"e2677bf1":{"width": 1,"style": "solid","color": "#cccccc"},"de1b2d87":{"width": 1,"style": "solid","color": "#b4b4b4"},"8879b0d1":{"width": 1,"style": "solid","color": "#000000"},"98585c31":{"width": 1,"style": "solid","color": "#999999"},"92103dff":{"width": 2,"style": "solid","color": "#4b4b4b"},"dfa628db":{"width": 1,"style": "solid","color": "#c1c1c1"},"dc65e06a":{"width": 1,"style": "solid","color": "#a4a4a4"},"887c1e69":{"width": 1,"style": "solid","color": "#0059a5"},"dc902e9c":{"width": 1,"style": "solid","color": "#a7a6aa"},"36a":{"width": 0,"style": null,"color": null},"887bfd69":{"width": 2,"style": "solid","color": "#005092"},"2abfdf6d":{"width": 1,"style": "dotted","color": "#b8b8b8"},"5fbe2ff":{"width": 1,"style": "inset","color": null},"887c1601":{"width": 1,"style": "solid","color": "#00589f"}},"cursors":{"e81f3e3d": "pointer","5c13d641": "default"},"animations":{"7":{},"6d3dee97":{"hoverOut": [500,"easeOut"]},"4bbf0fbf":{"fadeIn": [200,"linear"],"fadeOut": [600,"easeOut"]},"4bbf04cf":{"fadeIn": [200,"linear"],"fadeOut": [400,"easeOut"]}},"shadows":{"29f72ebd": [false,5,5,3,0,"#000000",0.5],"306900d": null}});ts.setThemeCssValues("org.eclipse.swt.theme.Default",{"Spinner-DownButton":{"background-image": [[[":pressed"],"ed198000"],[[],"ecca8c00"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f030"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"DateTime-DropDownButton":{"background-image": [[[],"4f80000"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f4b0"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"CoolBar":{"background-image": [[[],"ffffffff"]]},"TreeColumn":{"color": [[[":disabled"],"3ffeb15c"],[[],"3ff133d8"]],"font": [[[],"dee31769"]],"background-color": [[[],"4003f66c"]],"background-image": [[[":hover"],"6219d800"],[[],"c049f400"]],"border-bottom": [[[":hover"],"36a"],[[],"36a"]],"padding": [[[],"12042a9a"]]},"ScrollBar-UpButton":{"background-color": [[[],"ffffffff"]],"border": [[[],"de1b2d87"]],"border-radius": [[["[VERTICAL"],"1203f04b"],[["[HORIZONTAL"],"1203f708"]],"background-image": [[[":pressed","[HORIZONTAL"],"20ce8000"],[[":hover","[HORIZONTAL"],"a7f80000"],[[":pressed","[VERTICAL"],"19d00025"],[[":hover","[VERTICAL"],"ff000025"],[["[HORIZONTAL"],"fbf80000"],[["[VERTICAL"],"7f000025"],[[],"ffffffff"]],"cursor": [[[],"5c13d641"]]},"ExpandItem-Button":{"background-image": [[[":expanded",":hover"],"903cec2d"],[[":expanded"],"fa5acbe"],[[":hover"],"5402a05a"],[[],"361d46ab"]]},"Spinner-UpButton":{"background-image": [[[":pressed"],"9ece8000"],[[],"b7351000"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f480"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"Group":{"background-color": [[[],"4004dc1c"]],"color": [[[":disabled"],"3ffeb15c"],[[],"3fed9ae8"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"Label-SeparatorLine":{"border": [[["[SHADOW_OUT"],"c411a436"],[["[SHADOW_IN"],"5fbe2ff"],[[],"dc65e06a"]],"border-radius": [[[],"1203f000"]],"background-color": [[[],"ffffffff"]],"background-image": [[[],"ffffffff"]],"width": [[[],"5e"]]},"Slider-UpButton":{"background-color": [[[],"ffffffff"]],"border": [[[],"dc65e06a"]],"border-radius": [[["[VERTICAL"],"1203f032"],[["[HORIZONTAL"],"1203f4b0"]],"background-image": [[[":pressed","[VERTICAL"],"19d00025"],[[":pressed","[HORIZONTAL"],"20ce8000"],[["[VERTICAL"],"9f000025"],[["[HORIZONTAL"],"4f80000"],[[],"ffffffff"]],"cursor": [[[],"5c13d641"]]},"DateTime":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed1e38"]],"background-color": [[[],"40047970"]],"font": [[[],"dee311c5"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"padding": [[[],"12042a9a"]]},"Tree-Cell":{"padding": [[[],"1204630b"]],"spacing": [[[],"8d"]]},"Slider-DownButton":{"background-color": [[[],"ffffffff"]],"border": [[[],"dc65e06a"]],"border-radius": [[["[VERTICAL"],"12046080"],[["[HORIZONTAL"],"12045c02"]],"background-image": [[[":pressed","[VERTICAL"],"19d00025"],[[":pressed","[HORIZONTAL"],"20ce8000"],[["[VERTICAL"],"9f000025"],[["[HORIZONTAL"],"4f80000"],[[],"ffffffff"]],"cursor": [[[],"5c13d641"]]},"CCombo-Button":{"background-image": [[[":pressed"],"20ce8000"],[[],"4f80000"]],"background-color": [[[],"ffffffff"]],"border": [[[":hover","[FLAT"],"c411a436"],[["[FLAT"],"36a"],[[],"36a"]],"border-radius": [[[],"1203f4b0"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"Shell":{"border": [[[":inactive",":maximized"],"36a"],[[":inactive","[TITLE"],"92103dff"],[[":inactive","[BORDER"],"92103dff"],[[":maximized"],"36a"],[["[BORDER"],"887bfd69"],[["[TITLE"],"887bfd69"],[[],"8879b0d1"]],"border-radius": [[[":inactive",":maximized"],"1203f000"],[[":maximized"],"1203f000"],[["[BORDER"],"12050940"],[["[TITLE"],"12050940"]],"background-image": [[[],"ffffffff"]],"padding": [[["[BORDER"],"120509bd"],[["[TITLE"],"120509bd"],[[],"1203f000"]],"background-color": [[["[BORDER"],"4004dc1c"],[["[TITLE"],"4004dc1c"],[[],"4004dc1c"]],"opacity": [[[],"1.0"]],"box-shadow": [[[":inactive",":maximized"],"306900d"],[[":inactive","[TITLE"],"306900d"],[[":inactive","[BORDER"],"306900d"],[[":maximized"],"306900d"],[["[BORDER"],"29f72ebd"],[["[TITLE"],"29f72ebd"],[[],"306900d"]]},"Combo":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed1e38"]],"background-color": [[[],"40047970"]],"font": [[[],"dee311c5"]],"border": [[[],"dfa628db"]],"border-radius": [[[],"120460b2"]]},"ExpandItem-Header":{"background-color": [[[],"4004dc1c"]],"background-image": [[[],"3a888000"]],"border": [[[],"36a"]],"border-radius": [],"cursor": [[[":disabled"],"5c13d641"],[[],"e81f3e3d"]]},"Combo-Button":{"background-image": [[[":pressed"],"20ce8000"],[[],"4f80000"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f4b0"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"ToolItem-DropDownIcon":{"background-image": [[[],"fcf99fc5"]],"border": [[[":hover"],"5fbe2ff"],[[],"36a"]]},"DateTime-Calendar-Day":{"color": [[[":hover",":selected"],"4004dc1c"],[[":otherMonth"],"3ff48b00"],[[":selected"],"3fed9ae8"],[[],"3fed9ae8"]],"background-color": [[[":selected",":unfocused"],"3ffcc400"],[[":hover",":selected"],"3fe4ab90"],[[":hover"],"40000bec"],[[":otherMonth"],"ffffffff"],[[":selected"],"3fff1408"],[[],"4004dc1c"]]},"TableItem":{"color": [[[":even",":linesvisible",":selected",":unfocused"],"4004dc1c"],[[":even",":linesvisible",":selected"],"4004dc1c"],[[":selected",":unfocused"],"4004dc1c"],[[":selected"],"4004dc1c"],[[":disabled"],"3ffeb15c"],[[],"ffffffff"]],"background-color": [[[":even",":linesvisible",":selected",":unfocused"],"3ff73db4"],[[":even",":linesvisible",":selected"],"3fe4aeec"],[[":even",":hover",":linesvisible"],"400034dc"],[[":even",":linesvisible"],"40035180"],[[":selected",":unfocused"],"3ff73db4"],[[":selected"],"3fe4aeec"],[[":hover"],"400034dc"],[[],"ffffffff"]],"text-decoration": [[[],"none"]]},"*":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed9ae8"]],"background-color": [[[],"4004dc1c"]],"background-image": [[[],"ffffffff"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"padding": [[[],"1203f000"]]},"Tree-GridLine":{"color": [[[":horizontal"],"ffffffff"],[[],"3ffed240"]]},"CCombo-Button-Icon":{"background-image": [[[":hover"],"d2eb04f8"],[[],"91dcf9c9"]]},"Combo-Button-Icon":{"background-image": [[[":hover"],"d2eb04f8"],[[],"91dcf9c9"]]},"DateTime-UpButton-Icon":{"background-image": [[[":hover"],"d18fce93"],[[],"f7d3d3a4"]]},"Sash":{"background-color": [[[":hover"],"400034dc"],[[],"ffffffff"]],"background-image": [[[],"ffffffff"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"TabItem":{"background-color": [[[":hover"],"400034dc"],[[":selected"],"4004dc1c"],[[],"4004dc1c"]],"background-image": [[[":hover"],"ffffffff"],[[":selected"],"ffffffff"],[[],"ffffffff"]],"border-top-color": [[[":selected"],"3fe4aeec"],[[],"4004dc1c"]],"border-bottom-color": [[[":selected"],"3fe4aeec"],[[],"4004dc1c"]]},"ToolItem-Separator":{"width": [[[],"bc"]]},"TableColumn-SortIndicator":{"background-image": [[[":down"],"f1188849"],[[":up"],"7c0538c2"],[[],"ffffffff"]]},"ToolTip-Text":{"color": [[[],"3fe474a4"]],"font": [[[],"c9a3013"]]},"ScrollBar":{"background-color": [[[],"40035180"]],"border": [[[],"36a"]],"border-radius": [[[],"1204990b"]],"width": [[[],"2c1"]]},"ProgressBar":{"background-color": [[[],"4004dc1c"]],"background-image": [[[],"ffffffff"]],"border": [[[],"dc65e06a"]],"border-radius": [[[],"120460b2"]]},"Group-Frame":{"border": [[[],"e2677bf1"]],"border-radius": [[[],"120460b2"]],"margin": [[[],"1205a000"]],"padding": [[[],"1205a4b2"]]},"TreeColumn-SortIndicator":{"background-image": [[[":down"],"f1188849"],[[":up"],"7c0538c2"],[[],"ffffffff"]]},"Shell-MinButton":{"margin": [[[":inactive"],"1203fd80"],[[],"1203fd80"]],"background-image": [[[":hover",":inactive"],"ec3b45d8"],[[":inactive"],"f92762a9"],[[":hover"],"ec3b45d8"],[[],"f92762a9"]]},"TableColumn":{"color": [[[":disabled"],"3ffeb15c"],[[],"3ff133d8"]],"font": [[[],"dee31769"]],"background-color": [[[],"4003f66c"]],"background-image": [[[":hover"],"6219d800"],[[],"c049f400"]],"border-bottom": [[[":hover"],"36a"],[[],"36a"]],"padding": [[[],"12042a9a"]]},"ToolTip-Image":{"background-image": [[["[ICON_WARNING"],"7f141d33"],[["[ICON_INFORMATION"],"9df80cc3"],[["[ICON_ERROR"],"dd20909f"],[[],"ffffffff"]]},"ScrollBar-Thumb-Icon":{"background-image": [[["[HORIZONTAL"],"c8c41a97"],[["[VERTICAL"],"24c84a49"],[[],"ffffffff"]]},"CTabItem":{"font": [[[],"dee31769"]],"color": [[[":disabled"],"3fe41900"],[[":selected"],"4004dc1c"],[[],"3fed9ae8"]],"background-color": [[[":selected"],"3fe4aeec"],[[],"4004dc1c"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"12046534"]],"spacing": [[[],"bc"]]},"Combo-Field":{"padding": [[[],"120462f3"]]},"Table":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed9ae8"]],"background-color": [[[],"4004dc1c"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"background-image": [[[],"ffffffff"]]},"Text-Message":{"color": [[[],"3ff98c68"]]},"Slider-DownButton-Icon":{"background-image": [[[":hover","[VERTICAL"],"d18fce93"],[[":hover","[HORIZONTAL"],"551f1d87"],[["[VERTICAL"],"f7d3d3a4"],[["[HORIZONTAL"],"f0f66998"],[[],"ffffffff"]]},"Spinner-Field":{"padding": [[[],"120462f3"]]},"Tree":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed9ae8"]],"background-color": [[[],"4004dc1c"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"Widget-ToolTip":{"color": [[[],"3fed9ae8"]],"background-color": [[[],"400034dc"]],"border": [[[],"887c1601"]],"border-radius": [[[],"120460b2"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"12042cf3"]],"font": [[[],"dee31769"]],"opacity": [[[],"1.0"]],"animation": [[[],"4bbf0fbf"]]},"DateTime-Calendar-PreviousYearButton":{"background-image": [[[":hover"],"1f6c63f6"],[[],"3698ef47"]],"cursor": [[[],"5c13d641"]]},"List-Item":{"color": [[[":even",":selected",":unfocused"],"4004dc1c"],[[":even",":selected"],"4004dc1c"],[[":selected",":unfocused"],"4004dc1c"],[[":selected"],"4004dc1c"],[[":disabled"],"3ffeb15c"],[[],"ffffffff"]],"background-color": [[[":even",":selected",":unfocused"],"3ff73db4"],[[":even",":selected"],"3fe4aeec"],[[":even",":hover"],"400034dc"],[[":selected",":unfocused"],"3ff73db4"],[[":even"],"40035180"],[[":selected"],"3fe4aeec"],[[":hover"],"400034dc"],[[],"ffffffff"]],"background-image": [[[":even",":selected",":unfocused"],"7a6be800"],[[":even",":selected"],"44404c00"],[[":selected",":unfocused"],"7a6be800"],[[":selected"],"44404c00"],[[":hover"],"b2707000"],[[],"ffffffff"]]},"Scale-Thumb":{"background-color": [[[],"3fe4aeec"]]},"Link":{"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"Button-CheckIcon":{"background-image": [[[":grayed",":hover",":selected"],"bf9cb6"],[[":grayed",":selected"],"81f5b807"],[[":hover",":selected"],"42f14f4f"],[[":selected"],"6da39160"],[[":hover"],"9ae0f28"],[[],"b17f67f9"]]},"Table-GridLine":{"color": [[[":horizontal"],"ffffffff"],[[],"40009eb8"]]},"Shell-CloseButton":{"margin": [[[":inactive"],"1203fb40"],[[],"1203fb40"]],"background-image": [[[":hover",":inactive"],"6181cefe"],[[":inactive"],"63bd404f"],[[":hover"],"6181cefe"],[[],"63bd404f"]]},"DateTime-DownButton-Icon":{"background-image": [[[":hover"],"9ee04c5a"],[[],"b3abf2ab"]]},"Label":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed9ae8"]],"background-color": [[[],"4004dc1c"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"cursor": [[[],"5c13d641"]],"background-image": [[[],"ffffffff"]],"text-decoration": [[[],"none"]],"opacity": [[[],"1.0"]]},"Shell-Titlebar":{"color": [[[":inactive"],"3ff9f068"],[[],"4004dc1c"]],"background-color": [[[":inactive"],"3ff3d584"],[[],"3fe4f000"]],"background-gradient-color": [[[":inactive"],"3ff3d584"],[[],"3fe4f000"]],"background-image": [[[":inactive"],"a6cd3400"],[[],"25ae5c00"]],"font": [[[],"dee31769"]],"margin": [[[],"1203f000"]],"padding": [[[],"12046775"]],"height": [[[],"40a"]],"border": [[[],"36a"]],"border-radius": [[[],"120498c0"]]},"Tree-Indent":{"width": [[[],"2f0"]],"background-image": [[[":expanded",":first",":hover",":last"],"38e1b619"],[[":collapsed",":first",":hover",":last"],"2282bd8b"],[[":expanded",":first",":last"],"1e7357aa"],[[":collapsed",":first",":last"],"f9835c9c"],[[":expanded",":hover",":last"],"38e1b619"],[[":collapsed",":hover",":last"],"2282bd8b"],[[":expanded",":first",":hover"],"38e1b619"],[[":collapsed",":first",":hover"],"2282bd8b"],[[":first",":last"],"ffffffff"],[[":expanded",":last"],"1e7357aa"],[[":collapsed",":last"],"f9835c9c"],[[":expanded",":first"],"1e7357aa"],[[":collapsed",":first"],"f9835c9c"],[[":expanded",":hover"],"38e1b619"],[[":collapsed",":hover"],"2282bd8b"],[[":last"],"ffffffff"],[[":first"],"ffffffff"],[[":line"],"ffffffff"],[[":expanded"],"1e7357aa"],[[":collapsed"],"f9835c9c"],[[],"ffffffff"]]},"Combo-List":{"border": [[[],"dfa628db"]],"border-radius": [[[],"1203f032"]]},"Combo-FocusIndicator":{"background-color": [[[],"ffffffff"]],"border": [[[],"2abfdf6d"]],"margin": [[[],"120450d9"]],"opacity": [[[],"1.0"]]},"DateTime-DownButton":{"background-image": [[[":pressed"],"ed198000"],[[],"ecca8c00"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f030"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"Link-Hyperlink":{"color": [[[":disabled"],"3ff73db4"],[[],"3fe4aeec"]]},"Spinner":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed1e38"]],"background-color": [[[],"40047970"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"padding": [[[],"12042a9a"]]},"MenuItem-CascadeIcon":{"background-image": [[[],"4fb4e47"]]},"ToolItem":{"color": [[[":disabled"],"3ffeb15c"],[[],"ffffffff"]],"background-color": [[[":hover"],"4004dc1c"],[[],"ffffffff"]],"background-image": [[[":selected"],"d40ced5e"],[[":pressed"],"d40ced5e"],[[],"ffffffff"]],"border": [[[":selected"],"dc65e06a"],[[":pressed"],"dc65e06a"],[[":hover"],"dc65e06a"],[["[FLAT"],"36a"],[[],"36a"]],"border-radius": [[[":selected"],"120460b2"],[[":pressed"],"120460b2"],[[":hover"],"120460b2"],[[],"1203f000"]],"animation": [[[],"7"]],"spacing": [[[],"bc"]],"padding": [[[":selected"],"1204969c"],[[":pressed"],"1204969c"],[[":hover"],"120462f3"],[["[FLAT"],"12049b4c"],[[],"120462f3"]],"opacity": [[[],"1.0"]]},"CTabFolder":{"border-color": [[[],"3ff92b10"]],"border-radius": [[[],"120460b2"]]},"Tree-Checkbox":{"margin": [[[],"1203f480"]],"background-image": [[[":checked",":grayed",":hover"],"bf9cb6"],[[":checked",":grayed"],"81f5b807"],[[":checked",":hover"],"42f14f4f"],[[":checked"],"6da39160"],[[":hover"],"9ae0f28"],[[],"b17f67f9"]]},"Menu":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fe4b0f4"]],"background-color": [[[],"4004dc1c"]],"background-image": [[[],"ffffffff"]],"font": [[[],"dee31769"]],"border": [[[],"887c1e69"]],"border-radius": [[[],"120460b2"]],"opacity": [[[],"1.0"]],"padding": [[[],"12045c30"]],"animation": [[[],"7"]]},"TabFolder":{},"Button":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed9ae8"]],"background-color": [[[],"4004dc1c"]],"background-image": [[[":hover",":selected","[TOGGLE"],"20ce8000"],[["[BORDER","[RADIO"],"ffffffff"],[["[BORDER","[CHECK"],"ffffffff"],[[":selected","[TOGGLE"],"15180000"],[[":pressed","[TOGGLE"],"20ce8000"],[[":pressed","[PUSH"],"20ce8000"],[[":hover","[TOGGLE"],"4f80000"],[[":hover","[PUSH"],"4f80000"],[["[BORDER"],"96f80000"],[["[TOGGLE"],"96f80000"],[["[PUSH"],"96f80000"],[[],"ffffffff"]],"border": [[["[BORDER"],"dc65e06a"],[["[TOGGLE"],"dc65e06a"],[["[PUSH"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"1204990b"],[["[TOGGLE"],"1204990b"],[["[PUSH"],"1204990b"]],"opacity": [[[],"1.0"]],"animation": [[[":pressed","[TOGGLE"],"7"],[[":pressed","[PUSH"],"7"],[["[BORDER"],"6d3dee97"],[["[TOGGLE"],"6d3dee97"],[["[PUSH"],"6d3dee97"],[[],"7"]],"cursor": [[[":disabled","[TOGGLE"],"5c13d641"],[[":disabled","[PUSH"],"5c13d641"],[["[BORDER"],"e81f3e3d"],[["[TOGGLE"],"e81f3e3d"],[["[PUSH"],"e81f3e3d"],[[],"5c13d641"]],"padding": [[[":pressed","[TOGGLE"],"1204d377"],[[":pressed","[PUSH"],"1204d377"],[["[BORDER"],"12046775"],[["[TOGGLE"],"12046775"],[["[PUSH"],"12046775"],[[],"1204d3a5"]],"spacing": [[["[RADIO"],"bc"],[["[CHECK"],"bc"],[[],"5e"]],"font": [[[],"dee31769"]]},"CLabel":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed9ae8"]],"background-color": [[[],"4004dc1c"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"cursor": [[[],"5c13d641"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"1204990b"]],"spacing": [[[],"eb"]],"opacity": [[[],"1.0"]]},"MenuItem-CheckIcon":{"background-image": [[[],"8ad6c431"]]},"Scale":{"background-color": [[[],"4004dc1c"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": []},"ToolTip":{"font": [[[],"dee31769"]],"color": [[[],"3fe41900"]],"background-color": [[[],"40047970"]],"cursor": [[[],"5c13d641"]],"background-image": [[[],"98f8b000"]],"opacity": [[[],"1.0"]],"border": [[[],"dc65e06a"]],"border-radius": [[[],"120509bd"]],"padding": [[[],"1204990b"]],"animation": [[[],"4bbf0fbf"]]},"Slider-Thumb":{"background-color": [[[],"ffffffff"]],"border": [[[],"dc65e06a"]],"border-radius": [[[],"120460b2"]],"background-image": [[[":pressed","[VERTICAL"],"19d00025"],[[":pressed","[HORIZONTAL"],"20ce8000"],[["[VERTICAL"],"9f000025"],[["[HORIZONTAL"],"4f80000"],[[],"ffffffff"]]},"CCombo-List":{"border": [[[],"dfa628db"]],"border-radius": [[[],"1203f032"]]},"ScrollBar-DownButton-Icon":{"background-image": [[[":hover","[HORIZONTAL"],"560eb7d2"],[[":hover","[VERTICAL"],"d18fce93"],[["[HORIZONTAL"],"5b0e5823"],[["[VERTICAL"],"f7d3d3a4"],[[],"ffffffff"]]},"Display":{"rwt-shadow-color": [[[],"3ff98c68"]],"rwt-highlight-color": [[[],"4004dc1c"]],"rwt-darkshadow-color": [[[],"3ff53320"]],"rwt-lightshadow-color": [[[],"40006240"]],"rwt-thinborder-color": [[[],"3ffa2a74"]],"rwt-selectionmarker-color": [[[],"400457b0"]],"rwt-infobackground-color": [[[],"4004dc1c"]],"rwt-error-image": [[[],"e37249d4"]],"rwt-information-image": [[[],"38054a38"]],"rwt-working-image": [[[],"38054a38"]],"rwt-question-image": [[[],"343b3df0"]],"rwt-warning-image": [[[],"37dc5d28"]],"rwt-fontlist": [[[],"67d9a7ad"]],"background-image": [[[],"f281857c"]],"font": [[[],"dee31769"]]},"ToolBar":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fe41900"]],"background-color": [[[],"4004dc1c"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"1203f000"]],"spacing": [[[],"0"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"opacity": [[[],"1.0"]]},"ExpandBar":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed9ae8"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dfa628db"],[[],"36a"]],"border-radius": []},"Button-RadioIcon":{"background-image": [[[":hover",":selected"],"6344dd7c"],[[":selected"],"7e94854d"],[[":hover"],"6356c615"],[[],"4a0314a6"]]},"DateTime-DropDownCalendar":{"border": [[[],"dc902e9c"]]},"DateTime-Field":{"color": [[[":selected"],"3fed9ae8"],[[],"3fed9ae8"]],"background-color": [[[":selected"],"3fff1408"],[[],"4004dc1c"]],"padding": [[[],"120462f3"]]},"DateTime-Calendar-NextYearButton":{"background-image": [[[":hover"],"5310f593"],[[],"5efe3aa4"]],"cursor": [[[],"5c13d641"]]},"ScrollBar-UpButton-Icon":{"background-image": [[[":hover","[HORIZONTAL"],"2ac7a085"],[[":hover","[VERTICAL"],"9ee04c5a"],[["[HORIZONTAL"],"44048316"],[["[VERTICAL"],"b3abf2ab"],[[],"ffffffff"]]},"DateTime-Calendar-NextMonthButton":{"background-image": [[[":hover"],"66f5543e"],[[],"528db58f"]],"cursor": [[[],"5c13d641"]]},"CCombo":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed1e38"]],"background-color": [[[],"40047970"]],"font": [[[],"dee311c5"]],"border": [[["[BORDER"],"dfa628db"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"],[[],"120460b2"]]},"ScrollBar-Thumb":{"background-color": [[[],"ffffffff"]],"border": [[[":pressed"],"98585c31"],[[],"de1b2d87"]],"border-radius": [[[],"1203f000"]],"background-image": [[[":pressed","[HORIZONTAL"],"20ce8000"],[[":hover","[HORIZONTAL"],"a7f80000"],[[":pressed","[VERTICAL"],"19d00025"],[[":hover","[VERTICAL"],"ff000025"],[["[HORIZONTAL"],"fbf80000"],[["[VERTICAL"],"7f000025"],[[],"ffffffff"]]},"CCombo-FocusIndicator":{"background-color": [[[],"ffffffff"]],"border": [[[],"2abfdf6d"]],"margin": [[[],"120450d9"]],"opacity": [[[],"1.0"]]},"Composite":{"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [],"background-color": [[["[BORDER"],"4004dc1c"],[[],"4004dc1c"]],"background-image": [[["[BORDER"],"ffffffff"],[[],"ffffffff"]],"padding": [[[],"1203f000"]],"opacity": [[[],"1.0"]]},"MenuItem-RadioIcon":{"background-image": [[[],"df7ccd2b"]]},"Slider-UpButton-Icon":{"background-image": [[[":hover","[VERTICAL"],"9ee04c5a"],[[":hover","[HORIZONTAL"],"dc3f170"],[["[VERTICAL"],"b3abf2ab"],[["[HORIZONTAL"],"6b1ea041"],[[],"ffffffff"]]},"Group-Label":{"border": [[[],"36a"]],"border-radius": [],"padding": [[[],"1203f6c4"]],"margin": [[[],"12043ca2"]],"background-color": [[[],"ffffffff"]],"color": [[[],"3fed1e38"]]},"Table-Checkbox":{"width": [[[],"3db"]],"margin": [[[],"1203f000"]],"background-image": [[[":checked",":grayed",":hover"],"bf9cb6"],[[":checked",":grayed"],"81f5b807"],[[":checked",":hover"],"42f14f4f"],[[":checked"],"6da39160"],[[":hover"],"9ae0f28"],[[],"b17f67f9"]]},"TreeItem":{"color": [[[":even",":linesvisible",":selected",":unfocused"],"4004dc1c"],[[":even",":linesvisible",":selected"],"4004dc1c"],[[":selected",":unfocused"],"4004dc1c"],[[":selected"],"4004dc1c"],[[":disabled"],"3ffeb15c"],[[],"ffffffff"]],"background-color": [[[":even",":linesvisible",":selected",":unfocused"],"3ff73db4"],[[":even",":linesvisible",":selected"],"3fe4aeec"],[[":even",":hover",":linesvisible"],"400034dc"],[[":even",":linesvisible"],"40035180"],[[":selected",":unfocused"],"3ff73db4"],[[":selected"],"3fe4aeec"],[[":hover"],"400034dc"],[[],"ffffffff"]],"text-decoration": [[[],"none"]]},"DateTime-DropDownButton-Icon":{"background-image": [[[":hover"],"9ee04c5a"],[[],"b3abf2ab"]]},"Slider":{"background-color": [[[],"40035180"]],"border": [[[],"36a"]],"border-radius": []},"Browser":{"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"DateTime-Calendar-Navbar":{"border": [[[],"36a"]],"border-radius": [],"color": [[[":disabled"],"3ffeb15c"],[[],"4004dc1c"]],"background-color": [[[],"3fe4ab90"]],"font": [[[],"c9a2fa1"]]},"CoolItem-Handle":{"border": [[[],"c411a436"]],"width": [[[],"bc"]]},"ToolTip-Message":{"color": [[[],"3fe41900"]],"font": [[[],"dee31769"]]},"ScrollBar-DownButton":{"background-color": [[[],"ffffffff"]],"border": [[[],"de1b2d87"]],"border-radius": [[["[VERTICAL"],"120498c0"],[["[HORIZONTAL"],"12049203"]],"background-image": [[[":pressed","[HORIZONTAL"],"20ce8000"],[[":hover","[HORIZONTAL"],"a7f80000"],[[":pressed","[VERTICAL"],"19d00025"],[[":hover","[VERTICAL"],"ff000025"],[["[HORIZONTAL"],"fbf80000"],[["[VERTICAL"],"7f000025"],[[],"ffffffff"]],"cursor": [[[],"5c13d641"]]},"List":{"font": [[[],"dee31769"]],"color": [[[":disabled"],"3ffeb15c"],[[],"3fed9ae8"]],"background-color": [[[],"4004dc1c"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]]},"DateTime-UpButton":{"background-image": [[[":pressed"],"9ece8000"],[[],"b7351000"]],"background-color": [[[],"ffffffff"]],"border": [[[],"36a"]],"border-radius": [[[],"1203f480"]],"cursor": [[[],"5c13d641"]],"width": [[[],"34e"]]},"Shell-DisplayOverlay":{"background-color": [[[],"3ff48b00"]],"background-image": [[[],"ffffffff"]],"animation": [[[],"4bbf04cf"]],"opacity": [[[],"0.2"]]},"Button-FocusIndicator":{"background-color": [[["[RADIO"],"ffffffff"],[["[CHECK"],"ffffffff"],[["[TOGGLE"],"ffffffff"],[["[PUSH"],"ffffffff"],[[],"4004dc1c"]],"border": [[["[RADIO"],"2abfdf6d"],[["[CHECK"],"2abfdf6d"],[["[TOGGLE"],"2abfdf6d"],[["[PUSH"],"2abfdf6d"],[["[BORDER"],"dc65e06a"],[[],"36a"]],"padding": [[["[RADIO"],"120460b1"],[["[CHECK"],"120460b1"],[["[TOGGLE"],"1203f000"],[["[PUSH"],"1203f000"],[[],"1203f000"]],"margin": [[["[RADIO"],"1203f000"],[["[CHECK"],"1203f000"],[["[TOGGLE"],"120460b2"],[["[PUSH"],"120460b2"]],"opacity": [[["[RADIO"],"1.0"],[["[CHECK"],"1.0"],[["[TOGGLE"],"1.0"],[["[PUSH"],"1.0"]]},"Sash-Handle":{"background-image": [[[],"ffffffff"]]},"CTabFolder-DropDownButton-Icon":{"background-image": [[[":hover"],"3d543571"],[[],"d2e3902"]]},"DateTime-Calendar-PreviousMonthButton":{"background-image": [[[":hover"],"2607b23b"],[[],"6e49954c"]],"cursor": [[[],"5c13d641"]]},"Spinner-DownButton-Icon":{"background-image": [[[":hover"],"9ee04c5a"],[[],"b3abf2ab"]]},"Table-Cell":{"padding": [[[],"1204cf0b"]],"spacing": [[[],"8d"]]},"Text":{"color": [[[":disabled"],"3ffeb15c"],[[],"3fed1e38"]],"background-color": [[[],"40047970"]],"font": [[[],"dee31769"]],"border": [[["[BORDER"],"dc65e06a"],[[],"36a"]],"border-radius": [[["[BORDER"],"120460b2"]],"background-image": [[[],"ffffffff"]],"padding": [[[],"120462f3"]]},"MenuItem":{"color": [[[":hover"],"3fed9ae8"],[[":disabled"],"3ffeb15c"],[[],"3fe41900"]],"background-color": [[[":hover"],"400034dc"],[[],"ffffffff"]],"background-image": [[[],"ffffffff"]],"opacity": [[[],"1.0"]]},"ProgressBar-Indicator":{"background-color": [[[":error"],"3ffd1540"],[[":paused"],"40024a4c"],[[],"3fe4aeec"]],"background-image": [[[],"ffffffff"]],"border": [[[],"36a"]],"opacity": [[[],"1.0"]]},"ExpandItem":{"border": [[[],"dfa628db"]],"border-radius": []},"CCombo-Field":{"padding": [[[],"120462f3"]]},"Shell-MaxButton":{"margin": [[[":inactive"],"1203fd80"],[[],"1203fd80"]],"background-image": [[[":hover",":inactive",":maximized"],"af6f6914"],[[":inactive",":maximized"],"b215a2e5"],[[":hover",":maximized"],"af6f6914"],[[":hover",":inactive"],"7f9d166a"],[[":maximized"],"b215a2e5"],[[":inactive"],"ec0d88bb"],[[":hover"],"7f9d166a"],[[],"ec0d88bb"]]},"Spinner-UpButton-Icon":{"background-image": [[[":hover"],"d18fce93"],[[],"f7d3d3a4"]]}},true);
23
delete ts;
23
delete ts;
24
qx.io.Alias.getInstance().add( "static", "../org.eclipse.rap.rwt.q07/js/resource/static" );
24
qx.io.Alias.getInstance().add( "static", "../org.eclipse.rap.rwt.q07/js/resource/static" );
25
qx.io.Alias.getInstance().add( "org.eclipse.swt", "../org.eclipse.rap.rwt.q07/js/resource" );
25
qx.io.Alias.getInstance().add( "org.eclipse.swt", "../org.eclipse.rap.rwt.q07/js/resource" );
(-)src/org/eclipse/rwt/internal/theme/QxColor_Test.java (-7 / +48 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2009 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2007, 2011 Innoopract Informationssysteme GmbH.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 39-50 Link Here
39
    }
39
    }
40
  }
40
  }
41
41
42
  public void testIllegalArguments_OutOfRangeAlpha() {
43
    try {
44
      QxColor.valueOf( "1, 2, 3, 1.01" );
45
      fail( "Exception expected" );
46
    } catch( IllegalArgumentException e ) {
47
      // expected
48
    }
49
  }
50
51
  public void testIllegalArguments_NegativeAlpha() {
52
    try {
53
      QxColor.valueOf( "1, 2, 3, -0.01" );
54
      fail( "Exception expected" );
55
    } catch( IllegalArgumentException e ) {
56
      // expected
57
    }
58
  }
59
42
  public void test6HexNotation() {
60
  public void test6HexNotation() {
43
    QxColor color1 = QxColor.valueOf( "#0023ff" );
61
    QxColor color1 = QxColor.valueOf( "#0023ff" );
44
    assertEquals( 0, color1.red );
62
    assertEquals( 0, color1.red );
45
    assertEquals( 35, color1.green );
63
    assertEquals( 35, color1.green );
46
    assertEquals( 255, color1.blue );
64
    assertEquals( 255, color1.blue );
47
    assertFalse( color1.transparent );
65
    assertEquals( 1f, color1.alpha, 0 );
48
    QxColor color2 = QxColor.valueOf( "#efeFEF" );
66
    QxColor color2 = QxColor.valueOf( "#efeFEF" );
49
    assertEquals( 239, color2.red );
67
    assertEquals( 239, color2.red );
50
    assertEquals( 239, color2.green );
68
    assertEquals( 239, color2.green );
Lines 56-62 Link Here
56
    assertEquals( 0, color1.red );
74
    assertEquals( 0, color1.red );
57
    assertEquals( 51, color1.green );
75
    assertEquals( 51, color1.green );
58
    assertEquals( 255, color1.blue );
76
    assertEquals( 255, color1.blue );
59
    assertFalse( color1.transparent );
77
    assertEquals( 1f, color1.alpha, 0 );
60
    QxColor color2 = QxColor.valueOf( "#ccc" );
78
    QxColor color2 = QxColor.valueOf( "#ccc" );
61
    assertEquals( 204, color2.red );
79
    assertEquals( 204, color2.red );
62
    assertEquals( 204, color2.green );
80
    assertEquals( 204, color2.green );
Lines 69-75 Link Here
69
    assertEquals( 255, color1.red );
87
    assertEquals( 255, color1.red );
70
    assertEquals( 0, color1.green );
88
    assertEquals( 0, color1.green );
71
    assertEquals( 0, color1.blue );
89
    assertEquals( 0, color1.blue );
72
    assertFalse( color1.transparent );
90
    assertEquals( 1f, color1.alpha, 0 );
73
    QxColor color2 = QxColor.valueOf( "blue" );
91
    QxColor color2 = QxColor.valueOf( "blue" );
74
    assertEquals( 0, color2.red );
92
    assertEquals( 0, color2.red );
75
    assertEquals( 0, color2.green );
93
    assertEquals( 0, color2.green );
Lines 81-91 Link Here
81
    assertEquals( 100, color.red );
99
    assertEquals( 100, color.red );
82
    assertEquals( 23, color.green );
100
    assertEquals( 23, color.green );
83
    assertEquals( 42, color.blue );
101
    assertEquals( 42, color.blue );
84
    assertFalse( color.transparent );
102
    assertEquals( 1f, color.alpha, 0 );
103
  }
104
105
  public void testCommaSeparatedValues_WithAlpha() {
106
    QxColor color = QxColor.valueOf( "100, 23, 42, 0.5" );
107
    assertEquals( 100, color.red );
108
    assertEquals( 23, color.green );
109
    assertEquals( 42, color.blue );
110
    assertEquals( 0.5, color.alpha, 0 );
85
  }
111
  }
86
112
87
  public void testTransparent() {
113
  public void testTransparent() {
88
    assertTrue( QxColor.TRANSPARENT.transparent );
114
    assertTrue( QxColor.TRANSPARENT.isTransparent() );
89
  }
115
  }
90
116
91
  public void testShared() {
117
  public void testShared() {
Lines 100-112 Link Here
100
126
101
  public void testToString() {
127
  public void testToString() {
102
    QxColor color = QxColor.valueOf( "100, 23, 42" );
128
    QxColor color = QxColor.valueOf( "100, 23, 42" );
103
    assertEquals( "QxColor{ 100, 23, 42 }", color.toString() );
129
    assertEquals( "QxColor{ 100, 23, 42, 1.0 }", color.toString() );
130
  }
131
132
  public void testToString_WithAlpha() {
133
    QxColor color = QxColor.valueOf( "100, 23, 42, 0.5" );
134
    assertEquals( "QxColor{ 100, 23, 42, 0.5 }", color.toString() );
104
  }
135
  }
105
136
106
  public void testDefaultString() {
137
  public void testDefaultString() {
107
    QxColor color = QxColor.valueOf( "100, 23, 42" );
138
    QxColor color = QxColor.valueOf( "100, 23, 42" );
108
    assertEquals( "#64172a", color.toDefaultString() );
139
    assertEquals( "#64172a", color.toDefaultString() );
109
  }
140
  }
141
  
142
  public void testDefaultString_Transparent() {
143
    QxColor color = QxColor.valueOf( "100, 23, 42, 0" );
144
    assertEquals( "transparent", color.toDefaultString() );
145
  }
146
147
  public void testDefaultString_WithAlpha() {
148
    QxColor color = QxColor.valueOf( "100, 23, 42, 0.5" );
149
    assertEquals( "rgba(100,23,42,0.5)", color.toDefaultString() );
150
  }
110
151
111
  public void testWithTurkishLocale() {
152
  public void testWithTurkishLocale() {
112
    Locale originalLocale = Locale.getDefault();
153
    Locale originalLocale = Locale.getDefault();
(-)src/org/eclipse/rwt/internal/theme/QxShadow_Test.java (+113 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 EclipseSource and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution, 
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
6
 *
7
 * Contributors:
8
 *   EclipseSource - initial API and implementation
9
 ******************************************************************************/
10
package org.eclipse.rwt.internal.theme;
11
12
import junit.framework.TestCase;
13
14
15
public class QxShadow_Test extends TestCase {
16
  
17
  public void testIllegalArguments_Inset() {
18
    try {
19
      QxShadow.create( true, 10, 10, 0, 0, QxColor.BLACK );
20
      fail( "Exception expected" );
21
    } catch( IllegalArgumentException e ) {
22
      // expected
23
    }
24
  }
25
26
  public void testIllegalArguments_NegativeBlur() {
27
    try {
28
      QxShadow.create( false, 10, 10, -10, 0, QxColor.BLACK );
29
      fail( "Exception expected" );
30
    } catch( IllegalArgumentException e ) {
31
      // expected
32
    }
33
  }
34
  
35
  public void testIllegalArguments_SpreadNotZero() {
36
    try {
37
      QxShadow.create( false, 10, 10, 0, 10, QxColor.BLACK );
38
      fail( "Exception expected" );
39
    } catch( IllegalArgumentException e ) {
40
      // expected
41
    }
42
  }
43
  
44
  public void testIllegalArguments_NullColor() {
45
    try {
46
      QxShadow.create( false, 10, 10, 0, 0, null );
47
      fail( "Exception expected" );
48
    } catch( NullPointerException e ) {
49
      // expected
50
    }
51
  }
52
53
  public void testCreate_WithoutOpacity() {
54
    QxShadow shadow = QxShadow.create( false, 10, 10, 0, 0, QxColor.BLACK );
55
    assertNotNull( shadow );
56
    assertFalse( shadow.inset );
57
    assertEquals( 10, shadow.offsetX );
58
    assertEquals( 10, shadow.offsetY );
59
    assertEquals( 0, shadow.blur );
60
    assertEquals( 0, shadow.spread );
61
    assertEquals( QxColor.BLACK.toDefaultString(), shadow.color );
62
    assertEquals( 1f, shadow.opacity, 0 );
63
  }
64
65
  public void testCreate_WithOpacity() {
66
    QxColor color = QxColor.valueOf( "0, 0, 0, 0.5" );
67
    QxShadow shadow = QxShadow.create( false, 10, 10, 0, 0, color );
68
    assertNotNull( shadow );
69
    assertFalse( shadow.inset );
70
    assertEquals( 10, shadow.offsetX );
71
    assertEquals( 10, shadow.offsetY );
72
    assertEquals( 0, shadow.blur );
73
    assertEquals( 0, shadow.spread );
74
    assertEquals( QxColor.BLACK.toDefaultString(), shadow.color );
75
    assertEquals( 0.5, shadow.opacity, 0 );
76
  }
77
78
  public void testNoneShadow() {
79
    QxShadow shadow = QxShadow.NONE;
80
    assertFalse( shadow.inset );
81
    assertEquals( 0, shadow.offsetX );
82
    assertEquals( 0, shadow.offsetY );
83
    assertEquals( 0, shadow.blur );
84
    assertEquals( 0, shadow.spread );
85
    assertNull( shadow.color );
86
    assertEquals( 0, shadow.opacity, 0 );
87
  }
88
89
  public void testToString() {
90
    QxShadow shadow = QxShadow.create( false, 10, 10, 0, 0, QxColor.BLACK );
91
    String expected = "QxShadow{ false, 10, 10, 0, 0, #000000, 1.0 }";
92
    assertEquals( expected, shadow.toString() );
93
  }
94
95
  public void testToDefaultString() {
96
    QxColor color = QxColor.valueOf( "0, 0, 0, 0.5" );
97
    QxShadow shadow = QxShadow.create( false, 10, 10, 0, 0, color );
98
    String expected = "10px 10px 0px 0px rgba( 0, 0, 0, 0.5 )";
99
    assertEquals( expected, shadow.toDefaultString() );
100
  }
101
102
  public void testToDefaultString_NoneShadow() {
103
    QxShadow shadow = QxShadow.NONE;
104
    String expected = "none";
105
    assertEquals( expected, shadow.toDefaultString() );
106
  }
107
108
  public void testEquals() {
109
    QxShadow shadow1 = QxShadow.create( false, 10, 10, 0, 0, QxColor.BLACK );
110
    QxShadow shadow2 = QxShadow.create( false, 10, 10, 0, 0, QxColor.BLACK );
111
    assertTrue( shadow1.equals( shadow2 ) );
112
  } 
113
}
(-)src/org/eclipse/rwt/internal/theme/ThemeStoreWriter_Test.java (-3 / +28 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved.
2
 * Copyright (c) 2009, 2011 EclipseSource and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the
3
 * This program and the accompanying materials are made available under the
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
Lines 45-51 Link Here
45
    expected = "\"cd56ce7d\": [ \"cd56ce7d\", 50, 100 ]";
45
    expected = "\"cd56ce7d\": [ \"cd56ce7d\", 50, 100 ]";
46
    assertTrue( output.indexOf( expected ) != -1 );
46
    assertTrue( output.indexOf( expected ) != -1 );
47
    // conditional colors
47
    // conditional colors
48
    expected = "\"color\": [ [ [ \"[BORDER\" ], \"ff\" ], [ [], \"0\" ] ]";
48
    expected = "\"color\": [ [ [ \"[BORDER\" ], "
49
             + "\"400339c0\" ], [ [], \"3fe41900\" ] ]";
49
    assertTrue( output.indexOf( expected ) != -1 );
50
    assertTrue( output.indexOf( expected ) != -1 );
50
    // conditional background-images
51
    // conditional background-images
51
    expected = "\"background-image\": "
52
    expected = "\"background-image\": "
Lines 72-78 Link Here
72
                      + "\"slideIn\": [ 2000, \"easeIn\" ],\n"
73
                      + "\"slideIn\": [ 2000, \"easeIn\" ],\n"
73
                      + "\"slideOut\": [ 2000, \"easeOut\" ]\n"
74
                      + "\"slideOut\": [ 2000, \"easeOut\" ]\n"
74
                      + "}\n"
75
                      + "}\n"
75
                      + "}\n";
76
                      + "},\n";
76
    assertTrue( output.indexOf( expected ) != -1 );
77
    assertTrue( output.indexOf( expected ) != -1 );
77
    expected = "\"Menu\": {\n"
78
    expected = "\"Menu\": {\n"
78
               + "\"animation\": [ [ [], \"2e5f3d63\" ] ]\n"
79
               + "\"animation\": [ [ [], \"2e5f3d63\" ] ]\n"
Lines 146-151 Link Here
146
    assertTrue( output.indexOf( expected ) != -1 );
147
    assertTrue( output.indexOf( expected ) != -1 );
147
  }
148
  }
148
149
150
  public void testWriteShadow() throws Exception {
151
    ThemeCssElement element = new ThemeCssElement( "Shell" );
152
    element.addProperty( "box-shadow" );
153
    IThemeCssElement[] elements = new IThemeCssElement[] { element };
154
    ThemeStoreWriter storeWriter = new ThemeStoreWriter( elements );
155
    String themeId = "myTheme";
156
    String cssCode
157
      = "Shell { box-shadow: 10px 10px 3px 0 rgba( 0, 0, 0, 0.5 ); }\n";
158
    ResourceLoader loader
159
      = ThemeTestUtil.createResourceLoader( Fixture.class );
160
    ThemeTestUtil.registerCustomTheme( themeId, cssCode, loader );
161
    Theme theme = ThemeManager.getInstance().getTheme( themeId );
162
    storeWriter.addTheme( theme, true );
163
    String output = storeWriter.createJs();
164
    String expected = "\"shadows\": {\n"
165
      + "\"2aedfabd\": [ false, 10, 10, 3, 0, \"#000000\", 0.5 ]\n"
166
      + "}\n";
167
    assertTrue( output.indexOf( expected ) != -1 );
168
    expected = "\"Shell\": {\n"
169
               + "\"box-shadow\": [ [ [], \"2aedfabd\" ] ]\n"
170
               + "}";
171
    assertTrue( output.indexOf( expected ) != -1 );
172
  }
173
149
  protected void setUp() throws Exception {
174
  protected void setUp() throws Exception {
150
    Fixture.setUp();
175
    Fixture.setUp();
151
    Fixture.fakeNewRequest();
176
    Fixture.fakeNewRequest();
(-)src/org/eclipse/rwt/internal/theme/css/PropertyResolver_Test.java (-1 / +190 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2010 Innoopract Informationssysteme GmbH.
2
 * Copyright (c) 2008, 2011 Innoopract Informationssysteme GmbH.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 77-82 Link Here
77
    }
77
    }
78
  }
78
  }
79
79
80
  public void testColorWithAlpha() throws Exception {
81
    String input = "rgba( 1, 2, 3, 0.25 )";
82
    QxColor result
83
      = PropertyResolver.readColorWithAlpha( parseProperty( input ) );
84
    assertNotNull( result );
85
    assertEquals( 1, result.red );
86
    assertEquals( 2, result.green );
87
    assertEquals( 3, result.blue );
88
    assertEquals( 0.25, result.alpha, 0 );
89
  }
90
91
  public void testColorWithAlpha_Percents() throws Exception {
92
    String input = "rgba( 0%, 50%, 100%, 0.25 )";
93
    QxColor result
94
      = PropertyResolver.readColorWithAlpha( parseProperty( input ) );
95
    assertNotNull( result );
96
    assertEquals( 0, result.red );
97
    assertEquals( 127, result.green );
98
    assertEquals( 255, result.blue );
99
    assertEquals( 0.25, result.alpha, 0 );
100
  }
101
  
102
  public void testColorWithAlpha_NoTransparency() throws Exception {
103
    String input = "rgba( 0, 0, 0, 1 )";
104
    QxColor result
105
      = PropertyResolver.readColorWithAlpha( parseProperty( input ) );
106
    assertSame( QxColor.BLACK, result );
107
  }
108
109
  public void testColorWithAlpha_NormalizeNegativeAlpha() throws Exception {
110
    String input = "rgba( 1, 2, 3, -0.1 )";
111
    QxColor result
112
      = PropertyResolver.readColorWithAlpha( parseProperty( input ) );
113
    assertNotNull( result );
114
    assertEquals( 1, result.red );
115
    assertEquals( 2, result.green );
116
    assertEquals( 3, result.blue );
117
    assertEquals( 0f, result.alpha, 0 );
118
  }
119
120
  public void testColorWithAlpha_NormalizePositiveAlpha() throws Exception {
121
    String input = "rgba( 1, 2, 3, 1.1 )";
122
    QxColor result
123
      = PropertyResolver.readColorWithAlpha( parseProperty( input ) );
124
    assertNotNull( result );
125
    assertEquals( 1, result.red );
126
    assertEquals( 2, result.green );
127
    assertEquals( 3, result.blue );
128
    assertEquals( 1f, result.alpha, 0 );
129
  }
130
131
  public void testColorWithAlpha_NormalizeColorValue() throws Exception {
132
    String input = "rgba( -10, 127, 300, 0.25 )";
133
    QxColor result
134
      = PropertyResolver.readColorWithAlpha( parseProperty( input ) );
135
    assertNotNull( result );
136
    assertEquals( 0, result.red );
137
    assertEquals( 127, result.green );
138
    assertEquals( 255, result.blue );
139
    assertEquals( 0.25, result.alpha, 0 );
140
  }
141
142
  public void testColorWithAlpha_MixedValues() throws Exception {
143
    String input = "rgba( 0%, 50, 100, 0.25 )";
144
    try {
145
      PropertyResolver.readColorWithAlpha( parseProperty( input ) );
146
      fail();
147
    } catch( IllegalArgumentException e ) {
148
      // expected
149
    }
150
  }
151
80
  public void testDimension() throws Exception {
152
  public void testDimension() throws Exception {
81
    QxDimension zero = PropertyResolver.readDimension( parseProperty( "0px" ) );
153
    QxDimension zero = PropertyResolver.readDimension( parseProperty( "0px" ) );
82
    assertNotNull( zero );
154
    assertNotNull( zero );
Lines 652-657 Link Here
652
    }
724
    }
653
  }
725
  }
654
726
727
  public void testShadow_XYOffsetOnlyNotation() throws Exception {
728
    String input = "1px 2px";
729
    QxShadow result = PropertyResolver.readShadow( parseProperty( input ) );
730
    assertNotNull( result );
731
    assertEquals( 1, result.offsetX );
732
    assertEquals( 2, result.offsetY );
733
    assertEquals( 0, result.blur );
734
    assertEquals( 0, result.spread );
735
    assertEquals( "#000000", result.color );
736
    assertEquals( 1f, result.opacity, 0 );
737
  }
738
739
  public void testShadow_OffsetXYBlurNotation() throws Exception {
740
    String input = "1px 2px 3px";
741
    QxShadow result = PropertyResolver.readShadow( parseProperty( input ) );
742
    assertNotNull( result );
743
    assertEquals( 1, result.offsetX );
744
    assertEquals( 2, result.offsetY );
745
    assertEquals( 3, result.blur );
746
    assertEquals( 0, result.spread );
747
    assertEquals( "#000000", result.color );
748
    assertEquals( 1f, result.opacity, 0 );
749
  }
750
751
  public void testShadow_XYOffsetBlurSpreadNotation() throws Exception {
752
    String input = "1px 2px 0 0";
753
    QxShadow result = PropertyResolver.readShadow( parseProperty( input ) );
754
    assertNotNull( result );
755
    assertEquals( 1, result.offsetX );
756
    assertEquals( 2, result.offsetY );
757
    assertEquals( 0, result.blur );
758
    assertEquals( 0, result.spread );
759
    assertEquals( "#000000", result.color );
760
    assertEquals( 1f, result.opacity, 0 );
761
  }
762
763
  public void testShadow_FullNotation_NamedColor() throws Exception {
764
    String input = "1px 2px 0px 0 red";
765
    QxShadow result = PropertyResolver.readShadow( parseProperty( input ) );
766
    assertNotNull( result );
767
    assertEquals( 1, result.offsetX );
768
    assertEquals( 2, result.offsetY );
769
    assertEquals( 0, result.blur );
770
    assertEquals( 0, result.spread );
771
    assertEquals( "#ff0000", result.color );
772
    assertEquals( 1f, result.opacity, 0 );
773
  }
774
775
  public void testShadow_FullNotation_HexColor() throws Exception {
776
    String input = "1px 2px 0px 0 #FF0000";
777
    QxShadow result = PropertyResolver.readShadow( parseProperty( input ) );
778
    assertNotNull( result );
779
    assertEquals( 1, result.offsetX );
780
    assertEquals( 2, result.offsetY );
781
    assertEquals( 0, result.blur );
782
    assertEquals( 0, result.spread );
783
    assertEquals( "#ff0000", result.color );
784
    assertEquals( 1f, result.opacity, 0 );
785
  }
786
787
  public void testShadow_FullNotation_RgbColor() throws Exception {
788
    String input = "1px 2px 3px 0 rgb( 1, 2, 3 )";
789
    QxShadow result = PropertyResolver.readShadow( parseProperty( input ) );
790
    assertNotNull( result );
791
    assertEquals( 1, result.offsetX );
792
    assertEquals( 2, result.offsetY );
793
    assertEquals( 3, result.blur );
794
    assertEquals( 0, result.spread );
795
    assertEquals( "#010203", result.color );
796
    assertEquals( 1f, result.opacity, 0 );
797
  }
798
799
  public void testShadow_FullNotation_RgbaColor() throws Exception {
800
    String input = "1px 2px 0px 0 rgba( 1, 2, 3, 0.25 )";
801
    QxShadow result = PropertyResolver.readShadow( parseProperty( input ) );
802
    assertNotNull( result );
803
    assertEquals( 1, result.offsetX );
804
    assertEquals( 2, result.offsetY );
805
    assertEquals( 0, result.blur );
806
    assertEquals( 0, result.spread );
807
    assertEquals( "#010203", result.color );
808
    assertEquals( 0.25, result.opacity, 0 );
809
  }
810
811
  public void testShadow_WithoutOffsetY() throws Exception {
812
    try {
813
      PropertyResolver.readShadow( parseProperty( "1px" ) );
814
      fail();
815
    } catch( IllegalArgumentException e ) {
816
      // expected
817
    }
818
  }
819
820
  public void testShadow_MissingRgbaParameters() throws Exception {
821
    String input = "1px 2px 0px 0 rgba( 1, 2, 0.25 )";
822
    try {
823
      PropertyResolver.readShadow( parseProperty( input ) );
824
      fail();
825
    } catch( IllegalArgumentException e ) {
826
      // expected
827
    }
828
  }
829
830
  public void testShadow_NonZeroSpread() throws Exception {
831
    String input = "1px 2px 3px 3px rgba( 1, 2, 3, 0.25 )";
832
    try {
833
      PropertyResolver.readShadow( parseProperty( input ) );
834
      fail();
835
    } catch( IllegalArgumentException e ) {
836
      // expected
837
    }
838
  }
839
655
  public void testIsColorProperty() {
840
  public void testIsColorProperty() {
656
    assertFalse( PropertyResolver.isColorProperty( "border" ) );
841
    assertFalse( PropertyResolver.isColorProperty( "border" ) );
657
    assertTrue( PropertyResolver.isColorProperty( "color" ) );
842
    assertTrue( PropertyResolver.isColorProperty( "color" ) );
Lines 685-690 Link Here
685
    assertTrue( PropertyResolver.isAnimationProperty( "animation" ) );
870
    assertTrue( PropertyResolver.isAnimationProperty( "animation" ) );
686
  }
871
  }
687
872
873
  public void testIsShadowProperty() {
874
    assertTrue( PropertyResolver.isShadowProperty( "box-shadow" ) );
875
  }
876
688
  public void testResolveProperty() throws Exception {
877
  public void testResolveProperty() throws Exception {
689
    LexicalUnit unit = parseProperty( "white" );
878
    LexicalUnit unit = parseProperty( "white" );
690
    QxType value = PropertyResolver.resolveProperty( "color", unit, null );
879
    QxType value = PropertyResolver.resolveProperty( "color", unit, null );
(-)src/org/eclipse/rap/rwt/themes/test/business/Shell.test.css (-1 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
* Copyright (c) 2010 EclipseSource and others. All rights reserved. This
2
* Copyright (c) 2010, 2011 EclipseSource and others. All rights reserved. This
3
* program and the accompanying materials are made available under the terms of
3
* program and the accompanying materials are made available under the terms of
4
* the Eclipse Public License v1.0 which accompanies this distribution, and is
4
* the Eclipse Public License v1.0 which accompanies this distribution, and is
5
* available at http://www.eclipse.org/legal/epl-v10.html
5
* available at http://www.eclipse.org/legal/epl-v10.html
Lines 30-35 Link Here
30
30
31
Shell {
31
Shell {
32
  background-color: white;
32
  background-color: white;
33
  box-shadow: none;
33
}
34
}
34
35
35
Shell-DisplayOverlay {
36
Shell-DisplayOverlay {
Lines 44-53 Link Here
44
  border: 2px solid #005092;
45
  border: 2px solid #005092;
45
  border-radius: 5px 5px 0px 0px;
46
  border-radius: 5px 5px 0px 0px;
46
  padding: 5px;
47
  padding: 5px;
48
  box-shadow: 5px 5px 3px rgba( 0, 0, 0, 0.5 );
47
}
49
}
48
50
49
Shell[BORDER]:inactive, Shell[TITLE]:inactive {
51
Shell[BORDER]:inactive, Shell[TITLE]:inactive {
50
  border: 2px solid #4b4b4b;
52
  border: 2px solid #4b4b4b;
53
  box-shadow: none;
51
}
54
}
52
55
53
Shell-CloseButton {
56
Shell-CloseButton {
(-)src/org/eclipse/rap/rwt/themes/test/fancy/Shell.test.css (-1 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
* Copyright (c) 2010 EclipseSource and others. All rights reserved. This
2
* Copyright (c) 2010, 2011 EclipseSource and others. All rights reserved. This
3
* program and the accompanying materials are made available under the terms of
3
* program and the accompanying materials are made available under the terms of
4
* the Eclipse Public License v1.0 which accompanies this distribution, and is
4
* the Eclipse Public License v1.0 which accompanies this distribution, and is
5
* available at http://www.eclipse.org/legal/epl-v10.html
5
* available at http://www.eclipse.org/legal/epl-v10.html
Lines 30-35 Link Here
30
30
31
Shell {
31
Shell {
32
  background-color: white;
32
  background-color: white;
33
  box-shadow: none;
33
}
34
}
34
35
35
Shell-DisplayOverlay {
36
Shell-DisplayOverlay {
Lines 44-54 Link Here
44
  border: 2px solid #99c92c;
45
  border: 2px solid #99c92c;
45
  border-radius: 6px;
46
  border-radius: 6px;
46
  padding: 5px;
47
  padding: 5px;
48
  box-shadow: 5px 5px 3px rgba( 0, 0, 0, 0.5 );
47
}
49
}
48
50
49
Shell[BORDER]:inactive, Shell[TITLE]:inactive {
51
Shell[BORDER]:inactive, Shell[TITLE]:inactive {
50
  background-color: white;
52
  background-color: white;
51
  border: 2px solid #4b4b4b;
53
  border: 2px solid #4b4b4b;
54
  box-shadow: none;
52
}
55
}
53
56
54
Shell-CloseButton {
57
Shell-CloseButton {
(-)src/org/eclipse/rap/rwt/themes/test/rwtdefault/Shell.test.css (-1 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
* Copyright (c) 2010 EclipseSource and others. All rights reserved. This
2
* Copyright (c) 2010, 2011 EclipseSource and others. All rights reserved. This
3
* program and the accompanying materials are made available under the terms of
3
* program and the accompanying materials are made available under the terms of
4
* the Eclipse Public License v1.0 which accompanies this distribution, and is
4
* the Eclipse Public License v1.0 which accompanies this distribution, and is
5
* available at http://www.eclipse.org/legal/epl-v10.html
5
* available at http://www.eclipse.org/legal/epl-v10.html
Lines 15-20 Link Here
15
  padding: 0px;
15
  padding: 0px;
16
  background-image: none;
16
  background-image: none;
17
  opacity: 1;
17
  opacity: 1;
18
  box-shadow: none;
18
}
19
}
19
20
20
Shell[TITLE], Shell[BORDER] {
21
Shell[TITLE], Shell[BORDER] {
Lines 22-31 Link Here
22
  border: 2px solid #005092;
23
  border: 2px solid #005092;
23
  border-radius: 5px 5px 0px 0px;
24
  border-radius: 5px 5px 0px 0px;
24
  padding: 5px;
25
  padding: 5px;
26
  box-shadow: 5px 5px 3px rgba( 0, 0, 0, 0.5 );
25
}
27
}
26
28
27
Shell[BORDER]:inactive, Shell[TITLE]:inactive {
29
Shell[BORDER]:inactive, Shell[TITLE]:inactive {
28
  border: 2px solid #4b4b4b;
30
  border: 2px solid #4b4b4b;
31
  box-shadow: none;
29
}
32
}
30
33
31
Shell:maximized, Shell:maximized:inactive {
34
Shell:maximized, Shell:maximized:inactive {

Return to bug 324436