Class NotificationsInterface

  • All Implemented Interfaces:
    com.badlogic.gdx.scenes.scene2d.utils.Cullable, com.badlogic.gdx.scenes.scene2d.utils.Layout, IObserver, IGuiInterface

    public class NotificationsInterface
    extends TableGuiInterface
    implements IObserver
    Widget that captures and displays messages in a GUI.
    • 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 inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table

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

      Constructors 
      Constructor Description
      NotificationsInterface​(com.badlogic.gdx.scenes.scene2d.ui.Skin skin, java.lang.Object lock, boolean multiple, boolean bg)
      Initializes the notifications interface.
      NotificationsInterface​(com.badlogic.gdx.scenes.scene2d.ui.Skin skin, java.lang.Object lock, boolean multiple, boolean writeDates, boolean consoleLog, boolean bg)
      Initializes the notifications interface.
      NotificationsInterface​(com.badlogic.gdx.scenes.scene2d.ui.Skin skin, java.lang.Object lock, boolean multiple, boolean writeDates, boolean consoleLog, boolean historicalLog, boolean bg)
      Initializes the notifications interface.
      NotificationsInterface​(java.util.List<MessageBean> logs, long msTimeout, com.badlogic.gdx.scenes.scene2d.ui.Skin skin, boolean multiple, boolean bg)
      Initializes the notifications interface.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()  
      static java.util.List<MessageBean> getHistorical()  
      float getMessage1Width()  
      float getMessage2Width()  
      float getMessagesWidth()  
      static int getNumberMessages()  
      void notify​(Events event, java.lang.Object... data)  
      void unsubscribe()  
      void update()  
      • Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table

        add, add, add, add, add, add, add, align, background, background, bottom, center, clearChildren, columnDefaults, debug, debug, debugActor, debugAll, debugCell, debugTable, defaults, draw, drawBackground, drawDebug, drawDebugBounds, 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, layout, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, removeActor, reset, right, row, setBackground, setBackground, setClip, setDebug, setRound, setSkin, stack, top
      • Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup

        childrenChanged, getMaxHeight, getMaxWidth, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validate
      • Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group

        act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, clear, computeTransform, drawChildren, drawDebugChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, resetTransform, resetTransform, setCullingArea, setDebug, setStage, setTransform, swapActor, swapActor, toString
      • Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor

        addAction, addCaptureListener, addListener, ancestorsVisible, 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, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, 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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NotificationsInterface

        public NotificationsInterface​(com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
                                      java.lang.Object lock,
                                      boolean multiple,
                                      boolean writeDates,
                                      boolean consoleLog,
                                      boolean bg)
        Initializes the notifications interface.
        Parameters:
        skin - The skin.
        lock - The lock object.
        multiple - Allow multiple messages?
        writeDates - Write dates with messages?
        consoleLog - Log to console
        bg - Apply background
      • NotificationsInterface

        public NotificationsInterface​(com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
                                      java.lang.Object lock,
                                      boolean multiple,
                                      boolean writeDates,
                                      boolean consoleLog,
                                      boolean historicalLog,
                                      boolean bg)
        Initializes the notifications interface.
        Parameters:
        skin - The skin.
        lock - The lock object.
        multiple - Allow multiple messages?
        writeDates - Write dates with messages?
        consoleLog - Log to console
        historicalLog - Save logs to historical list
        bg - Apply background
      • NotificationsInterface

        public NotificationsInterface​(com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
                                      java.lang.Object lock,
                                      boolean multiple,
                                      boolean bg)
        Initializes the notifications interface.
        Parameters:
        skin - The skin.
        lock - The lock object.
        multiple - Allow multiple messages?
        bg - Apply background
      • NotificationsInterface

        public NotificationsInterface​(java.util.List<MessageBean> logs,
                                      long msTimeout,
                                      com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
                                      boolean multiple,
                                      boolean bg)
        Initializes the notifications interface.
        Parameters:
        logs - Current logs
        msTimeout - The timeout in ms
        skin - The skin
        multiple - Multiple messages enabled
        bg - Apply background
    • Method Detail

      • unsubscribe

        public void unsubscribe()
      • notify

        public void notify​(Events event,
                           java.lang.Object... data)
        Specified by:
        notify in interface IObserver
      • getNumberMessages

        public static int getNumberMessages()
      • getHistorical

        public static java.util.List<MessageBean> getHistorical()
      • getMessage1Width

        public float getMessage1Width()
      • getMessage2Width

        public float getMessage2Width()
      • getMessagesWidth

        public float getMessagesWidth()