Class AbstractDisplay

    • Field Detail

      • BACKUP_INPUT

        public static final String BACKUP_INPUT
        the key for storing the input token in the backup.
        See Also:
        Constant Field Values
      • m_InputToken

        protected transient Token m_InputToken
        the current token.
      • m_ShortTitle

        protected boolean m_ShortTitle
        whether to use just the actor name or the full name as title.
      • m_Width

        protected int m_Width
        the width of the dialog.
      • m_Height

        protected int m_Height
        the height of the dialog.
      • m_X

        protected int m_X
        the X position of the dialog.
      • m_Y

        protected int m_Y
        the Y position of the dialog.
      • m_Panel

        protected BasePanel m_Panel
        the panel to display.
      • m_Frame

        protected BaseFrame m_Frame
        the dialog that's being displayed.
      • m_CreateFrame

        protected boolean m_CreateFrame
        whether to create the frame or just the panel.
      • m_Updating

        protected Boolean m_Updating
        whether the GUI is currently being updated.
      • m_KeepOpen

        protected boolean m_KeepOpen
        whether to keep the GUI even beyond cleanup.
    • Constructor Detail

      • AbstractDisplay

        public AbstractDisplay()
    • Method Detail

      • input

        public void input​(Token token)
        The method that accepts the input token and then processes it.
        Parameters:
        token - the token to accept and process
        See Also:
        m_InputToken
      • hasInput

        public boolean hasInput()
        Returns whether an input token is currently present.
        Returns:
        true if input token present
      • currentInput

        public Token currentInput()
        Returns the current input token, if any.
        Returns:
        the input token, null if none present
      • wrapUp

        public void wrapUp()
        Cleans up after the execution has finished.
        Specified by:
        wrapUp in interface Actor
        Overrides:
        wrapUp in class AbstractActor
      • getDefaultShortTitle

        protected boolean getDefaultShortTitle()
        Returns the default value for short title.
        Returns:
        the default
      • getDefaultDisplayType

        protected AbstractDisplayType getDefaultDisplayType()
        Returns the default value for showing the display.
        Returns:
        the default
      • getDefaultX

        protected int getDefaultX()
        Returns the default X position for the dialog.
        Returns:
        the default X position
      • getDefaultY

        protected int getDefaultY()
        Returns the default Y position for the dialog.
        Returns:
        the default Y position
      • getDefaultWidth

        protected int getDefaultWidth()
        Returns the default width for the dialog.
        Returns:
        the default width
      • getDefaultHeight

        protected int getDefaultHeight()
        Returns the default height for the dialog.
        Returns:
        the default height
      • setShortTitle

        public void setShortTitle​(boolean value)
        Sets whether to use just the name of the actor or the full name.
        Parameters:
        value - if true just the name will get used, otherwise the full name
      • getShortTitle

        public boolean getShortTitle()
        Returns whether to use just the name of the actor or the full name.
        Returns:
        true if just the name used, otherwise full name
      • shortTitleTipText

        public String shortTitleTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setWidth

        public void setWidth​(int value)
        Sets the width of the dialog.
        Parameters:
        value - the width
      • getWidth

        public int getWidth()
        Returns the currently set width of the dialog.
        Returns:
        the width
      • widthTipText

        public String widthTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setHeight

        public void setHeight​(int value)
        Sets the height of the dialog.
        Parameters:
        value - the height
      • getHeight

        public int getHeight()
        Returns the currently set height of the dialog.
        Returns:
        the height
      • heightTipText

        public String heightTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setX

        public void setX​(int value)
        Sets the X position of the dialog.
        Parameters:
        value - the X position
      • getX

        public int getX()
        Returns the currently set X position of the dialog.
        Returns:
        the X position
      • xTipText

        public String xTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setY

        public void setY​(int value)
        Sets the Y position of the dialog.
        Parameters:
        value - the Y position
      • getY

        public int getY()
        Returns the currently set Y position of the dialog.
        Returns:
        the Y position
      • yTipText

        public String yTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • displayTypeTipText

        public String displayTypeTipText()
        Returns the tip text for this property.
        Specified by:
        displayTypeTipText in interface DisplayTypeSupporter
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setKeepOpen

        public void setKeepOpen​(boolean value)
        Sets whether to keep the GUI open beyond cleanup.
        Parameters:
        value - true if to keep open
      • getKeepOpen

        public boolean getKeepOpen()
        Returns whether to keep the GUI open beyond cleanup.
        Returns:
        true if to keep open
      • reset

        protected void reset()
        Resets the object. Removes graphical components as well.
        Overrides:
        reset in class AbstractActor
      • closeFrame

        public void closeFrame()
        Closes the frame.
      • clearPanel

        public abstract void clearPanel()
        Clears the content of the panel.
      • newPanel

        protected abstract BasePanel newPanel()
        Creates the panel to display in the dialog.
        Returns:
        the panel
      • getPanel

        public BasePanel getPanel()
        Returns the panel.
        Returns:
        the panel, null if not available
      • createTitle

        protected String createTitle()
        Creates a title for the dialog. Default implementation only returns the full name of the actor.
        Returns:
        the title of the dialog
      • setCreateFrame

        public void setCreateFrame​(boolean value)
        Sets whether to create the frame or just the panel.
        Parameters:
        value - if false, only the panel is created
      • getCreateFrame

        public boolean getCreateFrame()
        Returns whether the frame is created as well as the panel.
        Returns:
        true if the panel is created as well
      • preCreateFrame

        protected void preCreateFrame​(BasePanel panel)
        Hook method before the frame gets created.

        Default implementation does nothing.
        Parameters:
        panel - the panel to display in the frame
      • getFrameDefaultCloseOperation

        protected int getFrameDefaultCloseOperation()
        Returns the default operation when closing the frame.
        Returns:
        the operation
      • doCreateFrame

        protected BaseFrame doCreateFrame​(BasePanel panel)
        Creates the actual frame.
        Parameters:
        panel - the panel to display in the frame
        Returns:
        the created frame
      • postCreateFrame

        protected void postCreateFrame​(BaseFrame frame,
                                       BasePanel panel)
        Hook method after the frame got created.

        Default implementation does nothing.
        Parameters:
        frame - the frame that got just created
        panel - the panel displayed in the frame
      • createFrame

        protected BaseFrame createFrame​(BasePanel panel)
        Creates and initializes a frame with the just created panel.
        Parameters:
        panel - the panel to use in the frame
        Returns:
        the created frame
      • getFrame

        public BaseFrame getFrame()
        Returns the frame.
        Returns:
        the frame, null if not available
      • registerWithEditor

        public void registerWithEditor()
        Registers the actor with the flow editor, if possible.
      • deregisterWithEditor

        public void deregisterWithEditor()
        Deregisters the actor from the flow editor, if possible.
      • deregisterInWrapUp

        public boolean deregisterInWrapUp()
        Returns whether to de-register in wrapUp() or wait till cleanUpGUI().

        Default returns false.
        Returns:
        true if to deregister already in wrapUp()
      • newDisplayRunnable

        protected abstract Runnable newDisplayRunnable()
        Returns a runnable that displays frame, etc. Must call notifyAll() on the m_Self object and set m_Updating to false.
        Returns:
        the runnable
        See Also:
        m_Updating
      • registerWindow

        protected void registerWindow()
        Registers the window with the flow root actor.
      • deregisterWindow

        protected void deregisterWindow()
        Deregisters the window with the flow root actor.
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message
      • cleanUpGUIKeepOpen

        protected void cleanUpGUIKeepOpen()
        Performs only minimal clean up as GUI elements were requested to stay available.
        See Also:
        getKeepOpen()
      • cleanUpGUI

        protected void cleanUpGUI()
        Removes all graphical components.