com.ibm.spinner
Class TimeSpinner

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.ibm.spinner.SpinnerGUI
                                |
                                +--com.ibm.spinner.Spinner
                                      |
                                      +--com.ibm.spinner.CalendarSpinner
                                            |
                                            +--com.ibm.spinner.TimeSpinner

public class TimeSpinner
extends CalendarSpinner

A spinner which displays and spins time. The time value can be changed by clicking on different subfields and spinning on them. The user can also type in a time string to set the current value.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Fields inherited from class com.ibm.spinner.CalendarSpinner
AM_PM, AMPM, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, ERA, HOUR, HOUR_OF_DAY, MILLISECOND, MINUTE, MONTH, SECOND, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR
 
Fields inherited from class com.ibm.spinner.SpinnerGUI
SPIN_HORIZONTAL, SPIN_VERTICAL
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
TimeSpinner()
          Default constructor which constructs a DateSpinner with the time zone set to that of the host, and the formatString property set to the default locale's Dateformat.
 
Method Summary
 java.lang.String getAboutThisBean()
          Returns a special formatted string intended for use by the editor of this property.
 void initMaximum(java.util.Calendar newMaximumCalendar)
          Initializes the maximum property of calendar.
 void initMinimum(java.util.Calendar newMinimumCalendar)
          Initializes the minimum property of calendar.
 void setAboutThisBean(java.lang.String aboutThisBean)
          Setter method for the aboutThisBean property to be available in the properties list.
 void setCalendar(java.util.Calendar newCalendar)
          Sets the current calendar's three time fields, which are hour, minute, second the same with the time fields of another calendar.
 void setMaximum(java.util.Calendar newMaximumCalendar)
          Sets the maximum property of calendar.
 void setMinimum(java.util.Calendar newMinimumCalendar)
          Sets the minimum property of calendar.
 
Methods inherited from class com.ibm.spinner.CalendarSpinner
addDateChangedListener, changeFormatStyle, dateChanged, focusGained, focusLost, getBackground, getCalendar, getCaretPos, getDate, getDatePartValue, getDateString, getDay, getFont, getForeground, getFormatString, getFormatStringByStyle, getFormatStrings, getFormattingStyle, getHour, getLocale, getMaximum, getMinimum, getMinute, getMonth, getSecond, getSQLDate, getTimePartValue, getTimeZone, getValue, getYear, initFormatStyle, isEditable, isEnabled, isOpaque, isSpinnable, isValidateMonthFirst, isWrapAssociated, keyPressed, keyTyped, mousePressed, removeDateChangedListener, scrollDown, scrollUp, setBackground, setCaretPos, setDate, setDateByFields, setDatePartValue, setDateString, setDay, setEditable, setEnabled, setFont, setForeground, setFormatString, setFormatStrings, setFormattingStyle, setHour, setLocale, setMinute, setMonth, setSecond, setSpinnable, setTimePartValue, setTimeZone, setValidateMonthFirst, setValue, setWrapAssociated, setYear, stateChanged
 
Methods inherited from class com.ibm.spinner.Spinner
addChangeListener, addSpinnerErrorEventListener, isWrap, removeChangeListener, removeSpinnerErrorEventListener, setWrap
 
Methods inherited from class com.ibm.spinner.SpinnerGUI
getColumns, getDecrButtonArrowColor, getEditable, getIncrButtonArrowColor, getMaximumSize, getMinimumSize, getOrientation, getPreferredSize, keyReleased, mouseClicked, mouseEntered, mouseExited, mouseReleased, setColumns, setDecrButtonArrowColor, setIncrButtonArrowColor, setOpaque, setOrientation, setToolTipText
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFontMetrics, getInputContext, getInputMethodRequests, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeSpinner

public TimeSpinner()
Default constructor which constructs a DateSpinner with the time zone set to that of the host, and the formatString property set to the default locale's Dateformat.
Method Detail

getAboutThisBean

public java.lang.String getAboutThisBean()
Returns a special formatted string intended for use by the editor of this property.
Returns:
the special formatted string for use by the editor of this property
Overrides:
getAboutThisBean in class CalendarSpinner

initMaximum

public void initMaximum(java.util.Calendar newMaximumCalendar)
Initializes the maximum property of calendar. If its value is before minimum, the minimum property is set to be equal the maximum.
Parameters:
newMaximumCalendar - The maximum as a Calendar.
Overrides:
initMaximum in class CalendarSpinner

initMinimum

public void initMinimum(java.util.Calendar newMinimumCalendar)
Initializes the minimum property of calendar. If its value is before maximum, the maximum property is set to be equal the minimum.
Parameters:
newMinimumCalendar - The minimum as a Calendar.
Overrides:
initMinimum in class CalendarSpinner

setAboutThisBean

public void setAboutThisBean(java.lang.String aboutThisBean)
Setter method for the aboutThisBean property to be available in the properties list. This method should not be used to set the aboutThisBean preperty value.
Parameters:
newValue - the special formatted string
Overrides:
setAboutThisBean in class CalendarSpinner

setCalendar

public void setCalendar(java.util.Calendar newCalendar)
Sets the current calendar's three time fields, which are hour, minute, second the same with the time fields of another calendar. But the timeZone of the current calendar is not changed.
Parameters:
newCalendar - the calendar whose time fields will be used to change the current one.
Throws:
java.lang.IllegalArgumentException - exception
Overrides:
setCalendar in class CalendarSpinner

setMaximum

public void setMaximum(java.util.Calendar newMaximumCalendar)
Sets the maximum property of calendar.
Parameters:
newMaximumCalendar - The maximum as a Calendar.
Overrides:
setMaximum in class CalendarSpinner

setMinimum

public void setMinimum(java.util.Calendar newMinimumCalendar)
Sets the minimum property of calendar.
Parameters:
newMinimum - The minimum as a Calendar.
Overrides:
setMinimum in class CalendarSpinner