Class PMIMomentaryButton2
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.AbstractButton
-
- javax.swing.JButton
-
- com.inductiveautomation.vision.api.client.components.model.AbstractVisionButton
-
- com.inductiveautomation.factorypmi.application.components.PMIMomentaryButton2
-
- All Implemented Interfaces:
DynamicPropertyProvider
,LocaleListener
,MutableDynamicPropertyProvider
,StyleProvider
,ComponentLifecycle
,DesignerInitializable
,EnabledEx
,QualityMonitor
,VisionComponent
,java.awt.image.ImageObserver
,java.awt.ItemSelectable
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
,javax.swing.SwingConstants
public class PMIMomentaryButton2 extends AbstractVisionButton implements LocaleListener, DesignerInitializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
PMIMomentaryButton2.PhysicalButtonReleaseEmulation
-
Nested classes/interfaces inherited from class javax.swing.JButton
javax.swing.JButton.AccessibleJButton
-
Nested classes/interfaces inherited from class javax.swing.AbstractButton
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.vision.api.client.components.model.AbstractVisionButton
context, cursorCode, DEFAULT_MARGIN
-
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface com.inductiveautomation.vision.api.client.components.model.ComponentLifecycle
COMPONENT_RUNNING
-
Fields inherited from interface com.inductiveautomation.vision.api.client.components.model.EnabledEx
DISABLED_BY_PERMISSIONS
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Fields inherited from interface com.inductiveautomation.ignition.client.model.LocaleListener
LOCAL_CHANGE_EVENT
-
Fields inherited from interface com.inductiveautomation.vision.api.client.binding.MutableDynamicPropertyProvider
RESERVED_SET_KEY
-
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
-
Fields inherited from interface com.inductiveautomation.vision.api.client.components.model.VisionComponent
COMPONENT_LOCKED, COMPONENT_PERMISSIONS, COMPONENT_SECURITY, COMPONENT_TRANSLATIONS
-
-
Constructor Summary
Constructors Constructor Description PMIMomentaryButton2()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doClick(int pressTime)
This override and the Emulation runnable are here so that users can emulate physical press & hold via scripting, and allow the proper setting of control values.int
getControlValue()
int
getIndicatorValue()
int
getIndicatorWidth()
javax.swing.border.Border
getInnerBorder()
int
getMaxOnTime()
java.awt.Color
getOffColor()
int
getOffValue()
java.awt.Color
getOnColor()
int
getOnTime()
int
getOnValue()
void
initialize()
boolean
isActive()
void
localeChanged(java.util.Locale newLocale)
void
setActive(boolean active)
void
setControlValue(int value)
void
setIndicatorValue(int indicatorValue)
void
setIndicatorWidth(int padding)
void
setInnerBorder(javax.swing.border.Border innerBorder)
void
setMaxOnTime(int maxOnTime)
void
setOffColor(java.awt.Color offColor)
void
setOffValue(int offValue)
void
setOnColor(java.awt.Color onColor)
void
setOnTime(int onTime)
void
setOnValue(int onValue)
java.lang.String
toString()
-
Methods inherited from class com.inductiveautomation.vision.api.client.components.model.AbstractVisionButton
evaluateEnabled, getAppContext, getButtonBG, getCursorCode, getDataQuality, getDisabledPath, getDynamicProps, getMnemonicChar, getPath, getProperties, getPropertyValue, getQuality, getStyles, getText, getToolTipText, isBackground3D, isComponentEnabled, isPropertyDefined, onShutdown, onStartup, paintChildren, setAntialias, setBackground3D, setButtonBG, setComponentEnabled, setCursorCode, setDataQuality, setDisabledPath, setDynamicProps, setEnabled, setMnemonicChar, setName, setPath, setPropertyValue, setQuality, setStyles, setText, setToolTipText, setVisible, shutdownComponent, startupComponent, updateQuality
-
Methods inherited from class javax.swing.JButton
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI
-
Methods inherited from class javax.swing.AbstractButton
actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setUI, setVerticalAlignment, setVerticalTextPosition
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Method Detail
-
initialize
public void initialize()
- Specified by:
initialize
in interfaceDesignerInitializable
-
doClick
public void doClick(int pressTime)
This override and the Emulation runnable are here so that users can emulate physical press & hold via scripting, and allow the proper setting of control values. We attempt the doPress() and then stage an invokeLater to run the release() functionality.- Overrides:
doClick
in classjavax.swing.AbstractButton
- Parameters:
pressTime
- the duration that a button press should be simulated
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.awt.Component
-
getOnTime
public int getOnTime()
-
setOnTime
public void setOnTime(int onTime)
-
getMaxOnTime
public int getMaxOnTime()
-
setMaxOnTime
public void setMaxOnTime(int maxOnTime)
-
getOnValue
public int getOnValue()
-
setOnValue
public void setOnValue(int onValue)
-
getOffValue
public int getOffValue()
-
setOffValue
public void setOffValue(int offValue)
-
getControlValue
public int getControlValue()
-
setControlValue
public void setControlValue(int value)
-
getIndicatorValue
public int getIndicatorValue()
-
setIndicatorValue
public void setIndicatorValue(int indicatorValue)
-
isActive
public boolean isActive()
-
setActive
public void setActive(boolean active)
-
getIndicatorWidth
public int getIndicatorWidth()
-
setIndicatorWidth
public void setIndicatorWidth(int padding)
-
localeChanged
public void localeChanged(java.util.Locale newLocale)
- Specified by:
localeChanged
in interfaceLocaleListener
- Overrides:
localeChanged
in classAbstractVisionButton
-
getInnerBorder
public javax.swing.border.Border getInnerBorder()
-
setInnerBorder
public void setInnerBorder(javax.swing.border.Border innerBorder)
-
getOnColor
public java.awt.Color getOnColor()
-
setOnColor
public void setOnColor(java.awt.Color onColor)
-
getOffColor
public java.awt.Color getOffColor()
-
setOffColor
public void setOffColor(java.awt.Color offColor)
-
-