public class DoubleClickController
extends java.lang.Object
MouseListener
to all Dockable
s, DockTitle
s
and other DockElementRepresentative
s, informs the registered DoubleClickListener
s
whenever the user clicks twice on such an element.Modifier and Type | Class and Description |
---|---|
protected class |
DoubleClickController.GlobalDoubleClickListener
A listener which waits for a double-click-event.
|
Constructor and Description |
---|
DoubleClickController(ControllerSetupCollection setup)
Creates a new
DoubleClickController . |
Modifier and Type | Method and Description |
---|---|
void |
addListener(DoubleClickListener listener)
Adds a listener to this controller.
|
void |
removeListener(DoubleClickListener listener)
Removes a listener from this controller.
|
void |
send(Dockable dockable,
java.awt.event.MouseEvent event)
Fires an event to the
DoubleClickListener s whose location in the
tree is equal or below dockable . |
public DoubleClickController(ControllerSetupCollection setup)
DoubleClickController
.setup
- an observable that informs this object when controller
is set up.public void addListener(DoubleClickListener listener)
listener
- the new observerpublic void removeListener(DoubleClickListener listener)
listener
- the observer to removepublic void send(Dockable dockable, java.awt.event.MouseEvent event)
DoubleClickListener
s whose location in the
tree is equal or below dockable
. The order in which the
observers receive the event depends on their distance to the dockable
.dockable
- the dockable which was selected by the userevent
- the cause of the invocation, its click count must be 2.