bibliothek.gui.dock.title
Class ActivityDockTitleEvent

java.lang.Object
  extended by bibliothek.gui.dock.title.DockTitleEvent
      extended by bibliothek.gui.dock.title.ActivityDockTitleEvent
Direct Known Subclasses:
EclipseDockTitleEvent

public class ActivityDockTitleEvent
extends DockTitleEvent

An event telling whether a DockTitle should be focused or not.

Author:
Benjamin Sigg

Constructor Summary
ActivityDockTitleEvent(Dockable dockable, boolean active)
          Constructs a new event.
ActivityDockTitleEvent(DockStation station, Dockable dockable, boolean active)
          Constructs a new event.
 
Method Summary
 boolean isActive()
          Returns whether the target-title should be painted in a "focused"-state.
 boolean isPreferred()
          Tells whether the Dockable is preferred in some way by the station.
 void setPreferred(boolean preferred)
          Sets whether the Dockable is preferred.
 
Methods inherited from class bibliothek.gui.dock.title.DockTitleEvent
getDockable, getStation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityDockTitleEvent

public ActivityDockTitleEvent(Dockable dockable,
                              boolean active)
Constructs a new event.

Parameters:
dockable - the Dockable for which the target-title is rendered
active - true if dockable is the selected and focused child, false otherwise

ActivityDockTitleEvent

public ActivityDockTitleEvent(DockStation station,
                              Dockable dockable,
                              boolean active)
Constructs a new event. This constructor should only be called if a DockStation itself sends the event. Other components should use ActivityDockTitleEvent(Dockable, boolean).

Parameters:
station - the station on which the target-title is displayed
dockable - the Dockable for which the target-title is rendered
active - true if dockable is the selected and focused child, false otherwise
Method Detail

isActive

public boolean isActive()
Returns whether the target-title should be painted in a "focused"-state.

Returns:
true if the Dockable is focused, false otherwise.

isPreferred

public boolean isPreferred()
Tells whether the Dockable is preferred in some way by the station. If so, a DockTitle can be drawn slightly different than a normal title.

Returns:
true if the Dockable is a very special Dockable

setPreferred

public void setPreferred(boolean preferred)
Sets whether the Dockable is preferred.

Parameters:
preferred - true if the target-title should be painted in a special way
See Also:
isPreferred()