Interface ComponentLifecycle

All Known Subinterfaces:
ExtensibleComponent, StyleProvider, VisionComponent, VisionContainer
All Known Implementing Classes:
AbstractAlarmTable, AbstractManagerPanel, AbstractRangedComponent, AbstractVisionBufferedComponent, AbstractVisionButton, AbstractVisionChartComponent, AbstractVisionComponent, AbstractVisionPanel, AbstractVisionScrollPane, AbstractVisionShape, AlarmJournalTable, AlarmStatusTable, AlertSummaryTable, BaseFormattedTextField, BasicContainer, BoxEvent, ColumnSelectorPanel, EquipmentScheduleView, FileExplorer, ICEPDFViewer, LanguageSelector, LinearScale, MovingAnalogIndicator, PathBasedVisionShape, PDFViewer, PMI2StateButton, PMIBarChart, PMIBarcode, PMIBoxWhiskerChart, PMIButton, PMIChart, PMIChartPanel, PMICheckBox, PMICircle, PMIComboBox, PMICommentsPanel, PMICommentsPanel2, PMICompass, PMIControlButton, PMICylindricalTank, PMIDateRange, PMIDateTimePopupSelector, PMIDateTimeSelector, PMIDayView, PMIDigitalDisplay, PMIEasyChart, PMIEasyChart.EasyChart, PMIEditorPane, PMIFillLevelIndicator, PMIFormattedTextField, PMIGanttChart, PMIImage, PMIIPCamViewer, PMILabel, PMILightrailSignal, PMILine, PMILineChartPanel, PMIList, PMIMeter, PMIMomentaryButton, PMIMomentaryButton2, PMIMonthView, PMIMultiStateIndicator, PMINStateButton, PMINumericLabel, PMINumericTextField, PMIPaintableCanvas, PMIPasswordField, PMIPieChart, PMIPipe, PMIPipeJoint, PMIPolygon, PMIProgressBar, PMIRadioButton, PMIRectangle, PMIShape, PMISignalGenerator, PMISlider, PMISoundComponent, PMISpinner, PMIStatusChart, PMITable, PMITabStrip, PMITextArea, PMITextField, PMIThermometer, PMITimer, PMIToggleButton, PMITrackSegment, PMITreeView, PMIWeekView, RadarChart, RadarChart2, ReportBase, ReportPanel, ReportViewer, RosterManagementPanel, RosterPane, RowSelectorTree, ScheduleManagementPanel, ScheduleView, SFCMonitoringPanel, ShapeGroup, SparklineChart, TagBrowseTree, TemplateCanvas, TemplateHolder, TemplateRepeater, UserManagementPanel, VisionAdvancedTable, VisionTemplate

public interface ComponentLifecycle

Components that implement this interface will get started up and shut down when their containing window is first displayed and closed, respectively. Typically components will implement VisionComponent (which extends ComponentLifecycle) instead of this interface directly.

It is expected that components will fire a PropertyChangeEvent upon the execution of both startupComponent and shutdownComponent, emulating a (potentially) virtual boolean property named "componentRunning". For example,

 public void startupComponent(ClientContext context) {
  // do startup logic
  firePropertyChange(COMPONENT_RUNNING, false, true);
 }

 public void shutdownComponent() {
  // do shutdown logic
  firePropertyChange(COMPONENT_RUNNING, true, false);
 }
 

  • Field Details

  • Method Details

    • startupComponent

      void startupComponent(VisionClientContext context)
      Called when the component is first shown.
    • shutdownComponent

      void shutdownComponent()
      Called when the component is now shown anymore. Any long-running processes should be stopped. All bindings will have also been shutdown.
    • getAppContext

      VisionClientContext getAppContext()