com.nonesole.swing.plaf.basic.table.utable.textfield
类 UAbstractNumberTextField

java.lang.Object
  继承者 java.awt.Component
      继承者 java.awt.Container
          继承者 javax.swing.JComponent
              继承者 javax.swing.text.JTextComponent
                  继承者 javax.swing.JTextField
                      继承者 com.nonesole.swing.plaf.basic.table.utable.textfield.UAbstractNumberTextField
所有已实现的接口:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable, javax.swing.SwingConstants
直接已知子类:
UDoubleTextField, UIntegerTextField

public abstract class UAbstractNumberTextField
extends javax.swing.JTextField

数字TextField控件的基类

版本:
1.0 - build in 2009-11-06
作者:
JACK LEE
另请参见:
序列化表格

嵌套类摘要
 
从类 javax.swing.JTextField 继承的嵌套类/接口
javax.swing.JTextField.AccessibleJTextField
 
从类 javax.swing.text.JTextComponent 继承的嵌套类/接口
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.KeyBinding
 
从类 javax.swing.JComponent 继承的嵌套类/接口
javax.swing.JComponent.AccessibleJComponent
 
从类 java.awt.Container 继承的嵌套类/接口
java.awt.Container.AccessibleAWTContainer
 
从类 java.awt.Component 继承的嵌套类/接口
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
字段摘要
protected  javax.swing.text.Document doc
           
 
从类 javax.swing.JTextField 继承的字段
notifyAction
 
从类 javax.swing.text.JTextComponent 继承的字段
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
 
从类 javax.swing.JComponent 继承的字段
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
从类 java.awt.Component 继承的字段
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
从接口 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
 
从接口 java.awt.image.ImageObserver 继承的字段
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
构造函数摘要
UAbstractNumberTextField()
           
 
方法摘要
protected  void backSpaceKeyAction()
          取消键
protected  void deleteKeyAction()
          删除键
protected abstract  boolean isKeyEventValid(java.awt.event.KeyEvent e)
          验证录入的按键值是否有效,该方法配合processKeyBinding方法使用
protected  void keyPressedAction(java.awt.event.KeyEvent e)
          按键按下时的事件
protected  void keyReleasedAction(java.awt.event.KeyEvent e)
          按键按下去后释放时的事件,供子类调用
protected  void keyTypedAction(java.awt.event.KeyEvent e)
          敲击按键的事件,供子类调用
protected  void leftKeyAction()
          左键
protected  void minusKeyAction()
          减号
protected  void numberKeyAction(java.lang.String num)
          数字键
protected  void processKeyEvent(java.awt.event.KeyEvent e)
          重写processKeyEvent方法
protected  void rightKeyAction()
          右键
protected abstract  void setDefaultValue()
          设置默认值
 
从类 javax.swing.JTextField 继承的方法
addActionListener, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getAction, getActionListeners, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getPreferredSize, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setDocument, setFont, setHorizontalAlignment, setScrollOffset
 
从类 javax.swing.text.JTextComponent 继承的方法
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write
 
从类 javax.swing.JComponent 继承的方法
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, 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, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
从类 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
从类 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

doc

protected javax.swing.text.Document doc
构造函数详细信息

UAbstractNumberTextField

public UAbstractNumberTextField()
方法详细信息

setDefaultValue

protected abstract void setDefaultValue()
设置默认值


keyReleasedAction

protected void keyReleasedAction(java.awt.event.KeyEvent e)
按键按下去后释放时的事件,供子类调用

参数:
e - KeyEvent

keyTypedAction

protected void keyTypedAction(java.awt.event.KeyEvent e)
敲击按键的事件,供子类调用

参数:
e - KeyEvent

processKeyEvent

protected void processKeyEvent(java.awt.event.KeyEvent e)
重写processKeyEvent方法

覆盖:
javax.swing.JComponent 中的 processKeyEvent

numberKeyAction

protected void numberKeyAction(java.lang.String num)
数字键


minusKeyAction

protected void minusKeyAction()
减号


backSpaceKeyAction

protected void backSpaceKeyAction()
取消键


leftKeyAction

protected void leftKeyAction()
左键


rightKeyAction

protected void rightKeyAction()
右键


deleteKeyAction

protected void deleteKeyAction()
删除键


keyPressedAction

protected void keyPressedAction(java.awt.event.KeyEvent e)
按键按下时的事件

参数:
e - KeyEvent

isKeyEventValid

protected abstract boolean isKeyEventValid(java.awt.event.KeyEvent e)
验证录入的按键值是否有效,该方法配合processKeyBinding方法使用

参数:
e - - KeyEvent
返回:
true - 该按键对于当前控件来说有效,false - 该按键无效