public abstract class AbstractCustomizationMenu extends java.lang.Object implements CustomizationMenu
CustomizationMenu
offers fields to store standard data required
by all menus.Constructor and Description |
---|
AbstractCustomizationMenu() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this menu.
|
protected void |
closed() |
protected abstract void |
doClose()
Closes this menu.
|
protected abstract void |
doOpen(int x,
int y,
java.awt.Component content)
Shows this menu.
|
CustomizationMenuCallback |
getCallback()
Gets the callback for retrieving more information about the station that opened this menu.
|
CustomizationMenuContent |
getContent()
Gets the contents of this menu.
|
bibliothek.gui.DockController |
getController()
Gets the controller in whose realm this menu is used.
|
boolean |
isOpen()
Tells whether this menu currently is visible.
|
void |
open(int x,
int y,
CustomizationMenuCallback callback)
Opens the menu for
station . |
void |
setContent(CustomizationMenuContent content)
Sets the contents of this menu.
|
void |
setController(bibliothek.gui.DockController controller)
Sets the controller in whose realm this menu is used.
|
public CustomizationMenuContent getContent()
CustomizationMenu
getContent
in interface CustomizationMenu
null
public void setContent(CustomizationMenuContent content)
CustomizationMenu
setContent
in interface CustomizationMenu
content
- the new contents, can be null
public void setController(bibliothek.gui.DockController controller)
CustomizationMenu
setController
in interface CustomizationMenu
controller
- the new controller, can be null
public bibliothek.gui.DockController getController()
null
public boolean isOpen()
public CustomizationMenuCallback getCallback()
null
if this menu is not open
.public void open(int x, int y, CustomizationMenuCallback callback)
CustomizationMenu
station
. The menus top left corner should be at coordinates
x,y
.open
in interface CustomizationMenu
x
- the x coordinatey
- the y coordinatecallback
- allows communication with the station that opened this menupublic void close()
CustomizationMenu
close
in interface CustomizationMenu
protected void closed()
protected abstract void doOpen(int x, int y, java.awt.Component content)
Component
content
will never be replaced while the menu is open.x
- the preferred x coordinate of the menuy
- the preferred y coordinate of the menucontent
- the content of the menu, not null
protected abstract void doClose()
CustomizationMenuCallback
required. Subclasses should
not call this method directly, instead they should always call close()