public class PopupController extends Object implements DockControllerRepresentativeListener
DockElementRepresentative
s to open popup menus
when the user makes a right click.Constructor and Description |
---|
PopupController(DockController controller)
Creates a new popup-controller.
|
Modifier and Type | Method and Description |
---|---|
DockController |
getController()
Gets the
DockController for which this PopupController works. |
ActionPopupMenuFactory |
getPopupMenuFactory()
Gets the factory which is responsible for creating new menus.
|
ActionPopupSuppressor |
getPopupSuppressor()
Gets the guard which decides, which popups should be allowed.
|
boolean |
isAllowEmptyMenu()
Tells whether empty menus can be shown.
|
boolean |
isAllowOnMove()
Tells whether menus can be opened during drag and drop operations
|
void |
representativeAdded(DockController controller,
DockElementRepresentative representative)
Informs this listener that
representative was added to
controller . |
void |
representativeRemoved(DockController controller,
DockElementRepresentative representative)
Informs this listener that
representative was removed
from controller . |
void |
setAllowEmptyMenu(boolean allowEmpty)
If set, then empty menus are still opened.
|
void |
setAllowOnMove(boolean allowOnMove)
Sets whether menus can be opened during drag and drop operations.
|
void |
setPopupMenuFactory(ActionPopupMenuFactory factory)
Sets the factoy which creates new menus that pop up.
|
void |
setPopupSuppressor(ActionPopupSuppressor popupSuppressor)
Sets the guard which decides, which popups with
DockActions
are allowed to show up, and which popups will be suppressed. |
public PopupController(DockController controller)
controller
- the controller for which this instance workspublic void representativeAdded(DockController controller, DockElementRepresentative representative)
DockControllerRepresentativeListener
representative
was added to
controller
.representativeAdded
in interface DockControllerRepresentativeListener
controller
- the source of the eventrepresentative
- the element that was addedpublic void representativeRemoved(DockController controller, DockElementRepresentative representative)
DockControllerRepresentativeListener
representative
was removed
from controller
.representativeRemoved
in interface DockControllerRepresentativeListener
controller
- the source of the eventrepresentative
- the element that was removedpublic DockController getController()
DockController
for which this PopupController
works.public void setPopupMenuFactory(ActionPopupMenuFactory factory)
factory
- the factory creating menus, not null
public ActionPopupMenuFactory getPopupMenuFactory()
null
public ActionPopupSuppressor getPopupSuppressor()
setPopupSuppressor(ActionPopupSuppressor)
public void setPopupSuppressor(ActionPopupSuppressor popupSuppressor)
DockActions
are allowed to show up, and which popups will be suppressed.popupSuppressor
- the guardpublic void setAllowEmptyMenu(boolean allowEmpty)
ActionPopupSuppressor
or the
ActionPopupMenuFactory
may however catch the empty menu and hide it.allowEmpty
- if set to false
, empty menus can never be shownpublic boolean isAllowEmptyMenu()
true
if empty menus can be shownpublic void setAllowOnMove(boolean allowOnMove)
false
and only be set to true
for very special occasions.allowOnMove
- whether menus can be opened during drag and drop operationspublic boolean isAllowOnMove()
true
if menus can be opened all the time