equal
deleted
inserted
replaced
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 <html> |
2 <html> |
3 <head> |
3 <head> |
4 <title>Synth File Format</title> |
4 <title>Synth File Format</title> |
5 <style> |
5 <style type="text/css"> |
6 div.dtd-fragment { |
6 div.dtd-fragment { |
7 width: 100%; |
7 width: 100%; |
8 border: none; |
8 border: none; |
9 background-color: #eee; |
9 background-color: #eee; |
10 } |
10 } |
22 <h2><a name="file">File Format</a></h2> |
22 <h2><a name="file">File Format</a></h2> |
23 <p> |
23 <p> |
24 Synth's file format (<a href="synth.dtd">dtd</a>) |
24 Synth's file format (<a href="synth.dtd">dtd</a>) |
25 allows for specifying all the pieces |
25 allows for specifying all the pieces |
26 necessary to create your own look and feel. A synth file is |
26 necessary to create your own look and feel. A synth file is |
27 loaded by way of the <A HREF="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.io.InputStream, java.lang.Class)">SynthLookAndFeel.load(InputStream, Class)</a> or |
27 loaded by way of the <A HREF="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.io.InputStream,%20java.lang.Class)">SynthLookAndFeel.load(InputStream, Class)</a> or |
28 <a href="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.net.URL)">SynthLookAndFeel.load(URL)</a> methods. |
28 <a href="../../../../../javax/swing/plaf/synth/SynthLookAndFeel.html#load(java.net.URL)">SynthLookAndFeel.load(URL)</a> methods. |
29 The following example uses the <code>load</code> method to configure |
29 The following example uses the <code>load</code> method to configure |
30 a <code>SynthLookAndFeel</code> and sets it as the current look |
30 a <code>SynthLookAndFeel</code> and sets it as the current look |
31 and feel: |
31 and feel: |
32 </p> |
32 </p> |
108 and used for the new style. This provides a conveniant |
108 and used for the new style. This provides a conveniant |
109 mechanism for overriding only a portion of an existing |
109 mechanism for overriding only a portion of an existing |
110 style.</dd> |
110 style.</dd> |
111 </dl> |
111 </dl> |
112 <p> |
112 <p> |
113 A <a name="e.style">style</a> element corresponds to a |
113 A style element corresponds to a |
114 <code>SynthStyle</code>, with the child elements specifying |
114 <code>SynthStyle</code>, with the child elements specifying |
115 properties that apply to all states or state elements which |
115 properties that apply to all states or state elements which |
116 contain properties specific to a particular state. The following |
116 contain properties specific to a particular state. The following |
117 example creates an opaque style with the id <code>button</code>, |
117 example creates an opaque style with the id <code>button</code>, |
118 insets of 4, 4, 4, 4 and a font of Dialog 12. |
118 insets of 4, 4, 4, 4 and a font of Dialog 12. |
214 and PRESSED, and state <code>two</code> when the Component is |
214 and PRESSED, and state <code>two</code> when the Component is |
215 SELECTED. If the state of the Component |
215 SELECTED. If the state of the Component |
216 contains at least SELECTED and PRESSED, state <code>one</code> will be |
216 contains at least SELECTED and PRESSED, state <code>one</code> will be |
217 chosen, otherwise if the state is SELECTED, but not does not |
217 chosen, otherwise if the state is SELECTED, but not does not |
218 contain PRESSED, state <code>two</code> will be used. |
218 contain PRESSED, state <code>two</code> will be used. |
219 <p> |
|
220 |
219 |
221 <h3>The font element</h3> |
220 <h3>The font element</h3> |
222 <div class="dtd-fragment"> |
221 <div class="dtd-fragment"> |
223 <pre class="dtd-fragment"> |
222 <pre class="dtd-fragment"> |
224 <!ELEMENT <a name="e.font">font</a> EMPTY> |
223 <!ELEMENT <a name="e.font">font</a> EMPTY> |
460 height separated by a space, for insets properties this will |
459 height separated by a space, for insets properties this will |
461 be the top, left, bottom and right separated by a space and |
460 be the top, left, bottom and right separated by a space and |
462 for idref properties this will be the unique id of a |
461 for idref properties this will be the unique id of a |
463 previously defined object.</dd> |
462 previously defined object.</dd> |
464 </dl> |
463 </dl> |
465 </dl> |
|
466 <p> |
464 <p> |
467 <a href="#e.defaultsProperty">DefaultsProperty</a> elements are |
465 <a href="#e.defaultsProperty">DefaultsProperty</a> elements are |
468 used to define properties that will be placed in the |
466 used to define properties that will be placed in the |
469 <code>UIDefaults</code> table that <code>SynthLookAndFeel</code> |
467 <code>UIDefaults</code> table that <code>SynthLookAndFeel</code> |
470 supplies to the <code>UIManager</code>. The following assigns the |
468 supplies to the <code>UIManager</code>. The following assigns the |
736 <painter idref="fallbackPainter"/> |
734 <painter idref="fallbackPainter"/> |
737 <painter idref="styleButtonBackgroundPainter" method="buttonBackground"/> |
735 <painter idref="styleButtonBackgroundPainter" method="buttonBackground"/> |
738 <state value="SELECTED"> |
736 <state value="SELECTED"> |
739 <painter idref="stateFallbackPainter"/> |
737 <painter idref="stateFallbackPainter"/> |
740 <painter idref="stateButtonBackgroundPainter" method="buttonBackground"/> |
738 <painter idref="stateButtonBackgroundPainter" method="buttonBackground"/> |
741 </state> |
739 </state> |
742 </style> |
740 </style> |
743 </pre> |
741 </pre> |
744 </div> |
742 </div> |
745 <p> |
743 <p> |
746 The following outlines which painter will be used for what |
744 The following outlines which painter will be used for what |