|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.ScrollPaneAdjustable
Safe:
Field Summary | |
private AdjustmentListener |
adjustmentListener
|
private int |
blockIncrement
The amount by which the scrollbar value will change when going up or down by a page. |
private boolean |
isAdjusting
The adjusting status of the Scrollbar . |
private int |
maximum
The maximum value of this scrollbar. |
private int |
minimum
The minimum value of this scrollbar. |
private int |
orientation
Orientation of this scrollbar. |
private static String |
SCROLLPANE_ONLY
Error message for AWTError reported when one of
the public but unsupported methods is called. |
private static long |
serialVersionUID
JDK 1.1 serialVersionUID. |
private ScrollPane |
sp
The ScrollPane this object is a scrollbar of. |
private int |
unitIncrement
The amount by which the scrollbar value will change when going up or down by a line. |
private int |
value
The value of this scrollbar. |
private int |
visibleAmount
The size of the visible portion of this scrollbar. |
Fields inherited from interface java.awt.Adjustable |
HORIZONTAL, NO_ORIENTATION, VERTICAL |
Constructor Summary | |
(package private) |
ScrollPaneAdjustable(ScrollPane sp,
AdjustmentListener l,
int orientation)
Constructs a new object to represent specified scrollabar of the specified ScrollPane . |
Method Summary | |
void |
addAdjustmentListener(AdjustmentListener l)
Enabled: Adds the specified adjustment listener to receive adjustment events from this ScrollPaneAdjustable . |
AdjustmentListener[] |
getAdjustmentListeners()
Suppressed: Returns an array of all the adjustment listeners registered on this ScrollPaneAdjustable . |
int |
getBlockIncrement()
Enabled: |
int |
getMaximum()
Enabled: |
int |
getMinimum()
Enabled: |
int |
getOrientation()
Enabled: Returns the orientation of this scrollbar. |
int |
getUnitIncrement()
Enabled: |
int |
getValue()
Enabled: |
boolean |
getValueIsAdjusting()
Enabled: Returns true if the value is in the process of changing as a result of actions being taken by the user. |
int |
getVisibleAmount()
Enabled: |
private static void |
initIDs()
Initialize JNI field and method ids. |
String |
paramString()
Enabled: Returns a string representing the state of this scrollbar. |
void |
removeAdjustmentListener(AdjustmentListener l)
Enabled: Removes the specified adjustment listener so that it no longer receives adjustment events from this ScrollPaneAdjustable . |
void |
setBlockIncrement(int b)
Enabled: |
void |
setMaximum(int max)
Suppressed: This method should NOT be called by user code. |
void |
setMinimum(int min)
Suppressed: This method should NOT be called by user code. |
(package private) void |
setSpan(int min,
int max,
int visible)
This is called by the scrollpane itself to update the minimum , maximum and
visible values. |
void |
setUnitIncrement(int u)
Enabled: |
void |
setValue(int v)
Enabled: Sets the value of this scrollbar to the specified value. |
void |
setValueIsAdjusting(boolean b)
Enabled: Sets the valueIsAdjusting property. |
void |
setVisibleAmount(int v)
Suppressed: This method should NOT be called by user code. |
String |
toString()
Suppressed: Returns a string representation of this scrollbar and its values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private ScrollPane sp
ScrollPane
this object is a scrollbar of.
private int orientation
getOrientation()
,
java.awt.Adjustable#HORIZONTAL
,
java.awt.Adjustable#VERTICAL
private int value
value
should be greater than minimum
and less than maximum
getValue()
,
setValue(int)
private int minimum
ScrollPane
.
ATTN: In current implementation
minimum
is always 0
. This field can
only be altered via setSpan
method and
ScrollPane
always calls that method with
0
for the minimum. getMinimum
method
always returns 0
without checking this field.
getMinimum()
,
setSpan(int, int, int)
private int maximum
ScrollPane
.
getMaximum()
,
setSpan(int, int, int)
private int visibleAmount
ScrollPane
.
getVisibleAmount()
,
setSpan(int, int, int)
private transient boolean isAdjusting
Scrollbar
.
True if the value is in the process of changing as a result of
actions being taken by the user.
getValueIsAdjusting()
,
setValueIsAdjusting(boolean)
private int unitIncrement
getUnitIncrement()
,
setUnitIncrement(int)
private int blockIncrement
getBlockIncrement()
,
setBlockIncrement(int)
private AdjustmentListener adjustmentListener
private static final String SCROLLPANE_ONLY
AWTError
reported when one of
the public but unsupported methods is called.
private static final long serialVersionUID
Constructor Detail |
ScrollPaneAdjustable(ScrollPane sp, AdjustmentListener l, int orientation)
ScrollPane
.
Only ScrollPane creates instances of this class.
sp
- ScrollPane
l
- AdjustmentListener
to add upon creation.orientation
- specifies which scrollbar this object represents,
can be either Adjustable.HORIZONTAL
or Adjustable.VERTICAL
.Method Detail |
private static void initIDs()
void setSpan(int min, int max, int visible)
minimum
, maximum
and
visible
values. The scrollpane is the only one
that should be changing these since it is the source of these
values.
public int getOrientation()
getOrientation
in interface Adjustable
Adjustable.HORIZONTAL
or
Adjustable.VERTICAL
public void setMinimum(int min)
Adjustable
interface.
setMinimum
in interface Adjustable
min
- the minimum value
AWTError
- Always throws an error when called.public int getMinimum()
getMinimum
in interface Adjustable
public void setMaximum(int max)
Adjustable
interface.
setMaximum
in interface Adjustable
max
- the maximum value
AWTError
- Always throws an error when called.public int getMaximum()
getMaximum
in interface Adjustable
public void setUnitIncrement(int u)
setUnitIncrement
in interface Adjustable
u
- the unit incrementpublic int getUnitIncrement()
getUnitIncrement
in interface Adjustable
public void setBlockIncrement(int b)
setBlockIncrement
in interface Adjustable
b
- the block incrementpublic int getBlockIncrement()
getBlockIncrement
in interface Adjustable
public void setVisibleAmount(int v)
Adjustable
interface.
setVisibleAmount
in interface Adjustable
v
- the length of the indicator
AWTError
- Always throws an error when called.public int getVisibleAmount()
getVisibleAmount
in interface Adjustable
public void setValueIsAdjusting(boolean b)
valueIsAdjusting
property.
b
- new adjustment-in-progress statusgetValueIsAdjusting()
public boolean getValueIsAdjusting()
valueIsAdjusting
propertysetValueIsAdjusting(boolean)
public void setValue(int v)
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.
setValue
in interface Adjustable
v
- the new value of the scrollbarpublic int getValue()
getValue
in interface Adjustable
public void addAdjustmentListener(AdjustmentListener l)
ScrollPaneAdjustable
.
If l
is null
, no exception is thrown
and no action is performed.
addAdjustmentListener
in interface Adjustable
l
- the adjustment listener.removeAdjustmentListener(java.awt.event.AdjustmentListener)
,
getAdjustmentListeners()
,
java.awt.event.AdjustmentListener
,
java.awt.event.AdjustmentEvent
public void removeAdjustmentListener(AdjustmentListener l)
ScrollPaneAdjustable
.
If l
is null
, no exception is thrown
and no action is performed.
removeAdjustmentListener
in interface Adjustable
l
- the adjustment listener.addAdjustmentListener(java.awt.event.AdjustmentListener)
,
getAdjustmentListeners()
,
java.awt.event.AdjustmentListener
,
java.awt.event.AdjustmentEvent
public AdjustmentListener[] getAdjustmentListeners()
ScrollPaneAdjustable
.
ScrollPaneAdjustable
's
AdjustmentListener
s
or an empty array if no adjustment
listeners are currently registeredaddAdjustmentListener(java.awt.event.AdjustmentListener)
,
removeAdjustmentListener(java.awt.event.AdjustmentListener)
,
java.awt.event.AdjustmentListener
,
java.awt.event.AdjustmentEvent
public String toString()
toString
in class Object
public String paramString()
null
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |