bibliothek.gui.dock.control
Class PopupController.ComponentObserver

java.lang.Object
  extended by javax.swing.event.MouseInputAdapter
      extended by bibliothek.gui.dock.action.ActionPopup
          extended by bibliothek.gui.dock.control.PopupController.ComponentObserver
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.MouseInputListener
Direct Known Subclasses:
PopupController.DockableObserver
Enclosing class:
PopupController

private class PopupController.ComponentObserver
extends ActionPopup

A mouse listener opening a popup menu when necessary.

Author:
Benjamin Sigg

Field Summary
protected  Dockable dockable
          the dockable for which a listener might be opened
private  DockTitle title
          the observed title, can be null
 
Constructor Summary
PopupController.ComponentObserver(Dockable dockable, DockTitle title)
          Creates a new observer
 
Method Summary
protected  Dockable getDockable()
          Gets the Dockable to which the actions are linked.
protected  DockActionSource getSource()
          Gets the actions, that will be displayed
protected  boolean isEnabled()
          Tells, whether a popup can be displayed, or not.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 
Methods inherited from class bibliothek.gui.dock.action.ActionPopup
isSuppressable, mousePressed, mouseReleased, popup, popup, setSuppressable
 
Methods inherited from class javax.swing.event.MouseInputAdapter
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 dockable for which a listener might be opened


title

private DockTitle title
the observed title, can be null

Constructor Detail

PopupController.ComponentObserver

public PopupController.ComponentObserver(Dockable dockable,
                                         DockTitle title)
Creates a new observer

Parameters:
dockable - the element for which a popup might be opened
title - the title which might be observed, can be null
Method Detail

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class javax.swing.event.MouseInputAdapter

getDockable

protected 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

getSource

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

Specified by:
getSource in class ActionPopup
Returns:
The actions

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.