< prev index next >

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

Print this page

        

@@ -48,12 +48,12 @@
  * You need to either provide a configuration file, by way of the
  * {@link #load} method, or provide your own {@link SynthStyleFactory}
  * to {@link #setStyleFactory}. Refer to the
  * <a href="package-summary.html">package summary</a> for an example of
  * loading a file, and {@link javax.swing.plaf.synth.SynthStyleFactory} for
- * an example of providing your own <code>SynthStyleFactory</code> to
- * <code>setStyleFactory</code>.
+ * an example of providing your own {@code SynthStyleFactory} to
+ * {@code setStyleFactory}.
  * <p>
  * <strong>Warning:</strong>
  * This class implements {@link Serializable} as a side effect of it
  * extending {@link BasicLookAndFeel}. It is not intended to be serialized.
  * An attempt to serialize it will

@@ -87,11 +87,11 @@
      */
     private static final Object SELECTED_UI_STATE_KEY = new StringBuilder("selectedUIState");
 
     /**
      * The last SynthStyleFactory that was asked for from AppContext
-     * <code>lastContext</code>.
+     * {@code lastContext}.
      */
     private static SynthStyleFactory lastFactory;
     /**
      * AppContext lastLAF came from.
      */

@@ -116,11 +116,11 @@
 
     /**
      * Used by the renderers. For the most part the renderers are implemented
      * as Labels, which is problematic in so far as they are never selected.
      * To accommodate this SynthLabelUI checks if the current
-     * UI matches that of <code>selectedUI</code> (which this methods sets), if
+     * UI matches that of {@code selectedUI} (which this methods sets), if
      * it does, then a state as set by this method is returned. This provides
      * a way for labels to have a state other than selected.
      */
     static void setSelectedUI(ComponentUI uix, boolean selected,
                               boolean focused, boolean enabled,

@@ -237,11 +237,11 @@
     }
 
     /**
      * Returns true if the Style should be updated in response to the
      * specified PropertyChangeEvent. This forwards to
-     * <code>shouldUpdateStyleOnAncestorChanged</code> as necessary.
+     * {@code shouldUpdateStyleOnAncestorChanged} as necessary.
      */
     static boolean shouldUpdateStyle(PropertyChangeEvent event) {
         LookAndFeel laf = UIManager.getLookAndFeel();
         return (laf instanceof SynthLookAndFeel &&
                 ((SynthLookAndFeel) laf).shouldUpdateStyleOnEvent(event));

@@ -267,13 +267,13 @@
         }
         return newStyle;
     }
 
     /**
-     * Updates the style associated with <code>c</code>, and all its children.
+     * Updates the style associated with {@code c}, and all its children.
      * This is a lighter version of
-     * <code>SwingUtilities.updateComponentTreeUI</code>.
+     * {@code SwingUtilities.updateComponentTreeUI}.
      *
      * @param c Component to update style for.
      */
     public static void updateStyles(Component c) {
         if (c instanceof JComponent) {

@@ -301,14 +301,14 @@
         }
         c.repaint();
     }
 
     /**
-     * Returns the Region for the JComponent <code>c</code>.
+     * Returns the Region for the JComponent {@code c}.
      *
      * @param c JComponent to fetch the Region for
-     * @return Region corresponding to <code>c</code>
+     * @return Region corresponding to {@code c}
      */
     public static Region getRegion(JComponent c) {
         return Region.getRegion(c);
     }
 

@@ -377,26 +377,26 @@
     static boolean isLeftToRight(Component c) {
         return c.getComponentOrientation().isLeftToRight();
     }
 
     /**
-     * Returns the ui that is of type <code>klass</code>, or null if
+     * Returns the ui that is of type {@code klass}, or null if
      * one can not be found.
      */
     static Object getUIOfType(ComponentUI ui, Class<?> klass) {
         if (klass.isInstance(ui)) {
             return ui;
         }
         return null;
     }
 
     /**
-     * Creates the Synth look and feel <code>ComponentUI</code> for
-     * the passed in <code>JComponent</code>.
+     * Creates the Synth look and feel {@code ComponentUI} for
+     * the passed in {@code JComponent}.
      *
-     * @param c JComponent to create the <code>ComponentUI</code> for
-     * @return ComponentUI to use for <code>c</code>
+     * @param c JComponent to create the {@code ComponentUI} for
+     * @return ComponentUI to use for {@code c}
      */
     public static ComponentUI createUI(JComponent c) {
         String key = c.getUIClassID().intern();
 
         if (key == "ButtonUI") {

@@ -533,35 +533,35 @@
 
 
     /**
      * Creates a SynthLookAndFeel.
      * <p>
-     * For the returned <code>SynthLookAndFeel</code> to be useful you need to
-     * invoke <code>load</code> to specify the set of
-     * <code>SynthStyle</code>s, or invoke <code>setStyleFactory</code>.
+     * For the returned {@code SynthLookAndFeel} to be useful you need to
+     * invoke {@code load} to specify the set of
+     * {@code SynthStyle}s, or invoke {@code setStyleFactory}.
      *
      * @see #load
      * @see #setStyleFactory
      */
     public SynthLookAndFeel() {
         factory = new DefaultSynthStyleFactory();
         _handler = new Handler();
     }
 
     /**
-     * Loads the set of <code>SynthStyle</code>s that will be used by
-     * this <code>SynthLookAndFeel</code>. <code>resourceBase</code> is
+     * Loads the set of {@code SynthStyle}s that will be used by
+     * this {@code SynthLookAndFeel}. {@code resourceBase} is
      * used to resolve any path based resources, for example an
-     * <code>Image</code> would be resolved by
-     * <code>resourceBase.getResource(path)</code>. Refer to
+     * {@code Image} would be resolved by
+     * {@code resourceBase.getResource(path)}. Refer to
      * <a href="doc-files/synthFileFormat.html">Synth File Format</a>
      * for more information.
      *
      * @param input InputStream to load from
      * @param resourceBase used to resolve any images or other resources
      * @throws ParseException if there is an error in parsing
-     * @throws IllegalArgumentException if input or resourceBase is <code>null</code>
+     * @throws IllegalArgumentException if input or resourceBase is {@code null}
      */
     public void load(InputStream input, Class<?> resourceBase) throws
                        ParseException {
         if (resourceBase == null) {
             throw new IllegalArgumentException(

@@ -575,23 +575,23 @@
         new SynthParser().parse(input, (DefaultSynthStyleFactory) factory,
                                 null, resourceBase, defaultsMap);
     }
 
     /**
-     * Loads the set of <code>SynthStyle</code>s that will be used by
-     * this <code>SynthLookAndFeel</code>. Path based resources are resolved
-     * relatively to the specified <code>URL</code> of the style. For example
-     * an <code>Image</code> would be resolved by
-     * <code>new URL(synthFile, path)</code>. Refer to
+     * Loads the set of {@code SynthStyle}s that will be used by
+     * this {@code SynthLookAndFeel}. Path based resources are resolved
+     * relatively to the specified {@code URL} of the style. For example
+     * an {@code Image} would be resolved by
+     * {@code new URL(synthFile, path)}. Refer to
      * <a href="doc-files/synthFileFormat.html">Synth File Format</a> for more
      * information.
      *
-     * @param url the <code>URL</code> to load the set of
-     *     <code>SynthStyle</code> from
+     * @param url the {@code URL} to load the set of
+     *     {@code SynthStyle} from
      * @throws ParseException if there is an error in parsing
-     * @throws IllegalArgumentException if synthSet is <code>null</code>
-     * @throws IOException if synthSet cannot be opened as an <code>InputStream</code>
+     * @throws IllegalArgumentException if synthSet is {@code null}
+     * @throws IOException if synthSet cannot be opened as an {@code InputStream}
      * @since 1.6
      */
     public void load(URL url) throws ParseException, IOException {
         if (url == null) {
             throw new IllegalArgumentException(

@@ -747,18 +747,18 @@
         return "Synth";
     }
 
     /**
      * Returns whether or not the UIs should update their
-     * <code>SynthStyles</code> from the <code>SynthStyleFactory</code>
-     * when the ancestor of the <code>JComponent</code> changes. A subclass
-     * that provided a <code>SynthStyleFactory</code> that based the
-     * return value from <code>getStyle</code> off the containment hierarchy
+     * {@code SynthStyles} from the {@code SynthStyleFactory}
+     * when the ancestor of the {@code JComponent} changes. A subclass
+     * that provided a {@code SynthStyleFactory} that based the
+     * return value from {@code getStyle} off the containment hierarchy
      * would override this method to return true.
      *
      * @return whether or not the UIs should update their
-     * <code>SynthStyles</code> from the <code>SynthStyleFactory</code>
+     * {@code SynthStyles} from the {@code SynthStyleFactory}
      * when the ancestor changed.
      */
     public boolean shouldUpdateStyleOnAncestorChanged() {
         return false;
     }
< prev index next >