Class ActionButton

All Implemented Interfaces:
HasLocalTransform, CloneableSmartAsset, Collidable, Savable, JmeCloneable, Cloneable

public class ActionButton extends Button
A Button specialization that wraps an Action and reflects changes to the Action's properties.
  • Constructor Details

    • ActionButton

      public ActionButton(Action action)
    • ActionButton

      public ActionButton(Action action, String style)
    • ActionButton

      public ActionButton(Action action, ElementId elementId)
    • ActionButton

      public ActionButton(Action action, ElementId elementId, String style)
  • Method Details

    • setupCommands

      protected final void setupCommands()
    • setAction

      public final void setAction(Action action)
      Sets a new Action to this button and clears any previously set action. The button's text, icon, etc. will be changed to the Action's properties and will be kept in sync as the action changes. Click events will be passed through to the action.
    • getAction

      public Action getAction()
    • updateLogicalState

      public void updateLogicalState(float tpf)
      Description copied from class: Spatial
      updateLogicalState calls the update() method for all controls attached to this Spatial.
      Overrides:
      updateLogicalState in class Node
      Parameters:
      tpf - Time per frame.
      See Also:
    • updateButton

      protected void updateButton()
    • updateText

      protected void updateText()
    • updateEnabled

      protected void updateEnabled()
    • updateIcon

      protected void updateIcon()