EaSynth Look And Feel Customization (2)
Checkbox Button Customization
There are four states defined for checkbox button in EaSynth look and feel, the states and their appearance are shown below:
![]()
There is no any special open property used here to custom the checkbox style, EaSynth look and feel only use the "CheckBox.icon" property, which is defined in the Synth XML Format document. If we search the style with "Check Box" id, we will find these:
<!-- The style for check box button. -->
<style id="Check Box">
<property key="CheckBox.margin" type="insets" value="2 2 2 2"/>
<state value="ENABLED">
<imageIcon id="Checkbox_Normal" path="resource/1204453247375_checkbox_normal.png"/>
<property key="CheckBox.icon" type="idref" value="Checkbox_Normal"/>
</state>
<state value="MOUSE_OVER">
<imageIcon id="Checkbox_MouseOver" path="resource/1204453256531_checkbox_mouseover.png"/>
<property key="CheckBox.icon" type="idref" value="Checkbox_MouseOver"/>
</state>
<state value="SELECTED">
<imageIcon id="Checkbox_Selected" path="resource/1204453267203_checkbox_selected.png"/>
<property key="CheckBox.icon" type="idref" value="Checkbox_Selected"/>
</state>
<state value="DISABLED">
<imageIcon id="Checkbox_Disabled" path="resource/1204122673828_checkbox_disabled.png"/>
<property key="CheckBox.icon" type="idref" value="Checkbox_Disabled"/>
</state>
</style>
<bind style="Check Box" type="region" key="CheckBox" />
The property element again uses "idref" type to link to an imageIcon element, which specifies an image file for the checkbox icon. So the customization for checkbox will be very easy: just replace those image files, we will then have a new look of the checkbox.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)




