bibliothek.gui.dock.station.stack
Class DefaultStackDockComponent.Tab

java.lang.Object
  extended by javax.swing.event.MouseInputAdapter
      extended by bibliothek.gui.dock.action.ActionPopup
          extended by bibliothek.gui.dock.station.stack.DefaultStackDockComponent.Tab
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.MouseInputListener
Direct Known Subclasses:
BasicStackDockComponent.BasicTab
Enclosing class:
DefaultStackDockComponent

public class DefaultStackDockComponent.Tab
extends ActionPopup

Representation of a single tab of this StackDockComponent.

Author:
Benjamin Sigg

Field Summary
protected  Dockable dockable
          the element on the tab
 
Constructor Summary
DefaultStackDockComponent.Tab(Dockable dockable)
          Creates a new Tab
 
Method Summary
protected  DockActionSource getActions()
          Gets the actions, that will be displayed
 Dockable getDockable()
          Gets the Dockable to which the actions are linked.
protected  java.lang.Object getSource()
          Gets the source object, the object which is responsible for showing the current menu.
protected  boolean isEnabled()
          Tells, whether a popup can be displayed, or not.
 void popup(java.awt.event.MouseEvent event)
          Shows the popup of this ActionPopup.
 void setController(DockController controller)
          Tells this tab which controller is currently used.
 
Methods inherited from class bibliothek.gui.dock.action.ActionPopup
getFactory, getPopupLocation, isMenuOpen, isSuppressable, mousePressed, mouseReleased, popup, setSuppressable
 
Methods inherited from class javax.swing.event.MouseInputAdapter
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dockable

protected Dockable dockable
the element on the tab

Constructor Detail

DefaultStackDockComponent.Tab

public DefaultStackDockComponent.Tab(Dockable dockable)
Creates a new Tab

Parameters:
dockable - the element on the tab
Method Detail

getDockable

public Dockable getDockable()
Description copied from class: ActionPopup
Gets the Dockable to which the actions are linked.

Specified by:
getDockable in class ActionPopup
Returns:
The Dockable

setController

public void setController(DockController controller)
Tells this tab which controller is currently used. Set to null if this tab is no longer used, or when the connection to a DockController is lost.

Parameters:
controller - the new source of information, can be null

popup

public void popup(java.awt.event.MouseEvent event)
Description copied from class: ActionPopup
Shows the popup of this ActionPopup. This method is normally invoked by the mousePressed or the mouseReleased-method

Overrides:
popup in class ActionPopup
Parameters:
event - The MouseEvent that triggers the popup. The event must not consumed

getActions

protected DockActionSource getActions()
Description copied from class: ActionPopup
Gets the actions, that will be displayed

Specified by:
getActions in class ActionPopup
Returns:
The actions

getSource

protected java.lang.Object getSource()
Description copied from class: ActionPopup
Gets the source object, the object which is responsible for showing the current menu.

Specified by:
getSource in class ActionPopup
Returns:
the source object, may be null

isEnabled

protected boolean isEnabled()
Description copied from class: ActionPopup
Tells, whether a popup can be displayed, or not.

Specified by:
isEnabled in class ActionPopup
Returns:
true if a popup can be displayed, false otherwise.