javax.swing.plaf.synth
Class SynthContext

java.lang.Object
  extended by javax.swing.plaf.synth.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
 JComponent getComponent()
          Returns the component that contains the region.
 int getComponentState()
          Returns the state of the component.
 Region getRegion()
          Returns the region that identifies this state.
 SynthStyle getStyle()
          Returns the style of the region.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 SynthConstants
Method Detail

getComponent

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

Returns:
the component that contains the region

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

getComponentState

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

Returns:
the state of the component
See Also:
SynthConstants