public class IntField extends TextField implements FocusListener
TextField.AccessibleAWTTextFieldTextComponent.AccessibleAWTTextComponentComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategytextListeneraccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
IntField()
Constructs an IntField with value 0 and maximal bounds.
|
IntField(int value)
Constructs an IntField with the specified value and maximal bounds.
|
IntField(int value,
int minValue,
int maxValue)
Constructs an IntField with specified value and bounds.
|
IntField(int value,
int minValue,
int maxValue,
int columns)
Constructs an IntField with specified value, bounds and number of columns.
|
IntField(int value,
int minValue,
int maxValue,
int columns,
String actionCommand)
Constructs an IntField with specified value, bounds, number of columns, and command string of the ActionEvent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
focusGained(FocusEvent e) |
void |
focusLost(FocusEvent e) |
String |
getActionCommand()
Returns the action command string.
|
int |
getValue() |
protected void |
processActionEvent(ActionEvent e)
Hand on an ActionEvent to listeners only if a new and valid
integer has been entered.
|
void |
setActionCommand(String newCommand)
Sets the command string returned by an ActionEvent.
|
void |
setValue(int newValue)
Sets the value of the field to newValue without sending an ActionEvent.
|
void |
setValue(int newValue,
boolean sendEvent)
Sets the value of the field to newValue.
|
addActionListener, addNotify, echoCharIsSet, getAccessibleContext, getActionListeners, getColumns, getEchoChar, getListeners, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, minimumSize, minimumSize, paramString, preferredSize, preferredSize, processEvent, removeActionListener, setColumns, setEchoChar, setEchoCharacter, setTextaddTextListener, enableInputMethods, getBackground, getCaretPosition, getInputMethodRequests, getSelectedText, getSelectionEnd, getSelectionStart, getText, getTextListeners, isEditable, processTextEvent, removeNotify, removeTextListener, select, selectAll, setBackground, setCaretPosition, setEditable, setSelectionEnd, setSelectionStartaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validatepublic IntField()
public IntField(int value)
public IntField(int value,
int minValue,
int maxValue)
public IntField(int value,
int minValue,
int maxValue,
int columns)
public IntField(int value,
int minValue,
int maxValue,
int columns,
String actionCommand)
public int getValue()
public void setValue(int newValue)
public void setValue(int newValue,
boolean sendEvent)
public void setActionCommand(String newCommand)
public String getActionCommand()
protected void processActionEvent(ActionEvent e)
processActionEvent in class TextFieldpublic void focusLost(FocusEvent e)
focusLost in interface FocusListenerpublic void focusGained(FocusEvent e)
focusGained in interface FocusListenerCopyright © 2015–2021 Fiji. All rights reserved.