All Implemented Interfaces:
DynamicPropertyProvider, LocaleListener, MutableDynamicPropertyProvider, StyleProvider, ComponentLifecycle, EnabledEx, QualityMonitor, VisionComponent, ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
AlarmJournalTable, AlarmStatusTable

public abstract class AbstractAlarmTable extends AbstractVisionPanel implements EnabledEx, LocaleListener
Base class for alarm display components in Vision. Provides foundational logic for alarm tables, including row styling based on expressions, flashing support, and a sliding popup mechanism for alarm details and other utilities.
See Also:
  • Field Details

    • log

      protected LoggerEx log
    • table

      protected com.jidesoft.grid.SortableTable table
    • slider

      protected SlideOverPane slider
    • slidingContentHolder

      protected AbstractAlarmTable.PopupHolderPanel slidingContentHolder
    • rowStylesActual

      protected List<AlarmRowStyle> rowStylesActual
      The parsed list of row styles
    • flashInterval

      protected int flashInterval
    • flasher

      protected com.jidesoft.grid.TableFlashable flasher
    • tableBackground

      protected Color tableBackground
    • selectionColor

      protected Color selectionColor
    • selectionThickness

      protected int selectionThickness
    • numberFormat

      protected String numberFormat
    • dateFormat

      protected String dateFormat
    • durationFormat

      protected FormatUtil.DurationFormatStyle durationFormat
    • touchscreenMode

      protected int touchscreenMode
    • STANDARD_STYLE

      public static final com.jidesoft.grid.CellStyle STANDARD_STYLE
      The style that all other styles start from
    • alarmRef

      protected final AlarmRef alarmRef
      A reference to an alarm, used for efficient evaluation of the style expressions so that the expressions can be compiled once and then ran many times for each alarm
    • rowStyles

      protected Dataset rowStyles
    • hidePopupRunner

      protected final Runnable hidePopupRunner
      Runnable that will hide any visible popup
  • Constructor Details

    • AbstractAlarmTable

      protected AbstractAlarmTable()
    • AbstractAlarmTable

      protected AbstractAlarmTable(LayoutManager layout)
  • Method Details

    • isComponentEnabled

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

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

      public int getTouchscreenMode()
    • setTouchscreenMode

      public void setTouchscreenMode(int touchscreenMode)
    • evaluateEnabled

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

      public void initSliderUi(JPanel tableHolder, JPanel footer)
    • print

      public boolean print(org.python.core.PyObject[] pyArgs, String[] keywords)
      Prints the alarm table. This method is accessible from Jython.
      Parameters:
      pyArgs - The python arguments.
      keywords - The keyword arguments. Supported keywords: fitWidth (Boolean), headerFormat (String), footerFormat (String), showDialog (Boolean), landscape (Boolean).
      Returns:
      true if the print job was successfully started, false otherwise.
    • getActualRow

      protected int getActualRow(int viewRow)
    • viewRowToAlarm

      protected AlarmEvent viewRowToAlarm(int row)
    • getSortable

      protected com.jidesoft.grid.SortableTableModel getSortable()
    • getDisplayValue

      protected @Nullable Object getDisplayValue(@NonNull AlarmEvent alarm, @NonNull AlarmProperty<?> column)
      Retrieves the value to be displayed in a specific column for a given alarm. Handles special formatting for durations and other property types.
      Parameters:
      alarm - The alarm event.
      column - The alarm property representing the column.
      Returns:
      The formatted display value.
    • getHeaderDisplayValue

      protected String getHeaderDisplayValue(AlarmProperty<?> column)
    • onStartup

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

      protected void onShutdown()
      Description copied from class: AbstractVisionPanel
      Subclasses should override this to provide shutdown logic.
      Overrides:
      onShutdown in class AbstractVisionPanel
    • showPopup

      protected void showPopup(JComponent popup)
      Shows a component using the sliding popup mechanism.
    • showPopup

      protected void showPopup(JComponent popup, int preferredHeight)
      Shows a component using the sliding popup mechanism with a preferred height.
      Parameters:
      popup - The component to show.
      preferredHeight - The preferred height of the popup.
    • hidePopup

      protected void hidePopup()
      Hides whatever popup is currently expanded.
    • setRowStyles

      public void setRowStyles(Dataset rowStyles)
    • applyRowStyles

      protected void applyRowStyles()
      Parses the expression-based row styles from the rowStyles dataset and prepares them for use by the table model.
    • getRowStylesActual

      public List<AlarmRowStyle> getRowStylesActual()
    • getRowStyles

      public Dataset getRowStyles()
    • getFlashInterval

      public int getFlashInterval()
    • setFlashInterval

      public void setFlashInterval(int flashInterval)
    • getRowHeight

      public int getRowHeight()
    • setRowHeight

      public void setRowHeight(int newHeight)
    • getSelectionColor

      public Color getSelectionColor()
    • setSelectionColor

      public void setSelectionColor(Color selectionColor)
    • getSelectionThickness

      public int getSelectionThickness()
    • setSelectionThickness

      public void setSelectionThickness(int selectionThickness)
    • getNumberFormat

      public String getNumberFormat()
    • setNumberFormat

      public void setNumberFormat(String numberFormat)
    • getDurationFormat

      public int getDurationFormat()
    • setDurationFormat

      public void setDurationFormat(int durationFormat)
    • getDateFormat

      public String getDateFormat()
    • setDateFormat

      public void setDateFormat(String dateFormat)
    • getTableBackground

      public Color getTableBackground()
    • setTableBackground

      public void setTableBackground(Color tableBackground)
    • localeChanged

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

      protected void paintChildren(Graphics g)
      Overrides:
      paintChildren in class AbstractVisionPanel
    • syncTableFont

      protected void syncTableFont()
    • setFont

      public void setFont(Font font)
      Sets the font for this component and passes into the table to set the row font
      Overrides:
      setFont in class JComponent