|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.ibm.spinner.SpinnerGUI
SpinnerGUI defines the common features that the spinner GUI has: two buttorns for increasing and decreasing the value, one text field for displaying and editing the value.
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
static int |
SPIN_HORIZONTAL
Horizontal arrangement of spinner's direction buttons. |
static int |
SPIN_VERTICAL
Vertical arrangement of spinner's direction buttons. |
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 | |
SpinnerGUI()
Constructs and initializes the spinner's GUI. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Event method of ActionListener. |
void |
focusGained(java.awt.event.FocusEvent e)
Event method of FocusListener. |
void |
focusLost(java.awt.event.FocusEvent e)
Event method of FocusListener. |
int |
getColumns()
Gets the columns of the text field which is used to display the current selected item. |
java.awt.Color |
getDecrButtonArrowColor()
Gets the arrow color in the decrment button. |
java.awt.Color |
getIncrButtonArrowColor()
Gets the arrow color of the incrment button. |
java.awt.Dimension |
getMaximumSize()
Gets the maximum size of the spinner. |
java.awt.Dimension |
getMinimumSize()
Gets the minimum size of the spinner. |
int |
getOrientation()
Returns the spinner's orientation which represents the arrangement of the two spin buttons(horizontal or vertical). |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size of this spinner. |
boolean |
isEditable()
Gets the editable property of spinner. |
boolean |
isEnabled()
Gets the enabled property of spinner. |
void |
keyPressed(java.awt.event.KeyEvent e)
Event method of KeyListener. |
void |
keyReleased(java.awt.event.KeyEvent e)
Event method of KeyListener. |
void |
keyTyped(java.awt.event.KeyEvent e)
Event method of KeyListener. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
setBackground(java.awt.Color newColor)
Sets background color of the text field. |
void |
setColumns(int newColumns)
Sets the columns of the text field which is used to display the current selected item. |
void |
setDecrButtonArrowColor(java.awt.Color newColor)
Sets the arrow color in the decrment button. |
void |
setEditable(boolean b)
Sets whether the spinner can be edited or not. |
void |
setEnabled(boolean b)
Sets whether the spinner can be used or not. |
void |
setFont(java.awt.Font newFont)
Sets text font of the text field. |
void |
setForeground(java.awt.Color newColor)
Sets foreground color of the text field. |
void |
setIncrButtonArrowColor(java.awt.Color newColor)
Sets the arrow color of the incrment button. |
void |
setOpaque(boolean b)
Sets whether the spinner can be opaque or not. |
void |
setOrientation(int newOrientation)
Sets the spinner's orientation to either SPIN_VERTICAL or SPIN_HORIZONTAL. |
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,
isOpaque,
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,
setToolTipText,
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,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
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,
setLocale,
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 |
Field Detail |
public static final int SPIN_VERTICAL
public static final int SPIN_HORIZONTAL
Constructor Detail |
public SpinnerGUI()
Method Detail |
public void setOrientation(int newOrientation)
newOrientation
- new arrangement of two scroll buttonspublic int getOrientation()
public void setColumns(int newColumns)
newColumns
- the columns to be set,it should be more than 0public int getColumns()
public void setIncrButtonArrowColor(java.awt.Color newColor)
newColor
- new color of the incrment arrowpublic java.awt.Color getIncrButtonArrowColor()
public void setDecrButtonArrowColor(java.awt.Color newColor)
newColor
- the color of the decrment arrowpublic java.awt.Color getDecrButtonArrowColor()
public void setEnabled(boolean b)
b
- true or false, true represents the spinner can be used.public boolean isEnabled()
public void setEditable(boolean b)
b
- true or false. If true the spinner can be edited.public boolean isEditable()
public void setOpaque(boolean b)
b
- true or false. If true the spinner background will
be filled with the background color.public void setFont(java.awt.Font newFont)
newFont
- the text fontpublic void setForeground(java.awt.Color newColor)
newColor
- the text field foreground colorpublic void setBackground(java.awt.Color newColor)
newColor
- the text field background colorpublic java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
public java.awt.Dimension getMaximumSize()
public void actionPerformed(java.awt.event.ActionEvent event)
public void keyTyped(java.awt.event.KeyEvent e)
public void keyReleased(java.awt.event.KeyEvent e)
public void keyPressed(java.awt.event.KeyEvent e)
public void focusGained(java.awt.event.FocusEvent e)
public void focusLost(java.awt.event.FocusEvent e)
public void mouseClicked(java.awt.event.MouseEvent e)
public void mousePressed(java.awt.event.MouseEvent e)
public void mouseReleased(java.awt.event.MouseEvent e)
public void mouseEntered(java.awt.event.MouseEvent e)
public void mouseExited(java.awt.event.MouseEvent e)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |