All Implemented Interfaces:
DynamicPropertyProvider, LoadingMonitor, CustomizableTable<ColumnAttributes>, LocaleListener, TouchscreenEnabledTable, MutableDynamicPropertyProvider, StyleProvider, ComponentLifecycle, EnabledEx, ExtensibleComponent, QualityMonitor, VisionComponent, ImageObserver, MenuContainer, Serializable, Accessible, ScrollPaneConstants

See Also:
  • Field Details

    • BG_CONSTANT

      public static final int BG_CONSTANT
      See Also:
    • BG_ALTERNATING

      public static final int BG_ALTERNATING
      See Also:
    • BG_MAPPED

      public static final int BG_MAPPED
      See Also:
    • table

      protected JTable table
    • data

      protected Dataset data
      This is the actual data that the table displays
    • sortModel

      protected SortTableModel sortModel
      This TableModel looks at the rootModel, providing sorting on top of it
    • rootModel

      protected com.inductiveautomation.factorypmi.application.components.PMITable.DataSetTableModel rootModel
      This is the root TableModel for the table, which looks at the data variable.
    • renderer

      protected com.inductiveautomation.factorypmi.application.components.PMITable.HMITableCellRenderer renderer
    • oddBackground

      protected Color oddBackground
    • backgroundColorMode

      protected int backgroundColorMode
    • mappingTable

      protected ColorStateTable mappingTable
    • mappingColumn

      @Deprecated protected int mappingColumn
      Deprecated.
      The mapping column number is now deprecated in favor of the mapping column ID
    • mappingColumnId

      protected String mappingColumnId
    • headerVisible

      protected boolean headerVisible
      Controls the visibility of the table's JTableHeader
    • resizingAllowed

      protected boolean resizingAllowed
    • overlaysEnabled

      protected boolean overlaysEnabled
    • columnConfiguration

      @Deprecated protected PMITable.ColumnConfig columnConfiguration
      Deprecated.
      This is used ONLY for backwards compatibility. see setHideFirstColumn and setColumnConfiguration
    • columnAttributes

      protected Map<String,ColumnAttributes> columnAttributes
    • columnAttributesData

      protected Dataset columnAttributesData
    • initialRowSelection

      protected int initialRowSelection
      This is used to have the table automatically select a row upon 'first data', that is, whenever the data is set to a positive number of rows when it was previously zero
    • selectionMode

      protected int selectionMode
    • listenerList

      protected EventListenerList listenerList
    • headerFont

      protected Font headerFont
    • headerForeground

      protected Color headerForeground
    • TOUCH_SCREEN_MODE_AUTO

      public static final int TOUCH_SCREEN_MODE_AUTO
      See Also:
    • TOUCH_SCREEN_MODE_NONE

      public static final int TOUCH_SCREEN_MODE_NONE
      See Also:
    • touchscreenMode

      protected int touchscreenMode
    • clickCountToStart

      protected int clickCountToStart
    • relayListener

      protected com.inductiveautomation.factorypmi.application.components.PMITable.SelectionRelayListener relayListener
  • Constructor Details

    • PMITable

      public PMITable()
  • Method Details

    • localeChanged

      public void localeChanged(Locale newLocale)
      Specified by:
      localeChanged in interface LocaleListener
      Overrides:
      localeChanged in class AbstractVisionScrollPane
    • onStartup

      protected void onStartup()
      Description copied from class: AbstractVisionScrollPane
      Subclasses should override this to provide startup logic.
      Overrides:
      onStartup in class AbstractVisionScrollPane
    • initRenderers

      protected void initRenderers()
    • toString

      public String toString()
      Overrides:
      toString in class Component
    • getModel

      public TableModel getModel()
    • setName

      public void setName(String newName)
      Overrides:
      setName in class AbstractVisionScrollPane
    • getColumnAttributes

      public ColumnAttributes getColumnAttributes(Object id)
      Returns the ColumnAttributes object associated with the given ID. If no attributes are associated with that id, the default attributes are returned.
    • getColumnAttributesData

      public Dataset getColumnAttributesData()
    • setColumnWidth

      public void setColumnWidth(int idx, int width)
    • setColumnLabel

      public void setColumnLabel(int idx, String label)
    • getColumnId

      public String getColumnId(int idx)
    • getSelectedRow

      public int getSelectedRow()
    • setSelectedRow

      public void setSelectedRow(int row)
    • getData

      public Dataset getData()
      Specified by:
      getData in interface CustomizableTable<ColumnAttributes>
    • setData

      public void setData(Dataset newDataset)
    • print

      public boolean print(org.python.core.PyObject[] pyArgs, String[] keywords)
    • sortByColumn

      public void sortByColumn(String columnName)
    • sortByColumn

      public void sortByColumn(String columnName, boolean ascending)
    • sortOriginal

      public void sortOriginal()
    • getDataAsHTML

      public String getDataAsHTML(String title, int width)
    • exportHTML

      public String exportHTML(String filename, String title, int width)
    • getBackground

      public Color getBackground()
      Table will be null on JScrollPane's constructor
      Overrides:
      getBackground in class Component
    • getForeground

      public Color getForeground()
      Table will be null on JScrollPane's constructor
      Overrides:
      getForeground in class Component
    • getFont

      public Font getFont()
      Table will be null on JScrollPane's constructor
      Specified by:
      getFont in interface MenuContainer
      Overrides:
      getFont in class Component
    • setBackground

      public void setBackground(Color color)
      Overrides:
      setBackground in class JComponent
    • setForeground

      public void setForeground(Color color)
      Table will be null on JScrollPane's constructor
      Overrides:
      setForeground in class JComponent
    • isComponentEnabled

      public boolean isComponentEnabled()
      Specified by:
      isComponentEnabled in interface EnabledEx
    • setComponentEnabled

      public void setComponentEnabled(boolean componentEnabled)
      Specified by:
      setComponentEnabled in interface EnabledEx
    • evaluateEnabled

      public void evaluateEnabled()
      Specified by:
      evaluateEnabled in interface EnabledEx
    • getExtensionFunctions

      public Map<String,ExtensionFunction> getExtensionFunctions()
      Specified by:
      getExtensionFunctions in interface ExtensibleComponent
    • setExtensionFunctions

      public void setExtensionFunctions(Map<String,ExtensionFunction> map)
      Specified by:
      setExtensionFunctions in interface ExtensibleComponent
    • getSelectionBackground

      public Color getSelectionBackground()
    • getSelectionForeground

      public Color getSelectionForeground()
    • setSelectionBackground

      public void setSelectionBackground(Color selectionBackground)
    • setSelectionForeground

      public void setSelectionForeground(Color selectionForeground)
    • setFont

      public void setFont(Font f)
      Table will be null on JScrollPane's constructor
      Overrides:
      setFont in class JComponent
    • getHeaderFont

      public Font getHeaderFont()
    • setHeaderFont

      public void setHeaderFont(Font headerFont)
    • getHeaderForeground

      public Color getHeaderForeground()
    • setHeaderForeground

      public void setHeaderForeground(Color headerForeground)
    • isTest

      public boolean isTest()
    • setTest

      public void setTest(boolean test)
    • setHideFirstColumn

      @Deprecated public void setHideFirstColumn(boolean b)
      Deprecated.
      This is included for backwards compatability. This will just set the 'hidden' property of the first column to true
    • fireColumnAttributesUpdated

      protected void fireColumnAttributesUpdated()
    • getBackgroundColorMode

      public int getBackgroundColorMode()
    • getOddBackground

      public Color getOddBackground()
    • setBackgroundColorMode

      public void setBackgroundColorMode(int i)
    • setOddBackground

      public void setOddBackground(Color color)
    • getMappingTable

      public ColorStateTable getMappingTable()
    • setMappingTable

      public void setMappingTable(ColorStateTable table)
    • setMappingColumn

      @Deprecated public void setMappingColumn(int i)
      Deprecated.
      Included for backwards compatability
    • getMappingColumnId

      public String getMappingColumnId()
    • setMappingColumnId

      public void setMappingColumnId(String mappingColumnId)
    • getAutoResizeMode

      public int getAutoResizeMode()
    • setAutoResizeMode

      public void setAutoResizeMode(int i)
    • getColumnAttributes

      public Map<String,ColumnAttributes> getColumnAttributes()
      Specified by:
      getColumnAttributes in interface CustomizableTable<ColumnAttributes>
    • updateWidths

      public boolean updateWidths()
      Description copied from interface: CustomizableTable
      make sure that the widths on the ColumnAttributes represent the currently configured widths of the actual columns
      Specified by:
      updateWidths in interface CustomizableTable<ColumnAttributes>
    • setColumnAttributes

      public void setColumnAttributes(Map<String,ColumnAttributes> columnAttributes)
      Specified by:
      setColumnAttributes in interface CustomizableTable<ColumnAttributes>
      Parameters:
      columnAttributes - the columnAttributes to set
    • setColumnAttributesData

      public void setColumnAttributesData(Dataset columnAttributesData)
      Parameters:
      columnAttributesData - the columnAttributesData to set
    • getRenderer

      public TableCellRenderer getRenderer()
    • setColumnConfiguration

      @Deprecated public void setColumnConfiguration(PMITable.ColumnConfig config)
      Deprecated.
      This sets the field so that
    • getSelectionMode

      public int getSelectionMode()
    • setSelectionMode

      public void setSelectionMode(int i)
    • getColumnSelectionAllowed

      public boolean getColumnSelectionAllowed()
    • getRowSelectionAllowed

      public boolean getRowSelectionAllowed()
    • setColumnSelectionAllowed

      public void setColumnSelectionAllowed(boolean columnSelectionAllowed)
    • setRowSelectionAllowed

      public void setRowSelectionAllowed(boolean rowSelectionAllowed)
    • getShowHorizontalLines

      public boolean getShowHorizontalLines()
    • getShowVerticalLines

      public boolean getShowVerticalLines()
    • getGridColor

      public Color getGridColor()
    • setShowHorizontalLines

      public void setShowHorizontalLines(boolean showHorizontalLines)
    • setShowVerticalLines

      public void setShowVerticalLines(boolean showVerticalLines)
    • setGridColor

      public void setGridColor(Color gridColor)
    • getClickCountToStart

      public int getClickCountToStart()
      Specified by:
      getClickCountToStart in interface TouchscreenEnabledTable
    • setClickCountToStart

      public void setClickCountToStart(int clickCountToStart)
    • getSelectedColumn

      public int getSelectedColumn()
    • columnIndexToModelIndex

      public int columnIndexToModelIndex(int columnIndex)
      Converts between a TableColumnModel index to the underlying dataset's column index
    • modelIndexToColumnIndex

      public int modelIndexToColumnIndex(int modelIndex)
      Converts between a column's model index to the TableColumnModel's index
    • setSelectedColumn

      public void setSelectedColumn(int col)
    • getSelectedColumnCount

      public int getSelectedColumnCount()
    • getSelectedColumns

      public int[] getSelectedColumns()
    • getSelectedRowCount

      public int getSelectedRowCount()
    • getRowsInViewOrder

      public int[] getRowsInViewOrder()
    • getInitialRowSelection

      public int getInitialRowSelection()
    • setInitialRowSelection

      public void setInitialRowSelection(int initialRowSelection)
    • getSelectedRows

      public int[] getSelectedRows()
    • isCellSelected

      public boolean isCellSelected(int row, int column)
    • isColumnSelected

      public boolean isColumnSelected(int column)
    • isRowSelected

      public boolean isRowSelected(int row)
    • setColumnSelectionInterval

      public boolean setColumnSelectionInterval(int index0, int index1)
    • setRowSelectionInterval

      public boolean setRowSelectionInterval(int index0, int index1)
    • getPropertiesLoading

      public int getPropertiesLoading()
      Specified by:
      getPropertiesLoading in interface LoadingMonitor
    • setPropertiesLoading

      public void setPropertiesLoading(int i)
      Specified by:
      setPropertiesLoading in interface LoadingMonitor
    • getRowHeight

      public int getRowHeight()
    • setRowHeight

      public void setRowHeight(int rowHeight)
    • isHeaderVisible

      public boolean isHeaderVisible()
    • setHeaderVisible

      public void setHeaderVisible(boolean headerVisible)
    • isResizingAllowed

      public boolean isResizingAllowed()
    • setResizingAllowed

      public void setResizingAllowed(boolean resizingAllowed)
    • addTableSelectionListener

      @Deprecated public void addTableSelectionListener(TableSelectionListener l)
      Deprecated.
      The table selection listener stuff isn't used since custom listeners don't seems to serialize correctly b/c of classloader issue
    • removeTableSelectionListener

      @Deprecated public void removeTableSelectionListener(TableSelectionListener l)
      Deprecated.
      The table selection listener stuff isn't used since custom listeners don't seems to serialize correctly b/c of classloader issue
    • getTableSelectionListeners

      @Deprecated public TableSelectionListener[] getTableSelectionListeners()
      Deprecated.
      The table selection listener stuff isn't used since custom listeners don't seems to serialize correctly b/c of classloader issue
    • addCellListener

      public void addCellListener(CellListener listener)
    • removeCellListener

      public void removeCellListener(CellListener listener)
    • getCellListeners

      public CellListener[] getCellListeners()
    • fireCellEditedEvent

      public void fireCellEditedEvent(Object oldValue, Object newValue, int row, int column)
    • addRow

      public void addRow(org.python.core.PySequence row)
    • insertRow

      public void insertRow(org.python.core.PySequence row)
    • deleteRow

      public void deleteRow(int row)
    • removeRow

      public void removeRow(int row)
    • updateRow

      public void updateRow(int row, org.python.core.PyDictionary changes)
    • setValue

      public void setValue(int row, int col, org.python.core.PyObject value)
    • setValue

      public void setValue(int row, String col, org.python.core.PyObject value)
    • isOverlaysEnabled

      public boolean isOverlaysEnabled()
    • setOverlaysEnabled

      public void setOverlaysEnabled(boolean overlaysEnabled)
    • exportCSV

      public String exportCSV(String filename, boolean showHeaders)
    • getTable

      public JTable getTable()
    • getTableHeader

      public JTableHeader getTableHeader()
    • getTouchscreenMode

      public int getTouchscreenMode()
      Specified by:
      getTouchscreenMode in interface TouchscreenEnabledTable
    • setTouchscreenMode

      public void setTouchscreenMode(int touchscreenMode)