< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html

Print this page




 933       The <a href="#e.opaque">opaque</a> element indicates whether or
 934       not any Components the style is associated with are to be made opaque.
 935       The painter will be asked to paint regardless of the opacity
 936       of the associated Component. The following example creates a style
 937       that is not opaque.
 938     </p>
 939     <div class="example">
 940       <pre>
 941 &lt;style id="test">
 942   &lt;opaque value="FALSE">
 943   &lt;painter idref="painter"/>
 944 &lt;/style>
 945     </pre>
 946 </div>
 947 
 948     <h3><a name="ee.beansPersistance">The beansPersistance entity</a></h3>
 949     <p>
 950       Beans persistance can be used to embed any Object. This is
 951       typically used for embedding your own Painters, but can be used
 952       for other arbritrary objects as well. Refer to <a
 953                                                         href="http://java.sun.com/products/jfc/tsc/articles/persistence3/">http://java.sun.com/products/jfc/tsc/articles/persistence3/</a> for details on beans persistance.
 954 
 955 
 956     <h3>Backing Style</h3>
 957     <p>
 958       In creating a Synth file it's good practice to create a backing
 959       style that is used by all components.  This will make sure that
 960       any components that do not match a specific style will have
 961       a default font, foreground, background and opacity. The
 962       following example illustrates this:
 963     <div class="example">
 964       <pre>
 965 &lt;synth>
 966   &lt;style id="backingStyle">
 967     &lt;opaque value="true"/>
 968     &lt;font name="Dialog" size="12"/>
 969     &lt;state>
 970       &lt;color value="BLACK" type="BACKGROUND"/>
 971       &lt;color value="WHITE" type="FOREGROUND"/>
 972     &lt;/state>
 973   &lt;/style>


 933       The <a href="#e.opaque">opaque</a> element indicates whether or
 934       not any Components the style is associated with are to be made opaque.
 935       The painter will be asked to paint regardless of the opacity
 936       of the associated Component. The following example creates a style
 937       that is not opaque.
 938     </p>
 939     <div class="example">
 940       <pre>
 941 &lt;style id="test">
 942   &lt;opaque value="FALSE">
 943   &lt;painter idref="painter"/>
 944 &lt;/style>
 945     </pre>
 946 </div>
 947 
 948     <h3><a name="ee.beansPersistance">The beansPersistance entity</a></h3>
 949     <p>
 950       Beans persistance can be used to embed any Object. This is
 951       typically used for embedding your own Painters, but can be used
 952       for other arbritrary objects as well. Refer to <a
 953                                                         href="http://www.oracle.com/technetwork/java/persistence3-139471.html">http://www.oracle.com/technetwork/java/persistence3-139471.html</a> for details on beans persistance.
 954 
 955 
 956     <h3>Backing Style</h3>
 957     <p>
 958       In creating a Synth file it's good practice to create a backing
 959       style that is used by all components.  This will make sure that
 960       any components that do not match a specific style will have
 961       a default font, foreground, background and opacity. The
 962       following example illustrates this:
 963     <div class="example">
 964       <pre>
 965 &lt;synth>
 966   &lt;style id="backingStyle">
 967     &lt;opaque value="true"/>
 968     &lt;font name="Dialog" size="12"/>
 969     &lt;state>
 970       &lt;color value="BLACK" type="BACKGROUND"/>
 971       &lt;color value="WHITE" type="FOREGROUND"/>
 972     &lt;/state>
 973   &lt;/style>
< prev index next >