|
|||||||||||
| 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
javax.swing.JPanel
com.tensegrity.gui.swing.control.spinbutton.AbstractSpinButton
com.tensegrity.gui.swing.control.spinbutton.DoubleSpinButton
The DoubleSpinButton implements the SpinButton for Double's.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DoubleSpinButton(java.lang.Number min,
java.lang.Number max,
java.lang.Number step,
java.lang.Number initial)
Creates a new DoubleSpinButton based on the given values. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Sets the internal value according the pressed button and posts the event to all listeners of action events. |
protected java.lang.Number |
add(java.lang.Number left,
java.lang.Number right)
Invoked by this class whenever its required to add a certain value to another. |
void |
addActionListener(java.awt.event.ActionListener listener)
Method addActionListener adds the given listener to the internal list of ActionListeners. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
does nothing. |
void |
decreaseValue()
Decreases the number by the step that can be defined using AbstractSpinButton.setStep(Number). |
java.lang.Number |
getMaximum()
Returns the upper bound of this SpinButton. |
java.lang.Number |
getMinimum()
Returns the minimum of this SpinButton. |
java.lang.Number |
getStep()
Returns the current step value. |
java.lang.Number |
getValue()
Returns the value. |
void |
increaseValue()
Increases the number by the step that can be defined using AbstractSpinButton.setStep(Number). |
void |
layoutContainer(java.awt.Container parent)
Layouts the two buttons vertical where the up button is on top and the down button below. |
protected java.lang.Number |
max(java.lang.Number left,
java.lang.Number right)
Invoked by this class whenever its required to determine the maximum of two values of type Number. |
protected java.lang.Number |
min(java.lang.Number left,
java.lang.Number right)
Invoked by this class whenever its required to determine the minimum of two values of type Number. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Returns the preferredLayoutSize of the parent. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Calculates the preferredSize of this SpinButton by combining the preferred sizes of the two contained buttons. |
void |
removeLayoutComponent(java.awt.Component comp)
does nothing. |
void |
removeListener(java.awt.event.ActionListener listener)
Method removeListener removes the given listener from the internal list of ActionListeners. |
void |
setEnabled(boolean enabled)
|
void |
setMaximum(java.lang.Number maximum)
Changes the upper bound for numbers to the given one. |
void |
setMinimum(java.lang.Number minimum)
Changes the lower bound for numbers to the given one. |
void |
setStep(java.lang.Number step)
Sets the new step value. |
void |
setValue(java.lang.Number value)
Sets the value. |
protected java.lang.Number |
substract(java.lang.Number left,
java.lang.Number right)
Invoked by this class whenever its required to subtract a certain value from another. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DoubleSpinButton(java.lang.Number min,
java.lang.Number max,
java.lang.Number step,
java.lang.Number initial)
DoubleSpinButton based on the given values.
min - the minimum.max - the maximum.step - the step value.initial - the initial value.| Method Detail |
protected java.lang.Number substract(java.lang.Number left,
java.lang.Number right)
com.tensegrity.gui.swing.control.spinbutton.AbstractSpinButton
left - the first summand.right - the second summand.
eft-right as an
instance of Number.
protected java.lang.Number add(java.lang.Number left,
java.lang.Number right)
com.tensegrity.gui.swing.control.spinbutton.AbstractSpinButton
left - the first summand.right - the second summand.
left+right as an
instance of Number.
protected java.lang.Number max(java.lang.Number left,
java.lang.Number right)
com.tensegrity.gui.swing.control.spinbutton.AbstractSpinButtonMath.max(int, int) (or double, float, etc.) method.
left - the first value.right - the second value.
max(left,right) as an
instance of Number.
protected java.lang.Number min(java.lang.Number left,
java.lang.Number right)
com.tensegrity.gui.swing.control.spinbutton.AbstractSpinButtonMath.min(int, int) (or double, float, etc.) method.
left - the first value.right - the second value.
min(left,right) as an
instance of Number.public void addActionListener(java.awt.event.ActionListener listener)
listener - the listener of ActionEvents.public void removeListener(java.awt.event.ActionListener listener)
listener - the listener to remove.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerActionListener.actionPerformed(ActionEvent)public final void increaseValue()
AbstractSpinButton.setStep(Number). Internally method AbstractSpinButton.add(Number, Number)
is called, which must be defined by a subclass.
public final void decreaseValue()
AbstractSpinButton.setStep(Number). Internally method AbstractSpinButton.add(Number, Number)
is called, which must be defined by a subclass.
public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagerLayoutManager.addLayoutComponent(String, Component)public void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagerLayoutManager.layoutContainer(Container)public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerLayoutManager.minimumLayoutSize(Container)public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerLayoutManager.preferredLayoutSize(Container)public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagerLayoutManager.removeLayoutComponent(Component)public java.lang.Number getValue()
public void setValue(java.lang.Number value)
value - The value to setpublic void setMinimum(java.lang.Number minimum)
minimum - the new lower bound.public java.lang.Number getMinimum()
public void setMaximum(java.lang.Number maximum)
maximum - the new upper boundpublic java.lang.Number getMaximum()
public void setEnabled(boolean enabled)
JComponent.setEnabled(boolean)public java.lang.Number getStep()
public void setStep(java.lang.Number step)
step - The new step to set.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||