< prev index next >

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

Print this page

        

*** 34,50 **** import java.util.Map; import javax.swing.text.JTextComponent; import sun.swing.SwingUtilities2; /** ! * <code>SynthStyle</code> is a set of style properties. ! * Each <code>SynthUI</code> references at least one ! * <code>SynthStyle</code> that is obtained using a ! * <code>SynthStyleFactory</code>. You typically don't need to interact with * this class directly, rather you will load a * <a href="doc-files/synthFileFormat.html">Synth File Format file</a> into ! * <code>SynthLookAndFeel</code> that will create a set of SynthStyles. * * @see SynthLookAndFeel * @see SynthStyleFactory * * @since 1.5 --- 34,50 ---- import java.util.Map; import javax.swing.text.JTextComponent; import sun.swing.SwingUtilities2; /** ! * {@code SynthStyle} is a set of style properties. ! * Each {@code SynthUI} references at least one ! * {@code SynthStyle} that is obtained using a ! * {@code SynthStyleFactory}. You typically don't need to interact with * this class directly, rather you will load a * <a href="doc-files/synthFileFormat.html">Synth File Format file</a> into ! * {@code SynthLookAndFeel} that will create a set of SynthStyles. * * @see SynthLookAndFeel * @see SynthStyleFactory * * @since 1.5
*** 734,757 **** */ public SynthStyle() { } /** ! * Returns the <code>SynthGraphicUtils</code> for the specified context. * * @param context SynthContext identifying requester * @return SynthGraphicsUtils */ public SynthGraphicsUtils getGraphicsUtils(SynthContext context) { return SYNTH_GRAPHICS; } /** * Returns the color for the specified state. This gives precedence to ! * foreground and background of the <code>JComponent</code>. If the ! * <code>Color</code> from the <code>JComponent</code> is not appropriate, ! * or not used, this will invoke <code>getColorForState</code>. Subclasses * should generally not have to override this, instead override * {@link #getColorForState}. * * @param context SynthContext identifying requester * @param type Type of color being requested. --- 734,757 ---- */ public SynthStyle() { } /** ! * Returns the {@code SynthGraphicUtils} for the specified context. * * @param context SynthContext identifying requester * @return SynthGraphicsUtils */ public SynthGraphicsUtils getGraphicsUtils(SynthContext context) { return SYNTH_GRAPHICS; } /** * Returns the color for the specified state. This gives precedence to ! * foreground and background of the {@code JComponent}. If the ! * {@code Color} from the {@code JComponent} is not appropriate, ! * or not used, this will invoke {@code getColorForState}. Subclasses * should generally not have to override this, instead override * {@link #getColorForState}. * * @param context SynthContext identifying requester * @param type Type of color being requested.
*** 816,837 **** return color; } /** * Returns the color for the specified state. This should NOT call any ! * methods on the <code>JComponent</code>. * * @param context SynthContext identifying requester * @param type Type of color being requested. * @return Color to render with */ protected abstract Color getColorForState(SynthContext context, ColorType type); /** * Returns the Font for the specified state. This redirects to the ! * <code>JComponent</code> from the <code>context</code> as necessary. * If this does not redirect * to the JComponent {@link #getFontForState} is invoked. * * @param context SynthContext identifying requester * @return Font to render with --- 816,837 ---- return color; } /** * Returns the color for the specified state. This should NOT call any ! * methods on the {@code JComponent}. * * @param context SynthContext identifying requester * @param type Type of color being requested. * @return Color to render with */ protected abstract Color getColorForState(SynthContext context, ColorType type); /** * Returns the Font for the specified state. This redirects to the ! * {@code JComponent} from the {@code context} as necessary. * If this does not redirect * to the JComponent {@link #getFontForState} is invoked. * * @param context SynthContext identifying requester * @return Font to render with
*** 848,858 **** return getFontForState(context); } /** * Returns the font for the specified state. This should NOT call any ! * method on the <code>JComponent</code>. * * @param context SynthContext identifying requester * @return Font to render with */ protected abstract Font getFontForState(SynthContext context); --- 848,858 ---- return getFontForState(context); } /** * Returns the font for the specified state. This should NOT call any ! * method on the {@code JComponent}. * * @param context SynthContext identifying requester * @return Font to render with */ protected abstract Font getFontForState(SynthContext context);
*** 871,881 **** insets.top = insets.bottom = insets.left = insets.right = 0; return insets; } /** ! * Returns the <code>SynthPainter</code> that will be used for painting. * This may return null. * * @param context SynthContext identifying requester * @return SynthPainter to use */ --- 871,881 ---- insets.top = insets.bottom = insets.left = insets.right = 0; return insets; } /** ! * Returns the {@code SynthPainter} that will be used for painting. * This may return null. * * @param context SynthContext identifying requester * @return SynthPainter to use */
*** 918,928 **** installDefaults(context); } /** * Installs the necessary state from this Style on the ! * <code>JComponent</code> from <code>context</code>. * * @param context SynthContext identifying component to install properties * to. */ public void installDefaults(SynthContext context) { --- 918,928 ---- installDefaults(context); } /** * Installs the necessary state from this Style on the ! * {@code JComponent} from {@code context}. * * @param context SynthContext identifying component to install properties * to. */ public void installDefaults(SynthContext context) {
*** 948,958 **** } } /** * Uninstalls any state that this style installed on ! * the <code>JComponent</code> from <code>context</code>. * <p> * Styles should NOT depend upon this being called, in certain cases * it may never be called. * * @param context SynthContext identifying component to install properties --- 948,958 ---- } } /** * Uninstalls any state that this style installed on ! * the {@code JComponent} from {@code context}. * <p> * Styles should NOT depend upon this being called, in certain cases * it may never be called. * * @param context SynthContext identifying component to install properties
*** 975,986 **** } } /** * Convenience method to get a specific style property whose value is ! * a <code>Number</code>. If the value is a <code>Number</code>, ! * <code>intValue</code> is returned, otherwise <code>defaultValue</code> * is returned. * * @param context SynthContext identifying requester * @param key Property being requested. * @param defaultValue Value to return if the property has not been --- 975,986 ---- } } /** * Convenience method to get a specific style property whose value is ! * a {@code Number}. If the value is a {@code Number}, ! * {@code intValue} is returned, otherwise {@code defaultValue} * is returned. * * @param context SynthContext identifying requester * @param key Property being requested. * @param defaultValue Value to return if the property has not been
< prev index next >