类 JSpinnerDateEditor
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JSpinner
-
- org.meteoinfo.ui.calendar.JSpinnerDateEditor
-
- 所有已实现的接口:
FocusListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,IDateEditor
public class JSpinnerDateEditor extends JSpinner implements IDateEditor, FocusListener, ChangeListener
JSpinnerDateEditor is a date editor based on a JSpinner.- 版本:
- $LastChangedRevision: 147 $, $LastChangedDate: 2011-06-06 20:36:53 +0200 (Mo, 06 Jun 2011) $
- 作者:
- Kai Toedter
- 另请参阅:
- 序列化表格
-
-
嵌套类概要
-
从类继承的嵌套类/接口 javax.swing.JSpinner
JSpinner.AccessibleJSpinner, JSpinner.DateEditor, JSpinner.DefaultEditor, JSpinner.ListEditor, JSpinner.NumberEditor
-
从类继承的嵌套类/接口 javax.swing.JComponent
JComponent.AccessibleJComponent
-
从类继承的嵌套类/接口 java.awt.Container
Container.AccessibleAWTContainer
-
-
字段概要
字段 修饰符和类型 字段 说明 protected Datedateprotected StringdateFormatStringprotected SimpleDateFormatdateFormatter-
从类继承的字段 javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
从类继承的字段 java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
从接口继承的字段 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
-
构造器概要
构造器 构造器 说明 JSpinnerDateEditor()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidfocusGained(FocusEvent e)voidfocusLost(FocusEvent focusEvent)DategetDate()Returns the date.StringgetDateFormatString()Returns the date format string.DategetMaxSelectableDate()Gets the minimum selectable date.DategetMinSelectableDate()Gets the maximum selectable date.JComponentgetUiComponent()Returns the UI component, e.g. the actual JTextField implementing the editor.voidsetDate(Date date)Sets the date.voidsetDate(Date date, boolean updateModel)voidsetDateFormatString(String dateFormatString)Sets the date format string, e.g.voidsetEnabled(boolean b)Enables and disabled the compoment.voidsetLocale(Locale locale)Sets the locale.voidsetMaxSelectableDate(Date max)Sets the maximum selectable date.voidsetMinSelectableDate(Date min)Sets the minimum selectable date.voidsetSelectableDateRange(Date min, Date max)Sets a valid date range for selectable dates.voidstateChanged(ChangeEvent e)-
从类继承的方法 javax.swing.JSpinner
addChangeListener, commitEdit, createEditor, fireStateChanged, getAccessibleContext, getChangeListeners, getEditor, getModel, getNextValue, getPreviousValue, getUI, getUIClassID, getValue, removeChangeListener, setEditor, setModel, setUI, setValue, updateUI
-
从类继承的方法 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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, 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, transferFocusDownCycle, validate, validateTree
-
从类继承的方法 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, getPeer, 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, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 org.meteoinfo.ui.calendar.IDateEditor
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
字段详细资料
-
date
protected Date date
-
dateFormatString
protected String dateFormatString
-
dateFormatter
protected SimpleDateFormat dateFormatter
-
-
方法详细资料
-
getDate
public Date getDate()
从接口复制的说明:IDateEditorReturns the date.- 指定者:
getDate在接口中IDateEditor- 返回:
- the date
-
setDate
public void setDate(Date date)
从接口复制的说明:IDateEditorSets the date. This should be implemented as a bound property, firing the "date" property.- 指定者:
setDate在接口中IDateEditor- 参数:
date- the date to set
-
setDate
public void setDate(Date date, boolean updateModel)
-
setDateFormatString
public void setDateFormatString(String dateFormatString)
从接口复制的说明:IDateEditorSets the date format string, e.g. "MM/dd/yy". If the date format string is null or invalid, the date format string will be set to the MEDIUM Simple date format of the current locale.- 指定者:
setDateFormatString在接口中IDateEditor- 参数:
dateFormatString- the date format string
-
getDateFormatString
public String getDateFormatString()
从接口复制的说明:IDateEditorReturns the date format string.- 指定者:
getDateFormatString在接口中IDateEditor- 返回:
- the date format string
-
getUiComponent
public JComponent getUiComponent()
从接口复制的说明:IDateEditorReturns the UI component, e.g. the actual JTextField implementing the editor.- 指定者:
getUiComponent在接口中IDateEditor- 返回:
- the UI component
-
setLocale
public void setLocale(Locale locale)
从接口复制的说明:IDateEditorSets the locale. Usually this should have impact on the current date format string.- 指定者:
setLocale在接口中IDateEditor- 覆盖:
setLocale在类中Component- 参数:
locale- the locale to set
-
focusLost
public void focusLost(FocusEvent focusEvent)
- 指定者:
focusLost在接口中FocusListener
-
focusGained
public void focusGained(FocusEvent e)
- 指定者:
focusGained在接口中FocusListener
-
setEnabled
public void setEnabled(boolean b)
Enables and disabled the compoment. It also fixes the background bug 4991597 and sets the background explicitely to a TextField.inactiveBackground.- 指定者:
setEnabled在接口中IDateEditor- 覆盖:
setEnabled在类中JComponent- 参数:
b- true, if the UI component should be enabled.
-
getMaxSelectableDate
public Date getMaxSelectableDate()
从接口复制的说明:IDateEditorGets the minimum selectable date.- 指定者:
getMaxSelectableDate在接口中IDateEditor- 返回:
- the minimum selectable date
-
getMinSelectableDate
public Date getMinSelectableDate()
从接口复制的说明:IDateEditorGets the maximum selectable date.- 指定者:
getMinSelectableDate在接口中IDateEditor- 返回:
- the maximum selectable date
-
setMaxSelectableDate
public void setMaxSelectableDate(Date max)
从接口复制的说明:IDateEditorSets the maximum selectable date.- 指定者:
setMaxSelectableDate在接口中IDateEditor- 参数:
max- maximum selectable date
-
setMinSelectableDate
public void setMinSelectableDate(Date min)
从接口复制的说明:IDateEditorSets the minimum selectable date.- 指定者:
setMinSelectableDate在接口中IDateEditor- 参数:
min- minimum selectable date
-
setSelectableDateRange
public void setSelectableDateRange(Date min, Date max)
从接口复制的说明:IDateEditorSets a valid date range for selectable dates. If max is before min, the default range with no limitation is set.- 指定者:
setSelectableDateRange在接口中IDateEditor- 参数:
min- the minimum selectable date or null (then the minimum date should be set to 01\01\0001)max- the maximum selectable date or null (then the maximum date should be set to 01\01\9999)
-
stateChanged
public void stateChanged(ChangeEvent e)
- 指定者:
stateChanged在接口中ChangeListener- 另请参阅:
ChangeListener.stateChanged(ChangeEvent)
-
-