< prev index next >
src/java.desktop/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java
Print this page
*** 34,45 ****
* Default implementation of SynthStyle. Has setters for the various
* SynthStyle methods. Many of the properties can be specified for all states,
* using SynthStyle directly, or a specific state using one of the StateInfo
* methods.
* <p>
! * Beyond the constructor a subclass should override the <code>addTo</code>
! * and <code>clone</code> methods, these are used when the Styles are being
* merged into a resulting style.
*
* @author Scott Violet
*/
public class DefaultSynthStyle extends SynthStyle implements Cloneable {
--- 34,45 ----
* Default implementation of SynthStyle. Has setters for the various
* SynthStyle methods. Many of the properties can be specified for all states,
* using SynthStyle directly, or a specific state using one of the StateInfo
* methods.
* <p>
! * Beyond the constructor a subclass should override the {@code addTo}
! * and {@code clone} methods, these are used when the Styles are being
* merged into a resulting style.
*
* @author Scott Violet
*/
public class DefaultSynthStyle extends SynthStyle implements Cloneable {
*** 294,304 ****
public void setInsets(Insets insets) {
this.insets = insets;
}
/**
! * Returns the Insets. If <code>to</code> is non-null the resulting
* insets will be placed in it, otherwise a new Insets object will be
* created and returned.
*
* @param state SynthContext identifying requestor
* @param to Where to place Insets
--- 294,304 ----
public void setInsets(Insets insets) {
this.insets = insets;
}
/**
! * Returns the Insets. If {@code to} is non-null the resulting
* insets will be placed in it, otherwise a new Insets object will be
* created and returned.
*
* @param state SynthContext identifying requestor
* @param to Where to place Insets
*** 431,441 ****
return value;
}
/**
* Returns the default value for a particular property. This is only
! * invoked if this style doesn't define a property for <code>key</code>.
*
* @param context SynthContext identifying requestor
* @param key Property being requested.
* @return Value of the named property
*/
--- 431,441 ----
return value;
}
/**
* Returns the default value for a particular property. This is only
! * invoked if this style doesn't define a property for {@code key}.
*
* @param context SynthContext identifying requestor
* @param key Property being requested.
* @return Value of the named property
*/
*** 469,482 ****
}
/**
* Merges the contents of this Style with that of the passed in Style,
* returning the resulting merged syle. Properties of this
! * <code>DefaultSynthStyle</code> will take precedence over those of the
! * passed in <code>DefaultSynthStyle</code>. For example, if this
* style specifics a non-null font, the returned style will have its
! * font so to that regardless of the <code>style</code>'s font.
*
* @param style Style to add our styles to
* @return Merged style.
*/
public DefaultSynthStyle addTo(DefaultSynthStyle style) {
--- 469,482 ----
}
/**
* Merges the contents of this Style with that of the passed in Style,
* returning the resulting merged syle. Properties of this
! * {@code DefaultSynthStyle} will take precedence over those of the
! * passed in {@code DefaultSynthStyle}. For example, if this
* style specifics a non-null font, the returned style will have its
! * font so to that regardless of the {@code style}'s font.
*
* @param style Style to add our styles to
* @return Merged style.
*/
public DefaultSynthStyle addTo(DefaultSynthStyle style) {
*** 780,800 ****
return font;
}
/**
* Sets the array of colors to use for rendering this state. This
! * is indexed by <code>ColorType.getID()</code>.
*
* @param colors Array of colors
*/
public void setColors(Color[] colors) {
this.colors = colors;
}
/**
* Returns the array of colors to use for rendering this state. This
! * is indexed by <code>ColorType.getID()</code>.
*
* @return Array of colors
*/
public Color[] getColors() {
return colors;
--- 780,800 ----
return font;
}
/**
* Sets the array of colors to use for rendering this state. This
! * is indexed by {@code ColorType.getID()}.
*
* @param colors Array of colors
*/
public void setColors(Color[] colors) {
this.colors = colors;
}
/**
* Returns the array of colors to use for rendering this state. This
! * is indexed by {@code ColorType.getID()}.
*
* @return Array of colors
*/
public Color[] getColors() {
return colors;
*** 817,830 ****
}
/**
* Merges the contents of this StateInfo with that of the passed in
* StateInfo, returning the resulting merged StateInfo. Properties of
! * this <code>StateInfo</code> will take precedence over those of the
! * passed in <code>StateInfo</code>. For example, if this
* StateInfo specifics a non-null font, the returned StateInfo will
! * have its font so to that regardless of the <code>StateInfo</code>'s
* font.
*
* @param info StateInfo to add our styles to
* @return Merged StateInfo.
*/
--- 817,830 ----
}
/**
* Merges the contents of this StateInfo with that of the passed in
* StateInfo, returning the resulting merged StateInfo. Properties of
! * this {@code StateInfo} will take precedence over those of the
! * passed in {@code StateInfo}. For example, if this
* StateInfo specifics a non-null font, the returned StateInfo will
! * have its font so to that regardless of the {@code StateInfo}'s
* font.
*
* @param info StateInfo to add our styles to
* @return Merged StateInfo.
*/
< prev index next >