Class ArrayDisplay

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ClearableDisplay, DisplayTypeSupporter, ErrorHandler, InputConsumer, ComponentSupplier, MenuBarProvider, SendToActionSupporter, Serializable, Comparable

    public class ArrayDisplay
    extends AbstractGraphicalDisplay
    Displays the array elements in a single panel.

    Input/output:
    - accepts:
       java.lang.String[]
       java.io.File[]
       java.awt.image.BufferedImage[]
       adams.data.image.AbstractImageContainer[]
       adams.data.image.BufferedImageSupporter[]


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: ArrayDisplay
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default:
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow execution at this level gets stopped in case this
        actor encounters an error; the error gets propagated; useful for critical
        actors.
        default: false
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console; Note: the enclosing
        actor handler must have this enabled as well.
        default: false
     
    -short-title <boolean> (property: shortTitle)
        If enabled uses just the name for the title instead of the actor's full
        name.
        default: false
     
    -display-type <adams.flow.core.displaytype.AbstractDisplayType> (property: displayType)
        Determines how to show the display, eg as standalone frame (default) or
        in the Flow editor window.
        default: adams.flow.core.displaytype.Default
     
    -width <int> (property: width)
        The width of the dialog.
        default: 800
        minimum: -1
     
    -height <int> (property: height)
        The height of the dialog.
        default: 600
        minimum: -1
     
    -x <int> (property: x)
        The X position of the dialog (>=0: absolute, -1: left, -2: center, -3: right
        ).
        default: -1
        minimum: -3
     
    -y <int> (property: y)
        The Y position of the dialog (>=0: absolute, -1: top, -2: center, -3: bottom
        ).
        default: -1
        minimum: -3
     
    -writer <adams.gui.print.JComponentWriter> (property: writer)
        The writer to use for generating the graphics output.
        default: adams.gui.print.NullWriter
     
    -panel-provider <adams.flow.sink.DisplayPanelProvider> (property: panelProvider)
        The actor for generating the display sub-panels.
        default: adams.flow.sink.ImageViewer -display-type adams.flow.core.displaytype.Default -writer adams.gui.print.NullWriter -selection-processor adams.gui.visualization.image.selection.NullProcessor -left-click-processor adams.gui.visualization.image.leftclick.NullProcessor -selection-shape-painter adams.gui.visualization.image.selectionshape.RectanglePainter -image-overlay adams.gui.visualization.image.NullOverlay
     
    -arrangement <TABBED|HORIZONTAL|VERTICAL|GRID> (property: arrangement)
        How to arrange the elements of the array.
        default: TABBED
     
    -num-cols <int> (property: numCols)
        The number of columns to use in case of arrangement type GRID.
        default: 1
        minimum: 1
     
    -panel-width <int> (property: panelWidth)
        The width of the individual panels.
        default: 400
        minimum: 1
     
    -panel-height <int> (property: panelHeight)
        The height of the individual panels.
        default: 300
        minimum: 1
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_PanelProvider

        protected DisplayPanelProvider m_PanelProvider
        the actor to use for generating panels.
      • m_NumCols

        protected int m_NumCols
        the number of columns to use (in case of GRID).
      • m_PanelWidth

        protected int m_PanelWidth
        the width of the individual panels.
      • m_PanelHeight

        protected int m_PanelHeight
        the height of the individual panels.
      • m_DisplayPanels

        protected List<DisplayPanel> m_DisplayPanels
        the panels to display.
    • Constructor Detail

      • ArrayDisplay

        public ArrayDisplay()
    • Method Detail

      • setPanelProvider

        public void setPanelProvider​(DisplayPanelProvider value)
        Sets the panel provider to use for generating the sub-panels.
        Parameters:
        value - the panel provider to use
      • getPanelProvider

        public DisplayPanelProvider getPanelProvider()
        Returns the panel provider in use for generating the sub-panels.
        Returns:
        the panel provider in use
      • panelProviderTipText

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

        public void setArrangement​(ArrayDisplay.Arrangement value)
        Sets how to arrange the elements of the array.
        Parameters:
        value - the arrangement
      • getArrangement

        public ArrayDisplay.Arrangement getArrangement()
        Returns how to arrange the elements of the array.
        Returns:
        the arrangement
      • arrangementTipText

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

        public void setNumCols​(int value)
        Sets the number of cols to use in case of ArrayDisplay.Arrangement.GRID.
        Parameters:
        value - the number of cols
      • numColsTipText

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

        public void setPanelWidth​(int value)
        Sets the width of the individual panels.
        Parameters:
        value - the width
      • getPanelWidth

        public int getPanelWidth()
        Returns the currently set width of the individual panels.
        Returns:
        the width
      • panelWidthTipText

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

        public void setPanelHeight​(int value)
        Sets the height of the individual panels.
        Parameters:
        value - the height
      • getPanelHeight

        public int getPanelHeight()
        Returns the currently set height of the individual panels.
        Returns:
        the height
      • panelHeightTipText

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

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        the Class of objects that can be processed
      • displayTabbed

        protected void displayTabbed​(Object[] elements)
        Displays the array in tabs.
        Parameters:
        elements - the array to display
      • displayGridded

        protected void displayGridded​(Object[] elements,
                                      int numCols,
                                      int numRows)
        Displays the array in a grid.
        Parameters:
        elements - the array to display
        numCols - the number of columns
        numRows - the number of rows
      • display

        protected void display​(Token token)
        Displays the token (the panel and dialog have already been created at this stage).
        Specified by:
        display in class AbstractDisplay
        Parameters:
        token - the token to display