Class playbarDockable

java.lang.Object
name.moore.kevin.ze.swing.dockables.playbarDockable
All Implemented Interfaces:
iDockable

public class playbarDockable extends Object implements 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 Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • windowbus

      private com.google.common.eventbus.AsyncEventBus windowbus
      Able to broadcast on the windowEvent bus.
    • actionlistener

      public ActionListener 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

      public static playbarDockable make(com.google.common.eventbus.AsyncEventBus wb)
      Use a static so we keep a consistent pattern with other components.
      Parameters:
      wb -
      Returns:
    • getName

      public String getName()
      Set when constructing the handler, an internal identity.
      Specified by:
      getName in interface iDockable
      Returns:
      unique name of this dockable component.
    • getTileWidth

      public int getTileWidth()
      Specified by:
      getTileWidth in interface iDockable
      Returns:
      width in terms of grid slots to use, default is 1
    • getPreferredDock

      public String getPreferredDock()
      Description copied from interface: iDockable
      Return the dock location - one of the cardinals eg "north". Default to "center" matching the default 1x1 tile size.
      Specified by:
      getPreferredDock in interface iDockable
      Returns:
    • getXMLlayout

      public String getXMLlayout()
      Description copied from interface: iDockable
      This XML should have the content of the dockable in a panel.
      Specified by:
      getXMLlayout in interface iDockable
      Returns: