Class playbarDockable
java.lang.Object
name.moore.kevin.ze.swing.dockables.playbarDockable
- All Implemented Interfaces:
iDockable
This handler controls the start/stop/pause display of the stardate in-game
clock visualised as a set of media-player buttons.
PLAY tells JMonkeyEngine to step the stardate forward which triggers the application states to process appropriately. PLAYPAUSE freezes the stardate, but GUI interaction can continue.
- Author:
- Kevin Moore
<dev@kevin.moore.name>
-
Field Summary
FieldsModifier and TypeFieldDescriptionRespond to interactions by broadcasting events.private static org.slf4j.Loggerprivate com.google.common.eventbus.AsyncEventBusAble to broadcast on the windowEvent bus. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateplaybarDockable(com.google.common.eventbus.AsyncEventBus wb)Able to broadcast on the windowEvent bus. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Set when constructing the handler, an internal identity.Return the dock location - one of the cardinals eg "north".intThis XML should have the content of the dockable in a panel.static playbarDockablemake(com.google.common.eventbus.AsyncEventBus wb)Use a static so we keep a consistent pattern with other components.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface name.moore.kevin.ze.swing.dockables.iDockable
addPropertyChangeListener, addPropertyChangeListener, getText, getTileHeight, removePropertyChangeListener
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
windowbus
private com.google.common.eventbus.AsyncEventBus windowbusAble to broadcast on the windowEvent bus. -
actionlistener
Respond to interactions by broadcasting events.
-
-
Constructor Details
-
playbarDockable
private playbarDockable(com.google.common.eventbus.AsyncEventBus wb)Able to broadcast on the windowEvent bus.- Parameters:
wb-
-
-
Method Details
-
make
Use a static so we keep a consistent pattern with other components.- Parameters:
wb-- Returns:
-
getName
Set when constructing the handler, an internal identity. -
getTileWidth
public int getTileWidth()- Specified by:
getTileWidthin interfaceiDockable- Returns:
- width in terms of grid slots to use, default is 1
-
getPreferredDock
Description copied from interface:iDockableReturn the dock location - one of the cardinals eg "north". Default to "center" matching the default 1x1 tile size.- Specified by:
getPreferredDockin interfaceiDockable- Returns:
-
getXMLlayout
Description copied from interface:iDockableThis XML should have the content of the dockable in a panel.- Specified by:
getXMLlayoutin interfaceiDockable- Returns:
-