src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java

Print this page




  46  * feel. SynthLookAndFeel does not directly provide a look, all painting is
  47  * delegated.
  48  * You need to either provide a configuration file, by way of the
  49  * {@link #load} method, or provide your own {@link SynthStyleFactory}
  50  * to {@link #setStyleFactory}. Refer to the
  51  * <a href="package-summary.html">package summary</a> for an example of
  52  * loading a file, and {@link javax.swing.plaf.synth.SynthStyleFactory} for
  53  * an example of providing your own <code>SynthStyleFactory</code> to
  54  * <code>setStyleFactory</code>.
  55  * <p>
  56  * <strong>Warning:</strong>
  57  * This class implements {@link Serializable} as a side effect of it
  58  * extending {@link BasicLookAndFeel}. It is not intended to be serialized.
  59  * An attempt to serialize it will
  60  * result in {@link NotSerializableException}.
  61  *
  62  * @serial exclude
  63  * @since 1.5
  64  * @author Scott Violet
  65  */

  66 public class SynthLookAndFeel extends BasicLookAndFeel {
  67     /**
  68      * Used in a handful of places where we need an empty Insets.
  69      */
  70     static final Insets EMPTY_UIRESOURCE_INSETS = new InsetsUIResource(
  71                                                             0, 0, 0, 0);
  72 
  73     /**
  74      * AppContext key to get the current SynthStyleFactory.
  75      */
  76     private static final Object STYLE_FACTORY_KEY =
  77                   new StringBuffer("com.sun.java.swing.plaf.gtk.StyleCache");
  78 
  79     /**
  80      * AppContext key to get selectedUI.
  81      */
  82     private static final Object SELECTED_UI_KEY = new StringBuilder("selectedUI");
  83 
  84     /**
  85      * AppContext key to get selectedUIState.




  46  * feel. SynthLookAndFeel does not directly provide a look, all painting is
  47  * delegated.
  48  * You need to either provide a configuration file, by way of the
  49  * {@link #load} method, or provide your own {@link SynthStyleFactory}
  50  * to {@link #setStyleFactory}. Refer to the
  51  * <a href="package-summary.html">package summary</a> for an example of
  52  * loading a file, and {@link javax.swing.plaf.synth.SynthStyleFactory} for
  53  * an example of providing your own <code>SynthStyleFactory</code> to
  54  * <code>setStyleFactory</code>.
  55  * <p>
  56  * <strong>Warning:</strong>
  57  * This class implements {@link Serializable} as a side effect of it
  58  * extending {@link BasicLookAndFeel}. It is not intended to be serialized.
  59  * An attempt to serialize it will
  60  * result in {@link NotSerializableException}.
  61  *
  62  * @serial exclude
  63  * @since 1.5
  64  * @author Scott Violet
  65  */
  66 @SuppressWarnings("serial") // Per above comment, not actually serializable
  67 public class SynthLookAndFeel extends BasicLookAndFeel {
  68     /**
  69      * Used in a handful of places where we need an empty Insets.
  70      */
  71     static final Insets EMPTY_UIRESOURCE_INSETS = new InsetsUIResource(
  72                                                             0, 0, 0, 0);
  73 
  74     /**
  75      * AppContext key to get the current SynthStyleFactory.
  76      */
  77     private static final Object STYLE_FACTORY_KEY =
  78                   new StringBuffer("com.sun.java.swing.plaf.gtk.StyleCache");
  79 
  80     /**
  81      * AppContext key to get selectedUI.
  82      */
  83     private static final Object SELECTED_UI_KEY = new StringBuilder("selectedUI");
  84 
  85     /**
  86      * AppContext key to get selectedUIState.