java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JComboBox
com.inductiveautomation.factorypmi.application.components.PMIComboBox
All Implemented Interfaces:
DynamicPropertyProvider, LocaleListener, MutableDynamicPropertyProvider, StyleProvider, ComponentLifecycle, EnabledEx, QualityMonitor, VisionComponent, ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, ListDataListener

See Also:
  • Field Details

  • Constructor Details

    • PMIComboBox

      public PMIComboBox()
  • Method Details

    • translateTerm

      protected String translateTerm(String term)
    • getCursorCode

      public int getCursorCode()
    • setCursorCode

      public void setCursorCode(int cursorCode)
    • 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
    • setVisible

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class JComponent
    • setSelectedItem

      public void setSelectedItem(Object anObject)
      Overrides:
      setSelectedItem in class JComboBox
    • setToolTipText

      public void setToolTipText(String text)
      Overrides:
      setToolTipText in class JComponent
    • getToolTipText

      public String getToolTipText()
      Overrides:
      getToolTipText in class JComponent
    • isAntialias

      public boolean isAntialias()
    • setAntialias

      public void setAntialias(boolean ignored)
    • getMode

      public int getMode()
    • setMode

      public void setMode(int mode)
    • setName

      public void setName(String newName)
      Overrides:
      setName in class Component
    • getData

      public Dataset getData()
    • getTranslatedData

      public Dataset getTranslatedData()
    • setData

      public void setData(Dataset set)
    • getSelectedValue

      public Integer getSelectedValue()
    • getSelectedStringValue

      public String getSelectedStringValue()
    • getSelectedLabel

      public String getSelectedLabel()
    • getSelectedItem

      public com.inductiveautomation.factorypmi.application.components.PMIComboBox.DataSetComboBoxModel.CBSelection getSelectedItem()
      Overrides:
      getSelectedItem in class JComboBox
    • setSelectedValue

      public void setSelectedValue(Integer value)
    • setSelectedStringValue

      public void setSelectedStringValue(String value)
    • setSelectedValue

      public void setSelectedValue(Number n) throws org.python.core.PyIgnoreMethodTag
      Throws:
      org.python.core.PyIgnoreMethodTag
    • setSelectedLabel

      public void setSelectedLabel(String value)
    • localeChanged

      public void localeChanged(Locale newLocale)
      Specified by:
      localeChanged in interface LocaleListener
    • isOpaque

      public boolean isOpaque()
      Overrides:
      isOpaque in class JComponent
    • getHorizontalAlignment

      public int getHorizontalAlignment()
    • setHorizontalAlignment

      public void setHorizontalAlignment(int horizontalAlignment)
    • getVerticalAlignment

      public int getVerticalAlignment()
    • setVerticalAlignment

      public void setVerticalAlignment(int verticalAlignment)
    • getSelectionBackground

      public Color getSelectionBackground()
    • setSelectionBackground

      public void setSelectionBackground(Color selectionColor)
    • setNoSelection

      protected void setNoSelection(com.inductiveautomation.factorypmi.application.components.PMIComboBox.DataSetComboBoxModel.CBSelection sel)
    • getNoSelectionValue

      public int getNoSelectionValue()
    • setNoSelectionValue

      public void setNoSelectionValue(int noSelectionValue)
    • getNoSelectionString

      public String getNoSelectionString()
    • setNoSelectionString

      public void setNoSelectionString(String noSelectionString)
    • getNoSelectionLabel

      public String getNoSelectionLabel()
    • setNoSelectionLabel

      public void setNoSelectionLabel(String noSelectionLabel)
    • isShowTableHeader

      public boolean isShowTableHeader()
    • setShowTableHeader

      public void setShowTableHeader(boolean showTableHeader)
    • getHideTableColumns

      public String getHideTableColumns()
    • setHideTableColumns

      public void setHideTableColumns(String hideTableColumns)
    • getMaxTableWidth

      public int getMaxTableWidth()
    • setMaxTableWidth

      public void setMaxTableWidth(int maxTableWidth)
    • getMaxTableHeight

      public int getMaxTableHeight()
    • setMaxTableHeight

      public void setMaxTableHeight(int maxTableHeight)
    • getRowHeight

      public int getRowHeight()
    • getEffectiveRowHeight

      public int getEffectiveRowHeight()
      When the actual row height is -1, an automatic height is chosen from the current font metrics in order to fit the dropdown options. Call this to retrieve the current non-negative row height
      Returns:
      the current row height if >= 0, otherwise the height of the current font metrics
    • setRowHeight

      public void setRowHeight(int rowHeight)
    • getSelectionMode

      public int getSelectionMode()
    • setSelectionMode

      public void setSelectionMode(int selectionMode)
    • selectWithKeyChar

      public boolean selectWithKeyChar(char keyChar)
      Overrides:
      selectWithKeyChar in class JComboBox
    • getDynamicProps

      public TreeMap<String,DynamicPropertyDescriptor> getDynamicProps()
      Specified by:
      getDynamicProps in interface MutableDynamicPropertyProvider
    • setDynamicProps

      public void setDynamicProps(TreeMap<String,DynamicPropertyDescriptor> map)
      Specified by:
      setDynamicProps in interface MutableDynamicPropertyProvider
    • setPropertyValue

      public void setPropertyValue(String name, Object value) throws ClassCastException
      Specified by:
      setPropertyValue in interface DynamicPropertyProvider
      Throws:
      ClassCastException
    • getPropertyValue

      public Object getPropertyValue(String name)
      Specified by:
      getPropertyValue in interface DynamicPropertyProvider
    • getProperties

      public DynamicPropertyDescriptor[] getProperties()
      Specified by:
      getProperties in interface DynamicPropertyProvider
    • isPropertyDefined

      public boolean isPropertyDefined(String name)
      Specified by:
      isPropertyDefined in interface DynamicPropertyProvider
    • getQuality

      public QualityCode getQuality()
      Description copied from interface: QualityMonitor
      Retrieves the data quality code.
      Specified by:
      getQuality in interface QualityMonitor
    • getDataQuality

      public int getDataQuality()
      Description copied from interface: QualityMonitor
      For backwards compatibility with scripts. Would be awesome if this could just be a default method, but there's a bug (JDK-8071693) that makes that not work with property introspection.
      Specified by:
      getDataQuality in interface QualityMonitor
    • setDataQuality

      public void setDataQuality(int value)
      Specified by:
      setDataQuality in interface QualityMonitor
    • setQuality

      public void setQuality(QualityCode value)
      Description copied from interface: QualityMonitor
      Sets the current data quality to the given value
      Specified by:
      setQuality in interface QualityMonitor
    • updateQuality

      public void updateQuality(String propName, QualityCode quality)
      Description copied from interface: QualityMonitor
      Updates the quality for the given property name. The monitor will then evaluate a new quality based on the quality of its other properties. Overall, the worst quality is chosen.
      Specified by:
      updateQuality in interface QualityMonitor
    • paintChildren

      protected void paintChildren(Graphics g)
      Overrides:
      paintChildren in class JComponent
    • paintComponent

      protected void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • getStyles

      public Dataset getStyles()
      Specified by:
      getStyles in interface StyleProvider
    • setStyles

      public void setStyles(Dataset styleDS)
      Specified by:
      setStyles in interface StyleProvider
    • startupComponent

      public final void startupComponent(VisionClientContext context)
      Description copied from interface: ComponentLifecycle
      Called when the component is first shown.
      Specified by:
      startupComponent in interface ComponentLifecycle
    • shutdownComponent

      public final void shutdownComponent()
      Description copied from interface: ComponentLifecycle
      Called when the component is now shown anymore. Any long-running processes should be stopped. All bindings will have also been shutdown.
      Specified by:
      shutdownComponent in interface ComponentLifecycle
    • getAppContext

      public VisionClientContext getAppContext()
      Specified by:
      getAppContext in interface ComponentLifecycle