1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8"/>
5 <title>Synth File Format</title>
6 <!--
7 Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
8 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9
10 This code is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License version 2 only, as
12 published by the Free Software Foundation. Oracle designates this
13 particular file as subject to the "Classpath" exception as provided
14 by Oracle in the LICENSE file that accompanied this code.
15
16 This code is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 version 2 for more details (a copy is included in the LICENSE file that
20 accompanied this code).
21
22 You should have received a copy of the GNU General Public License version
23 2 along with this work; if not, write to the Free Software Foundation,
24 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
25
26 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
27 or visit www.oracle.com if you need additional information or have any
760 <p>
761 Consider the following:
762 </p>
763 <div class="example">
764 <pre>
765 <style id="test">
766 <painter idref="fallbackPainter"/>
767 <painter idref="styleButtonBackgroundPainter" method="buttonBackground"/>
768 <state value="SELECTED">
769 <painter idref="stateFallbackPainter"/>
770 <painter idref="stateButtonBackgroundPainter" method="buttonBackground"/>
771 </state>
772 </style>
773 </pre>
774 </div>
775 <p>
776 The following outlines which painter will be used for what
777 SynthPainter method:
778 </p>
779 <table border=1>
780 <caption> Painters for SynthPainter methods </caption>
781 <tr><th>State<th>Method<th>Painter
782 <tr><td>SELECTED<td>paintButtonBackground<td>stateButtonBackgroundPainter
783 <tr><td>SELECTED<td>Anything but paintButtonBackground<td>stateFallbackPainter
784 <tr><td>Anything but SELECTED<td>paintButtonBackground<td>styleButtonBackgroundPainter
785 <tr><td>Anything but SELECTED<td>Anything but paintButtonBackground<td>fallbackPainter
786 </table>
787
788 <p>
789 When several identical painters are declared, they are aggregated into
790 a single one. Two painters are identical if their <em>direction</em> and
791 <em>method</em> attributes values are equal. Consider the following:
792 </p>
793
794 <div class="example">
795 <pre>
796 <style id="panelStyle">
797 <imagePainter method="panelBackground" path="red.png" />
798 <imagePainter method="panelBackground" path="green.png" />
799 <imagePainter method="panelBackground" path="blue.png" />
800 </style>
801 </pre>
802 </div>
803
804 <p>
805 These three painters are identical for they use the same method and the
|
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8"/>
5 <title>Synth File Format</title>
6 <!--
7 Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
8 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9
10 This code is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License version 2 only, as
12 published by the Free Software Foundation. Oracle designates this
13 particular file as subject to the "Classpath" exception as provided
14 by Oracle in the LICENSE file that accompanied this code.
15
16 This code is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 version 2 for more details (a copy is included in the LICENSE file that
20 accompanied this code).
21
22 You should have received a copy of the GNU General Public License version
23 2 along with this work; if not, write to the Free Software Foundation,
24 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
25
26 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
27 or visit www.oracle.com if you need additional information or have any
760 <p>
761 Consider the following:
762 </p>
763 <div class="example">
764 <pre>
765 <style id="test">
766 <painter idref="fallbackPainter"/>
767 <painter idref="styleButtonBackgroundPainter" method="buttonBackground"/>
768 <state value="SELECTED">
769 <painter idref="stateFallbackPainter"/>
770 <painter idref="stateButtonBackgroundPainter" method="buttonBackground"/>
771 </state>
772 </style>
773 </pre>
774 </div>
775 <p>
776 The following outlines which painter will be used for what
777 SynthPainter method:
778 </p>
779 <table border=1>
780 <caption>Painters for SynthPainter methods</caption>
781 <thead>
782 <tr>
783 <th scope="col">Index
784 <th scope="col">State
785 <th scope="col">Method
786 <th scope="col">Painter
787 </thead>
788 <tbody>
789 <tr>
790 <th scope="row">1
791 <td>SELECTED
792 <td>paintButtonBackground<td>stateButtonBackgroundPainter
793 <tr>
794 <th scope="row">2
795 <td>SELECTED
796 <td>Anything but paintButtonBackground<td>stateFallbackPainter
797 <tr>
798 <th scope="row">3
799 <td>Anything but SELECTED
800 <td>paintButtonBackground<td>styleButtonBackgroundPainter
801 <tr>
802 <th scope="row">4
803 <td>Anything but SELECTED
804 <td>Anything but paintButtonBackground<td>fallbackPainter
805 </tbody>
806 </table>
807
808 <p>
809 When several identical painters are declared, they are aggregated into
810 a single one. Two painters are identical if their <em>direction</em> and
811 <em>method</em> attributes values are equal. Consider the following:
812 </p>
813
814 <div class="example">
815 <pre>
816 <style id="panelStyle">
817 <imagePainter method="panelBackground" path="red.png" />
818 <imagePainter method="panelBackground" path="green.png" />
819 <imagePainter method="panelBackground" path="blue.png" />
820 </style>
821 </pre>
822 </div>
823
824 <p>
825 These three painters are identical for they use the same method and the
|