71 | | * ArrowButton |
72 | | |
73 | | {{{ |
74 | | |
75 | | <style id="arrowButtonStyle"> |
76 | | |
77 | | <state> |
78 | | |
79 | | <imagePainter method="arrowButtonForeground" path="resources/sbv_up_arrow_normal.png" center="true" direction="north" /> |
80 | | |
81 | | <imagePainter method="arrowButtonForeground" path="resources/sbv_down_arrow_normal.png" center="true" direction="south" /> |
82 | | |
83 | | <imagePainter method="arrowButtonForeground" path="resources/sbh_up_arrow_normal.png" center="true" direction="west" /> |
84 | | |
85 | | <imagePainter method="arrowButtonForeground" path="resources/sbh_down_arrow_normal.png" center="true" direction="east" /> |
86 | | |
87 | | </state> |
88 | | |
89 | | <state value="PRESSED"> |
90 | | |
91 | | <imagePainter method="arrowButtonForeground" path="resources/sbv_up_arrow_down.png" center="true" direction="north" /> |
92 | | |
93 | | <imagePainter method="arrowButtonForeground" path="resources/sbv_down_arrow_down.png" center="true" direction="south" /> |
94 | | |
95 | | <imagePainter method="arrowButtonForeground" path="resources/sbh_up_arrow_down.png" center="true" direction="west" /> |
96 | | |
97 | | <imagePainter method="arrowButtonForeground" path="resources/sbh_down_arrow_down.png" center="true" direction="east" /> |
98 | | |
99 | | </state> |
100 | | |
101 | | <state value="MOUSE_OVER"> |
102 | | |
103 | | <imagePainter method="arrowButtonForeground" path="resources/sbv_up_arrow_over.png" center="true" direction="north" /> |
104 | | |
105 | | <imagePainter method="arrowButtonForeground" path="resources/sbv_down_arrow_over.png" center="true" direction="south" /> |
106 | | |
107 | | <imagePainter method="arrowButtonForeground" path="resources/sbh_up_arrow_over.png" center="true" direction="west" /> |
108 | | |
109 | | <imagePainter method="arrowButtonForeground" path="resources/sbh_down_arrow_over.png" center="true" direction="east" /> |
110 | | |
111 | | </state> |
112 | | |
113 | | <state value="DISABLED"> |
114 | | |
115 | | <imagePainter method="arrowButtonForeground" path="resources/sbv_up_arrow_disabled.png" center="true" direction="north" /> |
116 | | |
117 | | <imagePainter method="arrowButtonForeground" path="resources/sbv_down_arrow_disabled.png" center="true" direction="south" /> |
118 | | |
119 | | <imagePainter method="arrowButtonForeground" path="resources/sbh_up_arrow_disabled.png" center="true" direction="west" /> |
120 | | |
121 | | <imagePainter method="arrowButtonForeground" path="resources/sbh_down_arrow_disabled.png" center="true" direction="east" /> |
122 | | |
123 | | </state> |
124 | | |
125 | | |
126 | | </style> |
127 | | |
| 71 | * Default - this is used where no other style is defined: |
| 72 | {{{ |
| 73 | <!-- ================================= --> |
| 74 | <!-- DEFAULTS --> |
| 75 | <!-- ================================= --> |
| 76 | <style id="default"> |
| 77 | <state> |
| 78 | <font name="Arial" size="12" style="PLAIN" /> |
| 79 | <insets top="0" bottom="0" right="0" left="0" /> |
| 80 | <color value="WHITE" type="BACKGROUND" /> |
| 81 | <color value="BLACK" type="FOREGROUND" /> |
| 82 | <color value="WHITE" type="TEXT_BACKGROUND" /> |
| 83 | <color value="BLACK" type="TEXT_FOREGROUND" /> |
| 84 | </state> |
| 85 | </style> |
| 86 | <bind style="default" type="region" key=".*" /> |
| 87 | }}} |
| 88 | * ArrowButton - ready! |
| 89 | |
| 90 | {{{ |
| 91 | |
| 92 | <!-- ================================= --> |
| 93 | <!-- ARROW BUTTON --> |
| 94 | <!-- ================================= --> |
| 95 | <style id="arrowButtonStyle"> |
| 96 | |
| 97 | <state> |
| 98 | <imagePainter method="arrowButtonForeground" path="resources/sbv_up_arrow_normal.png" |
| 99 | center="true" direction="north" /> |
| 100 | <imagePainter method="arrowButtonForeground" |
| 101 | path="resources/sbv_down_arrow_normal.png" center="true" direction="south" /> |
| 102 | <imagePainter method="arrowButtonForeground" path="resources/sbh_up_arrow_normal.png" |
| 103 | center="true" direction="west" /> |
| 104 | <imagePainter method="arrowButtonForeground" |
| 105 | path="resources/sbh_down_arrow_normal.png" center="true" direction="east" /> |
| 106 | </state> |
| 107 | |
| 108 | <state value="PRESSED"> |
| 109 | <imagePainter method="arrowButtonForeground" path="resources/sbv_up_arrow_down.png" |
| 110 | center="true" direction="north" /> |
| 111 | <imagePainter method="arrowButtonForeground" path="resources/sbv_down_arrow_down.png" |
| 112 | center="true" direction="south" /> |
| 113 | <imagePainter method="arrowButtonForeground" path="resources/sbh_up_arrow_down.png" |
| 114 | center="true" direction="west" /> |
| 115 | <imagePainter method="arrowButtonForeground" path="resources/sbh_down_arrow_down.png" |
| 116 | center="true" direction="east" /> |
| 117 | </state> |
| 118 | |
| 119 | <state value="MOUSE_OVER"> |
| 120 | |
| 121 | <imagePainter method="arrowButtonForeground" path="resources/sbv_up_arrow_over.png" |
| 122 | center="true" direction="north" /> |
| 123 | |
| 124 | <imagePainter method="arrowButtonForeground" path="resources/sbv_down_arrow_over.png" |
| 125 | center="true" direction="south" /> |
| 126 | |
| 127 | <imagePainter method="arrowButtonForeground" path="resources/sbh_up_arrow_over.png" |
| 128 | center="true" direction="west" /> |
| 129 | |
| 130 | <imagePainter method="arrowButtonForeground" path="resources/sbh_down_arrow_over.png" |
| 131 | center="true" direction="east" /> |
| 132 | |
| 133 | </state> |
| 134 | |
| 135 | <state value="DISABLED"> |
| 136 | |
| 137 | <imagePainter method="arrowButtonForeground" |
| 138 | path="resources/sbv_up_arrow_disabled.png" center="true" direction="north" /> |
| 139 | |
| 140 | <imagePainter method="arrowButtonForeground" |
| 141 | path="resources/sbv_down_arrow_disabled.png" center="true" |
| 142 | direction="south" /> |
| 143 | |
| 144 | <imagePainter method="arrowButtonForeground" |
| 145 | path="resources/sbh_up_arrow_disabled.png" center="true" direction="west" /> |
| 146 | |
| 147 | <imagePainter method="arrowButtonForeground" |
| 148 | path="resources/sbh_down_arrow_disabled.png" center="true" |
| 149 | direction="east" /> |
| 150 | </state> |
| 151 | </style> |
| 152 | <bind style="arrowButtonStyle" type="region" key="ArrowButton" /> |
130 | | * Button |
131 | | |
132 | | {{{ |
133 | | <style id="buttonStyle"> |
134 | | <!-- Shift the text one pixel when pressed --> |
135 | | <property key="Button.textShiftOffset" type="integer" value="1"/> |
136 | | <insets top="1" left="1" right="1" bottom="1"/> |
137 | | |
138 | | <state value="ENABLED"> |
139 | | <imagePainter method="buttonBackground" path="resources/btn_enabled.png" |
140 | | sourceInsets="2 1 1 2"/> |
141 | | </state> |
142 | | <state value="DISABLED"> |
143 | | <imagePainter method="buttonBackground" path="resources/btn_disabled.png" |
144 | | sourceInsets="2 1 1 2"/> |
145 | | </state> |
146 | | <state value="PRESSED"> |
147 | | <imagePainter method="buttonBackground" path="resources/btn_roll.png" |
148 | | sourceInsets="2 1 1 2"/> |
149 | | </state> |
150 | | </style> |
151 | | <!-- Bind buttonStyle to all JButtons --> |
152 | | <bind style="buttonStyle" type="region" key="button"/> |
153 | | }}} |
154 | | |
155 | | * CheckBox |
156 | | |
157 | | * RadioButton |
158 | | |
159 | | * ToggleButton |
160 | | |
161 | | * ComboBox |
| 155 | * Button - ready (may change the resources used for the buttons) |
| 156 | |
| 157 | {{{ |
| 158 | <!-- ================================= --> |
| 159 | <!-- BUTTON --> |
| 160 | <!-- ================================= --> |
| 161 | <style id="buttonStyle"> |
| 162 | <!-- Shift the text one pixel when pressed --> |
| 163 | <property key="Button.textShiftOffset" type="integer" value="1" /> |
| 164 | <insets top="7" left="16" right="16" bottom="7" /> |
| 165 | |
| 166 | <state value="ENABLED"> |
| 167 | <imagePainter method="buttonBackground" path="resources/btn_enabled.png" |
| 168 | sourceInsets="2 1 1 2" /> |
| 169 | </state> |
| 170 | <state value="DISABLED"> |
| 171 | <imagePainter method="buttonBackground" path="resources/btn_disabled.png" |
| 172 | sourceInsets="2 1 1 2" /> |
| 173 | </state> |
| 174 | <state value="PRESSED"> |
| 175 | <imagePainter method="buttonBackground" path="resources/btn_roll.png" |
| 176 | sourceInsets="2 1 1 2" /> |
| 177 | </state> |
| 178 | <state value="FOCUSED"> |
| 179 | <imagePainter method="buttonBackground" path="resources/btn_roll.png" |
| 180 | sourceInsets="2 1 1 2" /> |
| 181 | </state> |
| 182 | </style> |
| 183 | <!-- Bind buttonStyle to all JButtons --> |
| 184 | <bind style="buttonStyle" type="region" key="button" /> |
| 185 | }}} |
| 186 | |
| 187 | * CheckBox - ready (provided by dido) |
| 188 | |
| 189 | {{{ |
| 190 | <!-- ================================= --> |
| 191 | <!-- CHECKBOX --> |
| 192 | <!-- ================================= --> |
| 193 | <style id="CheckBoxStyle"> |
| 194 | <imagePainter method="CheckBoxBackground" path="panel_bg.png" |
| 195 | sourceInsets="0 0 0 0" /> |
| 196 | <state> |
| 197 | <imageIcon id="checkBoxOff" path="resources/cb.png" /> |
| 198 | <property key="CheckBox.icon" value="checkBoxOff" /> |
| 199 | </state> |
| 200 | <state value="MOUSE_OVER"> |
| 201 | <imageIcon id="checkBoxOffMouseOver" path="resources/cb_rolled.png" /> |
| 202 | <property key="CheckBox.icon" value="checkBoxOffMouseOver" /> |
| 203 | </state> |
| 204 | <state value="DISABLED"> |
| 205 | <imageIcon id="checkBoxOffDisabled" path="resources/cb_disabled.png" /> |
| 206 | <property key="CheckBox.icon" value="checkBoxOffDisabled" /> |
| 207 | </state> |
| 208 | <state value="PRESSED"> |
| 209 | <imageIcon id="checkBoxPressed" path="resources/cb_pressed.png" /> |
| 210 | <property key="CheckBox.icon" value="checkBoxPressed" /> |
| 211 | </state> |
| 212 | <state value="SELECTED"> |
| 213 | <imageIcon id="checkBoxOn" path="resources/cb_selected.png" /> |
| 214 | <property key="CheckBox.icon" value="checkBoxOn" /> |
| 215 | </state> |
| 216 | <state value="SELECTED AND MOUSE_OVER"> |
| 217 | <imageIcon id="checkBoxOnMouseOver" path="resources/cb_selected_rolled.png" /> |
| 218 | <property key="CheckBox.icon" value="checkBoxOnMouseOver" /> |
| 219 | </state> |
| 220 | <state value="SELECTED AND PRESSED"> |
| 221 | <imageIcon id="checkBoxOnPressed" path="resources/cb_selected_pressed.png" /> |
| 222 | <property key="CheckBox.icon" value="checkBoxOnPressed" /> |
| 223 | </state> |
| 224 | <state value="SELECTED AND DISABLED"> |
| 225 | <imageIcon id="checkBoxOnDisabled" path="resources/cb_selected_disabled.png" /> |
| 226 | <property key="CheckBox.icon" value="checkBoxOnDisabled" /> |
| 227 | </state> |
| 228 | </style> |
| 229 | <bind style="CheckBoxStyle" type="region" key="CheckBox" /> |
| 230 | |
| 231 | }}} |
| 232 | |
| 233 | * RadioButton - ready (provided by dido) |
| 234 | |
| 235 | {{{ |
| 236 | <!-- ================================= --> |
| 237 | <!-- RADIO BUTTON --> |
| 238 | <!-- ================================= --> |
| 239 | <style id="RadioButtonStyle"> |
| 240 | <imagePainter method="RadioButtonBackground" path="panel_bg.png" |
| 241 | sourceInsets="0 0 0 0" /> |
| 242 | <state> |
| 243 | <imageIcon id="radioButtonOff" path="resources/rb.png" /> |
| 244 | <property key="RadioButton.icon" value="radioButtonOff" /> |
| 245 | </state> |
| 246 | <state value="MOUSE_OVER"> |
| 247 | <imageIcon id="radioButtonOffMouseOver" path="resources/rb_rolled.png" /> |
| 248 | <property key="RadioButton.icon" value="radioButtonOffMouseOver" /> |
| 249 | </state> |
| 250 | <state value="PRESSED"> |
| 251 | <imageIcon id="radioButtonOffPressed" path="resources/rb_pressed.png" /> |
| 252 | <property key="RadioButton.icon" value="radioButtonOffPressed" /> |
| 253 | </state> |
| 254 | <state value="DISABLED"> |
| 255 | <imageIcon id="radioButtonOffDisabled" path="resources/rb_disabled.png" /> |
| 256 | <property key="RadioButton.icon" value="radioButtonOffDisabled" /> |
| 257 | </state> |
| 258 | |
| 259 | <state value="SELECTED"> |
| 260 | <imageIcon id="radioButtonOn" path="resources/rb_selected.png" /> |
| 261 | <property key="RadioButton.icon" value="radioButtonOn" /> |
| 262 | </state> |
| 263 | <state value="SELECTED AND DISABLED"> |
| 264 | <imageIcon id="radioButtonOnDisabled" path="resources/rb_selected_disabled.png" /> |
| 265 | <property key="RadioButton.icon" value="radioButtonOnDisabled" /> |
| 266 | </state> |
| 267 | <state value="SELECTED AND MOUSE_OVER"> |
| 268 | <imageIcon id="radioButtonOnMouseOver" path="resources/rb_selected_rolled.png" /> |
| 269 | <property key="RadioButton.icon" value="radioButtonOnMouseOver" /> |
| 270 | </state> |
| 271 | <state value="SELECTED AND PRESSED"> |
| 272 | <imageIcon id="radioButtonOnPressed" path="resources/rb_selected_pressed.png" /> |
| 273 | <property key="RadioButton.icon" value="radioButtonOnPressed" /> |
| 274 | </state> |
| 275 | |
| 276 | </style> |
| 277 | <bind style="RadioButtonStyle" type="region" key="RadioButton" /> |
| 278 | |
| 279 | }}} |
| 280 | |
| 281 | * ToggleButton - ready (may change the resources - it now uses the buttons images) |
| 282 | {{{ |
| 283 | <!-- ================================= --> |
| 284 | <!-- |
| 285 | TOGGLE BUTTON - it uses the icons of the Button except for the states |
| 286 | are differently declared. |
| 287 | --> |
| 288 | <!-- ================================= --> |
| 289 | <style id="ToggleButtonStyle"> |
| 290 | <insets top="5" left="13" right="13" bottom="5" /> |
| 291 | <state> |
| 292 | <imagePainter method="ToggleButtonBackground" path="resources/btn_enabled.png" |
| 293 | sourceInsets="2 1 1 2" /> |
| 294 | </state> |
| 295 | <state value="DISABLED"> |
| 296 | <imagePainter method="ToggleButtonBackground" path="resources/btn_disabled.png" |
| 297 | sourceInsets="2 1 1 2" /> |
| 298 | </state> |
| 299 | <state value="SELECTED"> |
| 300 | <imagePainter method="ToggleButtonBackground" path="resources/btn_roll.png" |
| 301 | sourceInsets="2 1 1 2" /> |
| 302 | </state> |
| 303 | </style> |
| 304 | <bind style="ToggleButtonStyle" type="region" key="ToggleButton" /> |
| 305 | |
| 306 | }}} |
| 307 | |
| 308 | * ComboBox - needs selected state customization. |
| 309 | {{{ |
| 310 | <!-- ================================= --> |
| 311 | <!-- COMBO BOX --> |
| 312 | <!-- ================================= --> |
| 313 | <style id="ComboBox"> |
| 314 | <insets top="0" left="0" bottom="0" right="0" /> |
| 315 | <property key="ComboBox.showPopupOnNavigation" type="boolean" |
| 316 | value="true" /> |
| 317 | <state value="ENABLED"> |
| 318 | <font name="Arial" size="11" style="PLAIN" /> |
| 319 | <color value="#272a2e" type="TEXT_FOREGROUND" /> |
| 320 | <imagePainter method="comboBoxBorder" path="resources/text_bg.png" |
| 321 | sourceInsets="3 3 3 3" paintCenter="true" stretch="true" center="false" /> |
| 322 | </state> |
| 323 | <state value="DISABLED"> |
| 324 | <font name="Arial" size="11" style="PLAIN" /> |
| 325 | <color value="#272a2e" type="TEXT_FOREGROUND" /> |
| 326 | <imagePainter method="comboBoxBorder" path="resources/panel_bg.png" |
| 327 | sourceInsets="3 3 3 3" paintCenter="true" stretch="true" center="false" /> |
| 328 | </state> |
| 329 | </style> |
| 330 | <bind style="ComboBox" type="region" key="ComboBox" /> |
| 331 | |
| 332 | }}} |
207 | | * ScrollBarThumb |
| 378 | * ScrollBarThumb - ready (should only change the resources) |
| 379 | |
| 380 | {{{ |
| 381 | <!-- ================================= --> |
| 382 | <!-- SCROLLBAR THUMB --> |
| 383 | <!-- ================================= --> |
| 384 | <style id="scrollBarThumbStyle"> |
| 385 | <insets top="0" left="0" right="0" bottom="0" /> |
| 386 | <state> |
| 387 | <imagePainter method="scrollBarThumbBackground" |
| 388 | direction="horizontal" path="resources/sbh_thumb_normal.png" |
| 389 | sourceInsets="0 0 0 0" /> |
| 390 | <imagePainter method="scrollBarThumbBackground" |
| 391 | direction="horizontal" path="resources/sbh_thumb_icon.png" center="true" /> |
| 392 | <imagePainter method="scrollBarThumbBackground" |
| 393 | direction="vertical" path="resources/sbv_thumb_normal.png" |
| 394 | sourceInsets="0 0 0 0" /> |
| 395 | <imagePainter method="scrollBarThumbBackground" |
| 396 | direction="vertical" path="resources/sbv_thumb_icon.png" center="true" /> |
| 397 | </state> |
| 398 | |
| 399 | <state value="PRESSED"> |
| 400 | <imagePainter method="scrollBarThumbBackground" |
| 401 | direction="horizontal" path="resources/sbh_thumb_down.png" |
| 402 | sourceInsets="0 0 0 0" /> |
| 403 | <imagePainter method="scrollBarThumbBackground" |
| 404 | direction="horizontal" path="resources/sbh_thumb_icon.png" center="true" /> |
| 405 | <imagePainter method="scrollBarThumbBackground" |
| 406 | direction="vertical" path="resources/sbv_thumb_down.png" |
| 407 | sourceInsets="0 0 0 0" /> |
| 408 | <imagePainter method="scrollBarThumbBackground" |
| 409 | direction="vertical" path="resources/sbv_thumb_icon.png" center="true" /> |
| 410 | </state> |
| 411 | |
| 412 | <state value="MOUSE_OVER"> |
| 413 | <imagePainter method="scrollBarThumbBackground" |
| 414 | direction="horizontal" path="resources/sbh_thumb_over.png" |
| 415 | sourceInsets="0 0 0 0" /> |
| 416 | <imagePainter method="scrollBarThumbBackground" |
| 417 | direction="horizontal" path="resources/sbh_thumb_icon.png" center="true" /> |
| 418 | <imagePainter method="scrollBarThumbBackground" |
| 419 | direction="vertical" path="resources/sbv_thumb_over.png" |
| 420 | sourceInsets="0 0 0 0" /> |
| 421 | <imagePainter method="scrollBarThumbBackground" |
| 422 | direction="vertical" path="resources/sbv_thumb_icon.png" center="true" /> |
| 423 | </state> |
| 424 | |
| 425 | <state value="DISABLED"> |
| 426 | <imagePainter method="scrollBarThumbBackground" |
| 427 | direction="horizontal" path="resources/sbh_thumb_disabled.png" |
| 428 | sourceInsets="0 0 0 0" /> |
| 429 | <imagePainter method="scrollBarThumbBackground" |
| 430 | direction="horizontal" path="resources/sbh_thumb_icon.png" center="true" /> |
| 431 | <imagePainter method="scrollBarThumbBackground" |
| 432 | direction="vertical" path="resources/sbv_thumb_disabled.png" |
| 433 | sourceInsets="0 0 0 0" /> |
| 434 | <imagePainter method="scrollBarThumbBackground" |
| 435 | direction="vertical" path="resources/sbv_thumb_icon.png" center="true" /> |
| 436 | </state> |
| 437 | |
| 438 | </style> |
| 439 | |
| 440 | <bind style="scrollBarThumbStyle" type="region" key="ScrollBarThumb" /> |
| 441 | }}} |