Class ZoomIndicator

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
com.inductiveautomation.ignition.designer.gui.ZoomIndicator
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class ZoomIndicator extends JLabel
Filename: ZoomIndicator Author: Perry Arellano-Jones Created on: 6/30/15 Project: ignition_dev_7_8B

Adding a ZoomIndicator to your designer scoped Workspace/Resource Editor through the DesignerContext's getDisplay(). To catch zooms originating from the source, fire a PropertyChangeEvent using ZOOM_PROP_CHANGE as the property name

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • setEnabled

      public void setEnabled(boolean enabled)
      Enables/Disables the zoom indicator. When disabled, the zoom actions/popup are disabled, the zoom is reset, and the previous zoom level is remembered. When enabled, the zoom actions are enabled, and the zoom is set to the previous zoom level. noop if enabled parameter is equal to the current enabled value or if the zoomableEditor is not set.
      Overrides:
      setEnabled in class JComponent
    • setLabelPercent

      public void setLabelPercent(int percent)
      Convenience method for manually updating the value of zoom label given an integer representing the percentage to display - e.g. passing in 100 will be presented as '100%' in the label.
    • setDefaultZoomSizes

      public void setDefaultZoomSizes(List<Integer> defaultZoomSizes)
    • updateLabel

      public void updateLabel()
      call to force the indicator to check the zoom value of the editor and update the text of the label
    • zoomIn

      public void zoomIn()
    • zoomOut

      public void zoomOut()
    • zoomReset

      public void zoomReset()