bibliothek.extension.gui.dock.theme.eclipse.stack.tab4
Class TabComponentCondition

java.lang.Object
  extended by bibliothek.extension.gui.dock.theme.eclipse.stack.tab4.TabComponentCondition
Direct Known Subclasses:
HoverCondition

public abstract class TabComponentCondition
extends Object

A TabComponentCondition is a layer around a TabComponent that offers access to an implicitely defined condition, e.g. whether the mouse is over the TabComponent.

Author:
Benjamin Sigg

Constructor Summary
TabComponentCondition(TabComponent component)
          Creates a new condition
 
Method Summary
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 fullfilled 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabComponentCondition

public TabComponentCondition(TabComponent component)
Creates a new condition

Parameters:
component - the component to observe, not null
Method Detail

getComponent

public TabComponent getComponent()
Gets the TabComponent which is observed by this condition.

Returns:
the observed component

checkCondition

protected abstract boolean checkCondition()
Reads the condition. This method is only called if invalidate() was called. Otherwise the previously stored value is returned.

Returns:
true if the condition is fullfilled, false otherwise

invalidate

public void invalidate()
Tells this condition that it is no longer valid and that its state has to be calculated again.


validate

public void validate()
Makes sure the state of this condition is valid. This method does nothing if invalidate() was not called.


getCondition

public boolean getCondition()
Tells whether the condition is fullfilled or not.

Returns:
the state of this condition