|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--com.klg.jclass.util.swing.AbstractSpinBox | +--com.klg.jclass.util.swing.JCSpinNumberBox
A spin box component whose spin arrows allow a user to increment or
decrement the contained Number
value by the specified
spinStep
amount.
Nested Class Summary | |
static class |
JCSpinNumberBox.Range
Public static class to pass in and out the allowable Range of
the value. |
Nested classes inherited from class com.klg.jclass.util.swing.AbstractSpinBox |
AbstractSpinBox.ArrowButton, AbstractSpinBox.MetalArrowButton, AbstractSpinBox.MetalBorder |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
static int |
FLOATING_POINT
|
protected NumberFormat |
format
|
static int |
INTEGER
|
protected Number |
max
|
protected Number |
min
|
protected int |
operation
|
protected Number |
step
|
Fields inherited from class com.klg.jclass.util.swing.AbstractSpinBox |
arrowKeySpinningAllowed, buttonTimer, continuousScroll, currentButton, DECREMENT, downArrow, editable, editor, editorIsValidateRoot, INCREMENT, l, metalBorder, minimumHeight, NONE, renderer, renderPanel, rl, upArrow, userFont, valueListeners, valueModel |
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 | |
JCSpinNumberBox()
|
Method Summary | |
protected void |
checkArrowButtons()
Abstract method that check if arrows should be enabled or disabled. |
protected int |
compare(Number n1,
Number n2)
Compares two numbers according to the operation value. |
protected String |
format(Number number)
Returns the String format for the specified number, conditional on the current operation. |
String |
getAbout()
Returns vendor information. |
Number |
getMaximumValue()
|
Number |
getMinimumValue()
|
NumberFormat |
getNumberFormat()
Returns the NumberFormat object used by the spinner to parse
and format numbers. |
int |
getOperation()
|
Number |
getSpinStep()
|
Number |
getValue()
|
protected Number |
parse(String string)
Returns a parsed value for the specified String, conditional on the current operation. |
protected int |
preferredWidthOfView()
Overrides the preferred width to make sure the width is big enough for the formatted max and min values. |
protected void |
processValueChanged(com.klg.jclass.util.value.JCValueEvent event)
This method can be overridded by the subclass |
void |
setAbout(String s)
Provided for Beans property editors - has no effect. |
void |
setNumberFormat(NumberFormat format)
Sets the NumberFormat object used by the spinner to parse and
format numbers. |
void |
setOperation(int operation)
|
void |
setSpinStep(Number step)
|
void |
setValue(Number value)
|
void |
setValue(Object o)
Set the value displayed by the spin box. |
void |
setValueRange(JCSpinNumberBox.Range range)
|
void |
setValueRange(Number min,
Number max)
|
protected Object |
spinDown()
Return the new value generated when spinning down a notch |
protected Object |
spinUp()
Return the new value generated when spinning up a notch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int INTEGER
public static final int FLOATING_POINT
protected int operation
protected NumberFormat format
protected Number step
protected Number max
protected Number min
Constructor Detail |
public JCSpinNumberBox()
Method Detail |
public void setOperation(int operation)
public int getOperation()
public void setAbout(String s)
s
- public String getAbout()
public void setSpinStep(Number step)
public Number getSpinStep()
public void setValue(Object o)
setValue
in class AbstractSpinBox
o
- The new valuepublic void setValue(Number value)
public Number getValue()
public void setValueRange(Number min, Number max)
public void setValueRange(JCSpinNumberBox.Range range)
public Number getMaximumValue()
public Number getMinimumValue()
public void setNumberFormat(NumberFormat format)
NumberFormat
object used by the spinner to parse and
format numbers.
format
- public NumberFormat getNumberFormat()
NumberFormat
object used by the spinner to parse
and format numbers.
NumberFormat
objectprotected void checkArrowButtons()
AbstractSpinBox
checkArrowButtons
in class AbstractSpinBox
AbstractSpinBox.setArrowEnabled(javax.swing.JButton, boolean)
protected String format(Number number)
number
- specified number
setOperation(int)
protected Number parse(String string)
string
-
setOperation(int)
protected int preferredWidthOfView()
preferredWidthOfView
in class AbstractSpinBox
protected Object spinUp()
AbstractSpinBox
spinUp
in class AbstractSpinBox
protected Object spinDown()
AbstractSpinBox
spinDown
in class AbstractSpinBox
protected void processValueChanged(com.klg.jclass.util.value.JCValueEvent event)
AbstractSpinBox
processValueChanged
in class AbstractSpinBox
protected int compare(Number n1, Number n2)
null
is
considered to be less than all non-null values.
n1
- n2
-
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |