java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
com.inductiveautomation.factorypmi.application.components.PMIImage
All Implemented Interfaces:
DynamicPropertyProvider, LocaleListener, MutableDynamicPropertyProvider, StyleProvider, ComponentLifecycle, EnabledEx, QualityMonitor, VisionComponent, ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

See Also:
  • Field Details

    • STRETCH_OFF

      public static final int STRETCH_OFF
      See Also:
    • STRETCH_TO_BOUNDS

      public static final int STRETCH_TO_BOUNDS
      See Also:
    • STRETCH_TO_BOUNDS_PCT

      public static final int STRETCH_TO_BOUNDS_PCT
      See Also:
    • STRETCH_TO_PARAM

      public static final int STRETCH_TO_PARAM
      See Also:
    • cursorCode

      protected int cursorCode
    • context

      protected VisionClientContext context
      The current ClientContext that is set on startupComponent()
  • Constructor Details

    • PMIImage

      public PMIImage()
  • Method Details

    • imageUpdate

      public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h)
      Specified by:
      imageUpdate in interface ImageObserver
      Overrides:
      imageUpdate in class JLabel
    • setName

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

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

      public String getToolTipText()
      Overrides:
      getToolTipText in class JComponent
    • 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
    • addActionListener

      public void addActionListener(ActionListener al)
    • getRotation

      public int getRotation()
    • setRotation

      public void setRotation(int i)
    • paintComponent

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

      @Deprecated public void setAntiAlias(boolean b)
      Deprecated.
      for backwards compatibility
    • getPath

      public String getPath()
    • setPath

      public void setPath(String newPath)
    • getDisabledPath

      public String getDisabledPath()
    • setDisabledPath

      public void setDisabledPath(String string)
    • setUseCache

      public void setUseCache(boolean useCache)
    • isUseCache

      public boolean isUseCache()
    • setLoadInBackground

      public void setLoadInBackground(boolean loadInBackground)
    • isLoadInBackground

      public boolean isLoadInBackground()
    • updateStretch

      protected void updateStretch()
    • setStretch

      @Deprecated public void setStretch(boolean b)
      Deprecated.
      For backwards Compatability
    • localeChanged

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

      public Color getSwapFromColor()
    • getSwapToColor

      public Color getSwapToColor()
    • getTintColor

      public Color getTintColor()
    • isUseColorSwap

      public boolean isUseColorSwap()
    • isUseTint

      public boolean isUseTint()
    • setSwapFromColor

      public void setSwapFromColor(Color color)
    • setSwapToColor

      public void setSwapToColor(Color color)
    • getSwapThreshold

      public int getSwapThreshold()
    • setSwapThreshold

      public void setSwapThreshold(int swapThreshold)
    • setTintColor

      public void setTintColor(Color color)
    • setUseColorSwap

      public void setUseColorSwap(boolean b)
    • setUseTint

      public void setUseTint(boolean b)
    • getStretchHeight

      public int getStretchHeight()
    • setStretchHeight

      public void setStretchHeight(int stretchHeight)
    • getStretchMode

      public int getStretchMode()
    • setStretchMode

      public void setStretchMode(int stretchMode)
    • getStretchWidth

      public int getStretchWidth()
    • setStretchWidth

      public void setStretchWidth(int stretchWidth)
    • isFlipHorizontal

      public boolean isFlipHorizontal()
    • setFlipHorizontal

      public void setFlipHorizontal(boolean flipHorizontal)
    • isFlipVertical

      public boolean isFlipVertical()
    • setFlipVertical

      public void setFlipVertical(boolean flipVertical)
    • 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
    • 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