public abstract class AbstractCustomizationMenu extends 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,
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.
|
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(DockController controller)
Sets the controller in whose realm this menu is used.
|
public CustomizationMenuContent getContent()
CustomizationMenugetContent in interface CustomizationMenunullpublic void setContent(CustomizationMenuContent content)
CustomizationMenusetContent in interface CustomizationMenucontent - the new contents, can be nullpublic void setController(DockController controller)
CustomizationMenusetController in interface CustomizationMenucontroller - the new controller, can be nullpublic DockController getController()
nullpublic boolean isOpen()
public CustomizationMenuCallback getCallback()
null if this menu is not open.public void open(int x,
int y,
CustomizationMenuCallback callback)
CustomizationMenustation. The menus top left corner should be at coordinates
x,y.open in interface CustomizationMenux - the x coordinatey - the y coordinatecallback - allows communication with the station that opened this menupublic void close()
CustomizationMenuclose in interface CustomizationMenuprotected void closed()
protected abstract void doOpen(int x,
int y,
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 nullprotected abstract void doClose()
CustomizationMenuCallback required. Subclasses should
not call this method directly, instead they should always call close()Copyright © 2018. All rights reserved.