APIdia Launch Partner
Top Description Fields Constructors Methods
sun.swing.plaf.synth

public Class StyleAssociation

extends Object
Class Inheritance
Imports
javax.swing.plaf.synth.*, java.util.*, java.util.regex.*

Warning

This class is an implementation detail and is only public so that it can be used by two packages. You should NOT consider this public API.

StyleAssociation is used to lookup a style for a particular component (or region).

Author
Scott Violet

Field Summary

Modifier and TypeField and Description
private int
_id

Identifier for this association.

private Matcher
_matcher

Matcher used for testing if path matches that of pattern.

private Pattern
_pattern

Pattern used for matching.

private SynthStyle
_style

The style

Constructor Summary

AccessConstructor and Description
private
StyleAssociation(String text, SynthStyle style, int id)

Method Summary

Modifier and TypeMethod and Description
public static StyleAssociation
createStyleAssociation(String text, SynthStyle style)

Returns a StyleAssociation that can be used to determine if a particular string matches the returned association.

public static StyleAssociation
createStyleAssociation(String text, SynthStyle style, int id)

Returns a StyleAssociation that can be used to determine if a particular string matches the returned association.

public int
getID()

Returns the developer specified identifier for this association, will be 0 if an identifier was not specified when this StyleAssociation was created.

public SynthStyle

Returns:

the style this association is mapped to.
getStyle
()

Returns the style this association is mapped to.

public String

Returns:

the text used in matching the string.
getText
()

Returns the text used in matching the string.

public synchronized boolean

Returns:

true if this StyleAssociation matches the passed in CharSequence.if this StyleAssociation.
matches
(CharSequence path)

Returns true if this StyleAssociation matches the passed in CharSequence.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_idback to summary
private int _id

Identifier for this association.

_matcherback to summary
private Matcher _matcher

Matcher used for testing if path matches that of pattern.

_patternback to summary
private Pattern _pattern

Pattern used for matching.

_styleback to summary
private SynthStyle _style

The style

Constructor Detail

StyleAssociationback to summary
private StyleAssociation(String text, SynthStyle style, int id) throws PatternSyntaxException

Method Detail

createStyleAssociationback to summary
public static StyleAssociation createStyleAssociation(String text, SynthStyle style) throws PatternSyntaxException

Returns a StyleAssociation that can be used to determine if a particular string matches the returned association.

createStyleAssociationback to summary
public static StyleAssociation createStyleAssociation(String text, SynthStyle style, int id) throws PatternSyntaxException

Returns a StyleAssociation that can be used to determine if a particular string matches the returned association.

getIDback to summary
public int getID()

Returns the developer specified identifier for this association, will be 0 if an identifier was not specified when this StyleAssociation was created.

getStyleback to summary
public SynthStyle getStyle()

Returns the style this association is mapped to.

Returns:SynthStyle

the style this association is mapped to.

getTextback to summary
public String getText()

Returns the text used in matching the string.

Returns:String

the text used in matching the string.

matchesback to summary
public synchronized boolean matches(CharSequence path)

Returns true if this StyleAssociation matches the passed in CharSequence.

Returns:boolean

true if this StyleAssociation matches the passed in CharSequence.if this StyleAssociation.