Class TableButton

java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
com.badlogic.gdx.scenes.scene2d.ui.Table
com.prineside.tdi2.ui.actors.TableButton
All Implemented Interfaces:
com.badlogic.gdx.scenes.scene2d.utils.Cullable, com.badlogic.gdx.scenes.scene2d.utils.Layout
Direct Known Subclasses:
MapEditorUi.ToolButton

public class TableButton extends com.badlogic.gdx.scenes.scene2d.ui.Table
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table

    com.badlogic.gdx.scenes.scene2d.ui.Table.Debug, com.badlogic.gdx.scenes.scene2d.ui.Table.DebugRect
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.badlogic.gdx.graphics.Color
     
    static final com.badlogic.gdx.graphics.Color
     
    static final com.badlogic.gdx.graphics.Color
     
    static final com.badlogic.gdx.graphics.Color
     

    Fields inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table

    backgroundBottom, backgroundLeft, backgroundRight, backgroundTop, debugActorColor, debugCellColor, debugTableColor
  • Constructor Summary

    Constructors
    Constructor
    Description
    TableButton(Runnable clickHandler)
     
    TableButton(Runnable clickHandler, Runnable holdHandler)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Positions and sizes children of the table using the cell associated with each child.
    setBackgroundDrawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable sharedBackground)
     
    setBackgroundDrawables(com.badlogic.gdx.scenes.scene2d.utils.Drawable normal, com.badlogic.gdx.scenes.scene2d.utils.Drawable active, com.badlogic.gdx.scenes.scene2d.utils.Drawable hover, com.badlogic.gdx.scenes.scene2d.utils.Drawable disabled)
     
    void
     
    setContentColors(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color disabled)
     
    void
    setEnabled(boolean enabled)
     
    void
     
    setMuted(boolean muted)
     
     

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table

    add, add, add, add, add, add, add, align, background, background, bottom, center, clearChildren, clip, clip, columnDefaults, debug, debug, debugActor, debugAll, debugCell, debugTable, defaults, draw, drawDebug, getAlign, getBackground, getCell, getCells, getClip, getColumnMinWidth, getColumnPrefWidth, getColumns, getColumnWidth, getMinHeight, getMinWidth, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getPrefHeight, getPrefWidth, getRow, getRowHeight, getRowMinHeight, getRowPrefHeight, getRows, getSkin, getTableDebug, hit, invalidate, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, removeActor, removeActorAt, reset, right, row, setBackground, setBackground, setClip, setDebug, setRound, setSkin, stack, top

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup

    getMaxHeight, getMaxWidth, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, validate

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group

    act, addActor, addActorAfter, addActorAt, addActorBefore, clear, clear, clearChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, setCullingArea, setDebug, setTransform, swapActor, swapActor, toString

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor

    addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_NORMAL_BG_COLOR

      public static final com.badlogic.gdx.graphics.Color DEFAULT_NORMAL_BG_COLOR
    • DEFAULT_HOVER_BG_COLOR

      public static final com.badlogic.gdx.graphics.Color DEFAULT_HOVER_BG_COLOR
    • DEFAULT_ACTIVE_BG_COLOR

      public static final com.badlogic.gdx.graphics.Color DEFAULT_ACTIVE_BG_COLOR
    • DEFAULT_DISABLED_BG_COLOR

      public static final com.badlogic.gdx.graphics.Color DEFAULT_DISABLED_BG_COLOR
  • Constructor Details

    • TableButton

      public TableButton(Runnable clickHandler)
    • TableButton

      public TableButton(Runnable clickHandler, Runnable holdHandler)
  • Method Details

    • setEnabled

      public void setEnabled(boolean enabled)
    • setClickHandler

      public void setClickHandler(Runnable runnable)
    • setHoldHandler

      public void setHoldHandler(Runnable runnable)
    • setMuted

      public TableButton setMuted(boolean muted)
    • layout

      public void layout()
      Description copied from class: com.badlogic.gdx.scenes.scene2d.ui.Table
      Positions and sizes children of the table using the cell associated with each child. The values given are the position within the parent and size of the table.
      Specified by:
      layout in interface com.badlogic.gdx.scenes.scene2d.utils.Layout
      Overrides:
      layout in class com.badlogic.gdx.scenes.scene2d.ui.Table
    • setBackgroundDrawable

      public TableButton setBackgroundDrawable(com.badlogic.gdx.scenes.scene2d.utils.Drawable sharedBackground)
      Parameters:
      sharedBackground - may be null to remove background color
    • setBackgroundDrawables

      public TableButton setBackgroundDrawables(com.badlogic.gdx.scenes.scene2d.utils.Drawable normal, com.badlogic.gdx.scenes.scene2d.utils.Drawable active, com.badlogic.gdx.scenes.scene2d.utils.Drawable hover, com.badlogic.gdx.scenes.scene2d.utils.Drawable disabled)
    • setRectBackground

      public TableButton setRectBackground()
    • setContentColors

      public TableButton setContentColors(com.badlogic.gdx.graphics.Color normal, com.badlogic.gdx.graphics.Color hover, com.badlogic.gdx.graphics.Color active, com.badlogic.gdx.graphics.Color disabled)