Class PMINumericTextField
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextField
javax.swing.JFormattedTextField
com.inductiveautomation.vision.api.client.components.model.BaseFormattedTextField
com.inductiveautomation.factorypmi.application.components.PMINumericTextField
- All Implemented Interfaces:
DynamicPropertyProvider
,LocaleListener
,MutableDynamicPropertyProvider
,StyleProvider
,ComponentLifecycle
,EnabledEx
,QualityMonitor
,VisionComponent
,TouchscreenMouseListener.TouchscreenEnabledComponent
,ImageObserver
,MenuContainer
,Serializable
,Accessible
,Scrollable
,SwingConstants
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.vision.api.client.components.model.BaseFormattedTextField
BaseFormattedTextField.SafeFocusHighlightBorder
Nested classes/interfaces inherited from class javax.swing.JFormattedTextField
JFormattedTextField.AbstractFormatter, JFormattedTextField.AbstractFormatterFactory
Nested classes/interfaces inherited from class javax.swing.JTextField
JTextField.AccessibleJTextField
Nested classes/interfaces inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
Fields inherited from class com.inductiveautomation.vision.api.client.components.model.BaseFormattedTextField
antialias, commitOnFocusLost, context, cursorCode, editableBackground, keyboardName, nonEditableBackground, protectedMode, rejectUpdatesDuringEdit, touchscreenMode
Fields inherited from class javax.swing.JFormattedTextField
COMMIT, COMMIT_OR_REVERT, PERSIST, REVERT
Fields inherited from class javax.swing.JTextField
notifyAction
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
Don't call this method outside of the Event Dispatch thread because commitsPossible is assumed to be checked serially on the event dispatch thread.double
If getValue() is outside the range of a double, TypeUtilities will display an error and we'll show 0 as the value.float
If we're in float mode or in the range of a float, try to display the float value, throwing an error if it can't be evaluated as a float.int
If we're in int mode or in the range of a int, try to display the int value, throwing an error if it can't be evaluated as a int.long
If we're in long mode or in the range of a long, try to display the long value, throwing an error if it can't be evaluated as a long.double
double
int
getMode()
The javabeans-style name of the property to modify.double
boolean
boolean
boolean
Subclasses must implement this to create the formatter factory of the type they want to useprotected void
Subclasses should override this to provide startup logic.void
setDecimalFormat
(String decimalFormat) void
setDeferUpdates
(boolean deferUpdates) void
setDoubleValue
(double doubleValue) void
setErrorOnOutOfBounds
(boolean errorOnOutOfBounds) void
setFloatValue
(float floatValue) void
setIntValue
(int intValue) void
setLongValue
(long longValue) void
setMaximum
(double maximum) void
setMinimum
(double minimum) void
setMode
(int mode) void
setOutOfBoundsMessage
(String outOfBoundsMessage) void
void
setTouchscreenValue
(double value) void
setUseBounds
(boolean useBounds) void
toString()
Methods inherited from class com.inductiveautomation.vision.api.client.components.model.BaseFormattedTextField
_setEditable, evaluateEnabled, getAppContext, getCursorCode, getDataQuality, getDynamicProps, getEditableBackground, getKeyboardName, getNonEditableBackground, getProperties, getPropertyValue, getQuality, getSelectedText, getStyles, getToolTipText, getTouchscreenMode, isAntialias, isCommitOnFocusLost, isComponentEnabled, isEditing, isOpaque, isPropertyDefined, isProtectedMode, isRejectUpdatesDuringEdit, isTouchscreenEditAllowed, localeChanged, onShutdown, paintChildren, paintComponent, setAntialias, setCommitOnFocusLost, setComponentEnabled, setCursorCode, setDataQuality, setDynamicProps, setEditable, setEditableBackground, setKeyboardName, setName, setNonEditableBackground, setPropertyValue, setProtectedMode, setQuality, setRejectUpdatesDuringEdit, setStyles, setToolTipText, setTouchscreenMode, setValueDirect, setVisible, shutdownComponent, startupComponent, updateQuality
Methods inherited from class javax.swing.JFormattedTextField
getActions, getFocusLostBehavior, getFormatter, getFormatterFactory, getUIClassID, getValue, invalidEdit, isEditValid, processFocusEvent, processInputMethodEvent, setDocument, setFocusLostBehavior, setFormatter, setFormatterFactory
Methods inherited from class javax.swing.JTextField
actionPropertyChanged, addActionListener, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getAction, getActionListeners, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getPreferredSize, getScrollOffset, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setFont, setHorizontalAlignment, setScrollOffset
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getPrintable, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, modelToView2D, moveCaretPosition, paste, print, print, print, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, restoreComposedText, saveComposedText, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setDropMode, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, viewToModel2D, write
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, 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, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, 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, addImpl, 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, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, 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, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, 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, processHierarchyBoundsEvent, processHierarchyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
MODE_INT
public static final int MODE_INT- See Also:
-
MODE_LONG
public static final int MODE_LONG- See Also:
-
MODE_FLOAT
public static final int MODE_FLOAT- See Also:
-
MODE_DOUBLE
public static final int MODE_DOUBLE- See Also:
-
-
Constructor Details
-
PMINumericTextField
public PMINumericTextField()
-
-
Method Details
-
isErrorOnOutOfBounds
public boolean isErrorOnOutOfBounds() -
setErrorOnOutOfBounds
public void setErrorOnOutOfBounds(boolean errorOnOutOfBounds) -
getOutOfBoundsMessage
-
isDeferUpdates
public boolean isDeferUpdates() -
setDeferUpdates
public void setDeferUpdates(boolean deferUpdates) -
setOutOfBoundsMessage
-
newFormatterFactory
Description copied from class:BaseFormattedTextField
Subclasses must implement this to create the formatter factory of the type they want to use- Specified by:
newFormatterFactory
in classBaseFormattedTextField
-
toString
-
getModeType
-
getTouchscreenPropertyName
Description copied from interface:TouchscreenMouseListener.TouchscreenEnabledComponent
The javabeans-style name of the property to modify. Needs a getter and setter. -
getTouchscreenStyle
- Specified by:
getTouchscreenStyle
in interfaceTouchscreenMouseListener.TouchscreenEnabledComponent
- Overrides:
getTouchscreenStyle
in classBaseFormattedTextField
-
getTouchscreenValue
public double getTouchscreenValue() -
setTouchscreenValue
public void setTouchscreenValue(double value) -
getMode
public int getMode() -
setMode
public void setMode(int mode) -
commitEdit
Don't call this method outside of the Event Dispatch thread because commitsPossible is assumed to be checked serially on the event dispatch thread. If you call outside the event dispatch thread, an IllegalStateException will be thrown.- Overrides:
commitEdit
in classJFormattedTextField
- Throws:
ParseException
-
getMaximum
public double getMaximum() -
setMaximum
public void setMaximum(double maximum) -
getMinimum
public double getMinimum() -
setMinimum
public void setMinimum(double minimum) -
isUseBounds
public boolean isUseBounds() -
setUseBounds
public void setUseBounds(boolean useBounds) -
getDoubleValue
public double getDoubleValue()If getValue() is outside the range of a double, TypeUtilities will display an error and we'll show 0 as the value. -
setDoubleValue
public void setDoubleValue(double doubleValue) -
getFloatValue
public float getFloatValue()If we're in float mode or in the range of a float, try to display the float value, throwing an error if it can't be evaluated as a float. Otherwise, display 0 in the props.Pre 7.7.7, values outside of float range would return the overflowed value, potentially altering the underlying value.
-
setFloatValue
public void setFloatValue(float floatValue) -
getIntValue
public int getIntValue()If we're in int mode or in the range of a int, try to display the int value, throwing an error if it can't be evaluated as a int. Otherwise, display 0 in the props.Pre 7.7.7, values outside of int range would return the overflowed value, potentially altering the underlying value.
-
setIntValue
public void setIntValue(int intValue) -
getLongValue
public long getLongValue()If we're in long mode or in the range of a long, try to display the long value, throwing an error if it can't be evaluated as a long. Otherwise, display 0 in the props.Pre 7.7.7, values outside of long range would return the overflowed value, potentially altering the underlying value.
-
setLongValue
public void setLongValue(long longValue) -
setValue
- Overrides:
setValue
in classBaseFormattedTextField
-
getDecimalFormat
-
setDecimalFormat
-
onStartup
protected void onStartup()Description copied from class:BaseFormattedTextField
Subclasses should override this to provide startup logic.- Overrides:
onStartup
in classBaseFormattedTextField
-
getSuffix
-
setSuffix
-