|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Scrollbar
|
+--nl.skybound.awt.FloatScrollbar
Descendent of Scrollbar that supports floats as well as ints. To get float values, call the appropriate get...AsFloat() methods. To set float values, call the overloaded Scrollbar methods that accept float values as parameters (make sure you're actually using floats and not ints or else you'll be calling the standard Scrollbar methods).
Scrollbar, Serialized Form| Inner classes inherited from class java.awt.Scrollbar |
java.awt.Scrollbar.AccessibleAWTScrollBar |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Fields inherited from class java.awt.Scrollbar |
HORIZONTAL, VERTICAL |
| 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 | |
FloatScrollbar()
|
|
FloatScrollbar(int orientation,
float value,
float visible,
float minimum,
float maximum,
byte decimals)
Constructs a new scroll bar with the specified orientation, initial value, page size, minimum and maximum values, and decimal precision. |
|
| Method Summary | |
float |
getBlockIncrementAsFloat()
Gets the block increment of this scroll bar. |
java.lang.Number |
getCurrentAccessibleValue()
Get the accessible value of this object. |
byte |
getDecimals()
Gets the decimal precision of this scroll bar. |
java.lang.Number |
getMaximumAccessibleValue()
Get the maximum accessible value of this object. |
float |
getMaximumAsFloat()
Gets the maximum value of this scroll bar. |
java.lang.Number |
getMinimumAccessibleValue()
Get the minimum accessible value of this object. |
float |
getMinimumAsFloat()
Gets the minimum value of this scroll bar. |
float |
getUnitIncrementAsFloat()
Gets the unit increment for this scrollbar. |
float |
getValueAsFloat()
Gets the current float value of this scroll bar. |
float |
getVisibleAmountAsFloat()
Gets the visible amount of this scroll bar. |
void |
setBlockIncrement(float v)
Sets the block increment for this scroll bar. |
boolean |
setCurrentAccessibleValue(java.lang.Number n)
Set the value of this object as a Number. |
void |
setDecimals(byte newValue)
Sets the decimal precision of this scroll bar to the specified byte value. |
void |
setMaximum(float newMaximum)
Sets the maximum value of this scroll bar. |
void |
setMinimum(float newMinimum)
Sets the minimum value of this scroll bar. |
void |
setUnitIncrement(float v)
Sets the unit increment for this scroll bar. |
void |
setValue(float newValue)
Sets the value of this scroll bar to the specified float value. |
void |
setValues(float value,
float visible,
float minimum,
float maximum,
byte decimals)
Sets the values of four properties for this scroll bar. |
void |
setVisibleAmount(float newAmount)
Sets the visible amount of this scroll bar. |
| Methods inherited from class java.awt.Scrollbar |
addAdjustmentListener, addNotify, getAccessibleContext, getBlockIncrement, getLineIncrement, getListeners, getMaximum, getMinimum, getOrientation, getPageIncrement, getUnitIncrement, getValue, getVisible, getVisibleAmount, paramString, processAdjustmentEvent, processEvent, removeAdjustmentListener, setBlockIncrement, setLineIncrement, setMaximum, setMinimum, setOrientation, setPageIncrement, setUnitIncrement, setValue, setValues, setVisibleAmount |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FloatScrollbar()
public FloatScrollbar(int orientation,
float value,
float visible,
float minimum,
float maximum,
byte decimals)
The decimals argument must be >= 0 and <= 9. If you're using 0,
consider using the standard Scrollbar instead.
orientation - indicates the orientation of the scroll bar.value - the initial value of the scroll bar.visible - the size of the scroll bar's bubble, representing
the visible portion; the scroll bar uses this
value when paging up or down by a page.minimum - the minimum value of the scroll bar.maximum - the maximum value of the scroll bar.decimals - the number of decimal digits after the decimal seperator (precision). *Scrollbar| Method Detail |
public float getValueAsFloat()
getMinimumAsFloat(),
getMaximumAsFloat()public void setValue(float newValue)
If the value supplied is less than the current minimum or greater than the current maximum, then one of those values is substituted, as appropriate.
Normally, a program should change a scroll bar's
value only by calling setValues.
The setValues method simultaneously
and synchronously sets the minimum, maximum, visible amount,
and value properties of a scroll bar, so that they are
mutually consistent.
newValue - the new value of the scroll bar.setValues(float, float, float, float, byte),
getValueAsFloat(),
getMinimumAsFloat(),
getMaximumAsFloat()public float getMinimumAsFloat()
getValueAsFloat(),
getMaximumAsFloat()public void setMinimum(float newMinimum)
Normally, a program should change a scroll bar's minimum
value only by calling setValues.
The setValues method simultaneously
and synchronously sets the minimum, maximum, visible amount,
and value properties of a scroll bar, so that they are
mutually consistent.
newMinimum - the new minimum value for this scroll bar.setValues(float, float, float, float, byte),
setMaximum(float)public float getMaximumAsFloat()
getValueAsFloat(),
getMinimumAsFloat()public void setMaximum(float newMaximum)
Normally, a program should change a scroll bar's maximum
value only by calling setValues.
The setValues method simultaneously
and synchronously sets the minimum, maximum, visible amount,
and value properties of a scroll bar, so that they are
mutually consistent.
newMaximum - the new maximum value for this scroll bar.setValues(float, float, float, float, byte),
setMinimum(float)public float getVisibleAmountAsFloat()
The visible amount of a scroll bar is the range of values represented by the width of the scroll bar's bubble. It is used to determine the scroll bar's block increment.
setVisibleAmount(float)public void setVisibleAmount(float newAmount)
The visible amount of a scroll bar is the range of values represented by the width of the scroll bar's bubble. It is used to determine the scroll bar's block increment.
Normally, a program should change a scroll bar's
value only by calling setValues.
The setValues method simultaneously
and synchronously sets the minimum, maximum, visible amount,
and value properties of a scroll bar, so that they are
mutually consistent.
newAmount - the amount visible per page.getVisibleAmountAsFloat(),
setValues(float, float, float, float, byte)public void setUnitIncrement(float v)
The unit increment is the value that is added (subtracted) when the user activates the unit increment area of the scroll bar, generally through a mouse or keyboard gesture that the scroll bar receives as an adjustment event.
v - the amount by which to increment or decrement
the scroll bar's value.getUnitIncrementAsFloat()public float getUnitIncrementAsFloat()
The unit increment is the value that is added (subtracted) when the user activates the unit increment area of the scroll bar, generally through a mouse or keyboard gesture that the scroll bar receives as an adjustment event.
setUnitIncrement(float)public void setBlockIncrement(float v)
The block increment is the value that is added (subtracted) when the user activates the block increment area of the scroll bar, generally through a mouse or keyboard gesture that the scroll bar receives as an adjustment event.
v - the amount by which to increment or decrement
the scroll bar's value.getBlockIncrementAsFloat()public float getBlockIncrementAsFloat()
The block increment is the value that is added (subtracted) when the user activates the block increment area of the scroll bar, generally through a mouse or keyboard gesture that the scroll bar receives as an adjustment event.
setBlockIncrement(float)
public void setValues(float value,
float visible,
float minimum,
float maximum,
byte decimals)
This method simultaneously and synchronously sets the values of four scroll bar properties, assuring that the values of these properties are mutually consistent. It enforces the constraints that maximum cannot be less than minimum, and that value cannot be less than the minimum or greater than the maximum.
value - is the position in the current window.visible - is the amount visible per page.minimum - is the minimum value of the scroll bar.maximum - is the maximum value of the scroll bar.decimals - is the decimal precision to be used. Defaut 0 == no decimals.public void setDecimals(byte newValue)
If the value supplied is less than 0 then an IllegalArgumentException is thrown. Try to keep the value as small as possible because the higher the decimal value, the smaller the maximum possible integer value.
newValue - the new value of the scroll bar.getDecimals()public byte getDecimals()
setDecimals(byte)public java.lang.Number getCurrentAccessibleValue()
public boolean setCurrentAccessibleValue(java.lang.Number n)
public java.lang.Number getMinimumAccessibleValue()
public java.lang.Number getMaximumAccessibleValue()
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||