|
JBCSolutions - JbcBeans v1.5 This document is the API specification for the JbcBeans, version 1.5 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
jbc.beans.JbcLongSpinButton
public class JbcLongSpinButton
This spin button handles longs. It allows applications
to get numbers whose values are certified as minimum and maximum.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
---|
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 |
Fields inherited from interface 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 |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JbcLongSpinButton()
Default JbcLongSpinButton constructor. |
|
JbcLongSpinButton(int columns)
Constructs a new empty JbcLongSpinButton with the specified number of columns. |
Method Summary | |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds a ChangeListener to the list that is
notified each time the spin Button's value has changed. |
java.lang.String |
getAbout()
Application code will not use these methods explicitly. |
java.awt.Color |
getBackground()
Gets the background color of this component. |
java.awt.Color |
getBackgroundTextField()
Gets the background color of TextField component. |
java.awt.Color |
getCaretColor()
Fetches the current color used to render the caret. |
java.awt.Color |
getDisabledTextColor()
Fetches the current color used to render the disabled text. |
java.awt.Color |
getForegroundTextField()
Gets the foreground color of TextField component. |
int |
getHorizontalAlignment()
Returns the alignment of the textField's contents along the X axis. |
long |
getMaximum()
Returns the maximum value supported by the spin button. |
long |
getMinimum()
Returns the minimum value supported by the spin button. |
java.awt.Color |
getSelectionColor()
Fetches the current color used to render the selection. |
int |
getSleep()
Gets the current sleep time value |
javax.swing.JTextField |
getTextField()
Returns the JTextField associated to the spin button. |
long |
getValue()
Returns the spin button value. |
boolean |
isEditable()
Returns true if the JbcLongSpinButton is editable. |
boolean |
isLinear()
Returns whether the spin button has a linear speed of rotation or not. |
boolean |
isWrapped()
Returns whether the list of the spin button is wrapped or not. |
void |
paint(java.awt.Graphics g)
Paints this component. |
void |
paintInterface(java.awt.Graphics g)
|
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener from the list that's notified each
time the spin button's value has changed. |
void |
requestFocus()
Requests that this component get the input focus. |
void |
setAbout(java.lang.String text)
Application code will not use these methods explicitly. |
void |
setBackground(java.awt.Color color)
Sets the background color of this component. |
void |
setBackgroundTextField(java.awt.Color color)
Sets the background color of TextField component. |
void |
setBounds(int x,
int y,
int width,
int height)
Moves and resizes this component. |
void |
setBounds(java.awt.Rectangle r)
Moves and resizes this component to conform to the new bounding rectangle r . |
void |
setCaretColor(java.awt.Color c)
Sets the current color used to render the caret. |
void |
setDisabledTextColor(java.awt.Color c)
Sets the current color used to render the disabled text. |
void |
setEditable(boolean aFlag)
Determines whether the JbcLongSpinButton field is editable. |
void |
setEnabled(boolean b)
Sets whether or not this component is enabled. |
void |
setFont(java.awt.Font f)
Gets the font of this component. |
void |
setForegroundTextField(java.awt.Color color)
Sets the foreground color of TextField component. |
void |
setHorizontalAlignment(int alignment)
Sets the alignment of the textField's contents along the X axis. |
void |
setLinear(boolean newLinear)
Sets whether the spin button has linear speed of rotation. |
void |
setMaximum(long upper)
Sets the maximum value supported by the spin button. |
void |
setMinimum(long lower)
Sets the minimum value supported by the spin button. |
void |
setSelectionColor(java.awt.Color c)
Sets the current color used to render the selection. |
void |
setSize(java.awt.Dimension d)
Resizes this component so that it has width d.width
and height d.height . |
void |
setSize(int width,
int height)
Resizes this component so that it has width width
and height height . |
void |
setSleep(int sleepTime)
To run the spin button, the main component will use multithread facilities. |
void |
setToolTipText(java.lang.String text)
Registers the text to display in a tool tip. |
void |
setValue(long value)
Sets the spin button current value. |
void |
setWrapped(boolean b)
Sets whether the list of the spin button is wrapped. |
void |
updateUI()
Notification from the UIFactory that the L&F has changed. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JbcLongSpinButton()
Creates a JbcLongSpinButton
instance.
public JbcLongSpinButton(int columns)
Method Detail |
---|
public void setAbout(java.lang.String text)
public java.lang.String getAbout()
public final void paintInterface(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void updateUI()
updateUI
in class javax.swing.JComponent
JComponent.updateUI()
public void requestFocus()
requestFocus
in class javax.swing.JComponent
Component.requestFocus()
public void setEditable(boolean aFlag)
JbcLongSpinButton
field is editable.
An editable JbcLongSpinButton
allows the user to type into the
field.
aFlag
- a boolean value, where true indicates that the
field is editableisEditable()
public boolean isEditable()
JbcLongSpinButton
is editable.
By default, a JbcLongSpinButton is editable.
JbcLongSpinButton
is editable, else falsesetEditable(boolean)
public void setToolTipText(java.lang.String text)
setToolTipText
in class javax.swing.JComponent
text
- the string to display; if the text is null,
the tool tip is turned off for this componentpublic java.awt.Color getBackground()
getBackground
in class java.awt.Component
setBackground(java.awt.Color)
public void setBackground(java.awt.Color color)
setBackground
in class javax.swing.JComponent
color
- The color to become this component's
background color.
If this parameter is null then this component will inherit
the default background.getBackground()
public void setBackgroundTextField(java.awt.Color color)
color
- The color to become TextField component's
background color.getBackgroundTextField()
public void setForegroundTextField(java.awt.Color color)
color
- The color to become TextField component's
foreground color.getForegroundTextField()
public void setCaretColor(java.awt.Color c)
c
- the colorgetCaretColor()
public void setDisabledTextColor(java.awt.Color c)
c
- the colorgetDisabledTextColor()
public void setSelectionColor(java.awt.Color c)
c
- the colorgetSelectionColor()
public java.awt.Color getCaretColor()
public java.awt.Color getDisabledTextColor()
public java.awt.Color getSelectionColor()
public java.awt.Color getBackgroundTextField()
setBackgroundTextField(java.awt.Color)
public java.awt.Color getForegroundTextField()
setForegroundTextField(java.awt.Color)
public void setFont(java.awt.Font f)
setFont
in class javax.swing.JComponent
Component.getFont()
public void setEnabled(boolean b)
setEnabled
in class javax.swing.JComponent
Component.isEnabled()
public void setSleep(int sleepTime)
sleepTime
- The sleep time valuegetSleep()
public int getSleep()
setSleep(int)
public void setMinimum(long lower)
getMinimum()
public long getMinimum()
setMinimum(long)
public long getMaximum()
setMaximum(long)
public void setMaximum(long upper)
getMaximum()
public void setValue(long value)
getValue()
public long getValue()
setValue(long)
public boolean isLinear()
setLinear(boolean)
public void setLinear(boolean newLinear)
newLinear
- true if the spin button has a linear rotation,
otherwise false.isLinear()
public boolean isWrapped()
setWrapped(boolean)
public void setWrapped(boolean b)
b
- true if the list of the spin button is wrapped, otherwise false.isWrapped()
public void setBounds(int x, int y, int width, int height)
x
and y
, and the
new size is specified by width
and height
.
setBounds
in class java.awt.Component
x
- The new x-coordinate of this component.y
- The new y-coordinate of this component.width
- The new width
of this component.height
- The new height
of this
component.public void setBounds(java.awt.Rectangle r)
r
. This component's new
position is specified by r.x
and r.y
,
and its new size is specified by r.width
and
r.height
setBounds
in class java.awt.Component
r
- The new bounding rectangle for this component.public void setSize(int width, int height)
width
and height height
.
setSize
in class java.awt.Component
width
- The new width of this component in pixels.height
- The new height of this component in pixels.JComponent.getSize(java.awt.Dimension)
,
setBounds(int, int, int, int)
public void setSize(java.awt.Dimension d)
d.width
and height d.height
.
setSize
in class java.awt.Component
d
- The dimension specifying the new size of this component.setSize(int, int)
,
setBounds(int, int, int, int)
public javax.swing.JTextField getTextField()
public void addChangeListener(javax.swing.event.ChangeListener l)
ChangeListener
to the list that is
notified each time the spin Button's value has changed.
l
- the ChangeListener
to addremoveChangeListener(javax.swing.event.ChangeListener)
public void removeChangeListener(javax.swing.event.ChangeListener l)
ChangeListener
from the list that's notified each
time the spin button's value has changed.
l
- the ChangeListener
to removeaddChangeListener(javax.swing.event.ChangeListener)
public void setHorizontalAlignment(int alignment)
alignment
- One of the following constants
defined in SwingConstants
:
LEFT
,
CENTER
(the default),
RIGHT
,
LEADING
or
TRAILING
.SwingConstants
,
getHorizontalAlignment()
public int getHorizontalAlignment()
SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
or
TRAILING
.setHorizontalAlignment(int)
,
SwingConstants
|
JBCSolutions - JbcBeans v1.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |