java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JComboBox<String>
com.inductiveautomation.factorypmi.application.components.LanguageSelector
All Implemented Interfaces:
LocaleListener, ComponentLifecycle, QualityMonitor, VisionComponent, ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, ListDataListener

public class LanguageSelector extends JComboBox<String> implements LocaleListener, VisionComponent
Filename: LanguageSelector.java Created on Apr 24, 2014 Author: Kathy Applebaum Copyright Inductive Automation 2014 Project: Vision
See Also:
  • Field Details

    • selectionBackground

      protected Color selectionBackground
    • selectedLocaleName

      protected String selectedLocaleName
    • antialias

      protected boolean antialias
    • context

      protected VisionClientContext context
      The current ClientContext that is set on startupComponent() Lifecycle and quality info needed for custom methods
  • Constructor Details

    • LanguageSelector

      public LanguageSelector()
  • Method Details

    • isAntialias

      public boolean isAntialias()
    • setAntialias

      public void setAntialias(boolean ignored)
    • refresh

      protected void refresh()
    • paintComponent

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

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

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

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

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

      public Color getSelectionBackground()
    • setSelectionBackground

      public void setSelectionBackground(Color selectionColor)
    • getSelectedLocale

      public String getSelectedLocale()
    • setSelectedLocale

      public void setSelectedLocale(String localeName)
    • 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
    • getQuality

      public QualityCode getQuality()
      Description copied from interface: QualityMonitor
      Retrieves the current quality for the component.
      Specified by:
      getQuality in interface QualityMonitor
      Returns:
      the current QualityCode.
    • 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
    • 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
      Parameters:
      propName - the name of the property.
      quality - the quality of the property.
    • setQuality

      public void setQuality(QualityCode value)
      Description copied from interface: QualityMonitor
      Sets the current quality for the component.
      Specified by:
      setQuality in interface QualityMonitor
      Parameters:
      value - the new quality code.