All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.JScrollBar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.swing.JComponent
|
+----java.awt.swing.JScrollBar
- public class JScrollBar
- extends JComponent
- implements ChangeListener, Adjustable, Accessible
An implementation of a Scrollbar
blockIncrement-
model-
orientation-
ui-
unitIncrement-
JScrollBar()
-
JScrollBar(int)
-
JScrollBar(int, int, int, int, int)
-
addAdjustmentListener(AdjustmentListener)
-
fireAdjustmentValueChanged(AdjustmentEvent)
-
getAccessibleRole()
- Get the role of this object.
getAccessibleStateSet()
- Get the state set of this object.
getAccessibleValue()
- Get the accessible value of this object.
getBlockIncrement()
-
getBlockIncrement(int)
-
getMaximum()
-
getMaximumAccessibleValue()
- Get the maximum accessible value of this object.
getMaximumSize()
- The scrollbar is flexible along it's scrolling axis and
rigid along the other axis.
getMinimum()
-
getMinimumAccessibleValue()
- Get the minimum accessible value of this object.
getMinimumSize()
- The scrollbar is flexible along it's scrolling axis and
rigid along the other axis.
getModel()
-
getOrientation()
-
getUI()
-
getUIClassID()
-
getUnitIncrement()
-
getUnitIncrement(int)
-
getValue()
-
getValueIsAdjusting()
-
getVisibleAmount()
-
isOpaque()
- Returns true if this component is completely opaque.
removeAdjustmentListener(AdjustmentListener)
-
setAccessibleValue(Number)
- Set the value of this object as a Number.
setBlockIncrement(int)
-
setEnabled(boolean)
- Enables or disables this component, depending on the value of the
parameter
b
.
setMaximum(int)
-
setMinimum(int)
-
setModel(BoundedRangeModel)
-
setOrientation(int)
-
setUnitIncrement(int)
-
setValue(int)
-
setValueIsAdjusting(boolean)
-
setValues(int, int, int, int)
- Ensures that the model is always in a consistent state by enforcing
the following constraints.
setVisibleAmount(int)
-
stateChanged(ChangeEvent)
- Implemented for the ChangeListener interface support.
toString()
- Returns a string representation of this component and its values.
updateUI()
- Notification from the UIFactory that the L&F
has changed.
ui
protected ScrollBarUI ui
model
protected BoundedRangeModel model
orientation
protected int orientation
unitIncrement
protected int unitIncrement
blockIncrement
protected int blockIncrement
JScrollBar
public JScrollBar()
JScrollBar
public JScrollBar(int orientation)
JScrollBar
public JScrollBar(int orientation,
int value,
int extent,
int minimum,
int maximum)
getOrientation
public int getOrientation()
getUnitIncrement
public int getUnitIncrement(int direction)
getBlockIncrement
public int getBlockIncrement(int direction)
getUnitIncrement
public int getUnitIncrement()
getBlockIncrement
public int getBlockIncrement()
getValue
public int getValue()
getVisibleAmount
public int getVisibleAmount()
getMinimum
public int getMinimum()
getMaximum
public int getMaximum()
getValueIsAdjusting
public boolean getValueIsAdjusting()
setOrientation
public void setOrientation(int n)
setUnitIncrement
public void setUnitIncrement(int n)
setBlockIncrement
public void setBlockIncrement(int n)
setValue
public void setValue(int n)
setVisibleAmount
public void setVisibleAmount(int n)
setMinimum
public void setMinimum(int n)
setMaximum
public void setMaximum(int n)
setValueIsAdjusting
public void setValueIsAdjusting(boolean b)
updateUI
public void updateUI()
- Notification from the UIFactory that the L&F
has changed.
- Overrides:
- updateUI in class JComponent
getUIClassID
public String getUIClassID()
- Returns:
- "ScrollBarUI"
- Overrides:
- getUIClassID in class JComponent
- See Also:
- getUIClassID, getUI
setValues
public void setValues(int newValue,
int newExtent,
int newMinimum,
int newMaximum)
- Ensures that the model is always in a consistent state by enforcing
the following constraints.
minimum < maximum
minimum <= value
extent >= 1
value <= maximum - extent
If neccessary we change newValue and newExtent, newExtent is
forced to be greater than 0.
addAdjustmentListener
public void addAdjustmentListener(AdjustmentListener l)
removeAdjustmentListener
public void removeAdjustmentListener(AdjustmentListener l)
fireAdjustmentValueChanged
protected void fireAdjustmentValueChanged(AdjustmentEvent e)
stateChanged
public void stateChanged(ChangeEvent e)
- Implemented for the ChangeListener interface support.
Forwards the event to any adjustmentListeners
getModel
public BoundedRangeModel getModel()
setModel
public void setModel(BoundedRangeModel newModel)
getUI
public ScrollBarUI getUI()
getMinimumSize
public Dimension getMinimumSize()
- The scrollbar is flexible along it's scrolling axis and
rigid along the other axis.
- Overrides:
- getMinimumSize in class JComponent
getMaximumSize
public Dimension getMaximumSize()
- The scrollbar is flexible along it's scrolling axis and
rigid along the other axis.
- Overrides:
- getMaximumSize in class JComponent
setEnabled
public void setEnabled(boolean x)
- Enables or disables this component, depending on the value of the
parameter
b
.
- Overrides:
- setEnabled in class Component
toString
public String toString()
- Returns a string representation of this component and its values.
- Overrides:
- toString in class Component
isOpaque
public boolean isOpaque()
- Returns true if this component is completely opaque.
- Overrides:
- isOpaque in class JComponent
getAccessibleStateSet
public AccessibleStateSet getAccessibleStateSet()
- Get the state set of this object.
- Returns:
- an instance of AccessibleState containing the current state
of the object
- Overrides:
- getAccessibleStateSet in class JComponent
- See Also:
- AccessibleState
getAccessibleRole
public AccessibleRole getAccessibleRole()
- Get the role of this object.
- Returns:
- an instance of AccessibleRole describing the role of the object
- Overrides:
- getAccessibleRole in class JComponent
getAccessibleValue
public Number getAccessibleValue()
- Get the accessible value of this object.
- Returns:
- The current value of this object.
- Overrides:
- getAccessibleValue in class JComponent
setAccessibleValue
public boolean setAccessibleValue(Number n)
- Set the value of this object as a Number.
- Returns:
- True if the value was set.
- Overrides:
- setAccessibleValue in class JComponent
getMinimumAccessibleValue
public Number getMinimumAccessibleValue()
- Get the minimum accessible value of this object.
- Returns:
- The minimum value of this object.
- Overrides:
- getMinimumAccessibleValue in class JComponent
getMaximumAccessibleValue
public Number getMaximumAccessibleValue()
- Get the maximum accessible value of this object.
- Returns:
- The maximum value of this object.
- Overrides:
- getMaximumAccessibleValue in class JComponent
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature