javax.swing.plaf.synth

Class SynthContext

public class SynthContext extends Object

Contains some contextual information about a region. The information passed in objects of this class can only be considered valid during the method call that it was passed to.

Since: 1.5

Constructor Summary
SynthContext(JComponent component, Region region, SynthStyle style, int state)
Creates a new SynthContext object.
Method Summary
JComponentgetComponent()
Returns the component that contains the region.
intgetComponentState()
Returns the state of the component.
RegiongetRegion()
Returns the region that identifies this state.
SynthStylegetStyle()
Returns the style of the region.

Constructor Detail

SynthContext

public SynthContext(JComponent component, Region region, SynthStyle style, int state)
Creates a new SynthContext object.

Parameters: component the component for which this context is used region the region of the component style the style associated with the component state a or'ed bitmask of the constants from {@link SynthConstants}

Method Detail

getComponent

public JComponent getComponent()
Returns the component that contains the region.

Returns: the component that contains the region

getComponentState

public int getComponentState()
Returns the state of the component. This is a or'ed bitmask of the constants defined in {@link SynthConstants}.

Returns: the state of the component

See Also: SynthConstants

getRegion

public Region getRegion()
Returns the region that identifies this state.

Returns: the region that identifies this state

getStyle

public SynthStyle getStyle()
Returns the style of the region.

Returns: the style of the region