public abstract class TabComponentCondition extends Object
TabComponentCondition
is a layer around a TabComponent
that offers access to an
implicitly defined condition, e.g. whether the mouse is over the TabComponent
.Constructor and Description |
---|
TabComponentCondition(TabComponent component)
Creates a new condition
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
checkCondition()
Reads the condition.
|
TabComponent |
getComponent()
Gets the
TabComponent which is observed by this condition. |
boolean |
getCondition()
Tells whether the condition is fulfilled or not.
|
void |
invalidate()
Tells this condition that it is no longer valid and that its state has to be
calculated again.
|
void |
validate()
Makes sure the state of this condition is valid.
|
public TabComponentCondition(TabComponent component)
component
- the component to observe, not null
public TabComponent getComponent()
TabComponent
which is observed by this condition.protected abstract boolean checkCondition()
invalidate()
was called. Otherwise the previously
stored value is returned.true
if the condition is fulfilled, false
otherwisepublic void invalidate()
public void validate()
invalidate()
was not called.public boolean getCondition()