|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.awt.Scrollbar
public class Scrollbar
Scrollbar is a component that can scroll through a range of integer
values. The minimum and maximum range values can be specified during the
construction of the scrollbar. If not specified, the default minimum value is 0
and the default maximum value is 100. The value is the current value and can be
specified during construction. If not specified, the default value is 0.
The visibleAmount is the amount that is visible of the scrollbar thumb.
The visibleAmount can be specified during construction of the scrollbar.
If not specified, the default visibleAmount is 10.
The scrollbar can be oriented either vertically or horizontally.
The orientation can be specified during the construction of the scrollbar.
If not specified, the default orientation is vertical.
Creation:
Scrollbar scrollbar1 = new Scrollbar();
scrollbar1.initialize();
Scrollbar scrollbar1 = new Scrollbar(orientation);
scrollbar1.initialize();
Scrollbar scrollbar1 = new Scrollbar(orientation, value, visible, minimum, maximum);
scrollbar1.initialize();
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
Constructor Summary | |
---|---|
Scrollbar()
Default constructor |
|
Scrollbar(int orientation)
Create a scrollbar with the specified orientation |
|
Scrollbar(int orientation,
int value,
int visible,
int minimum,
int maximum)
Create a scrollbar with the specified orientation, value, visibleAmount, minimum, and maximum |
Method Summary | |
---|---|
void |
attachModel(com.sas.ModelInterface model)
Attaches a model to the component. |
java.lang.Object |
clone()
Clones the component |
void |
detachModel(com.sas.ModelInterface model)
Detaches the current model and attaches the default model if the model is set to null |
static int |
getDefaultHeight()
Returns the default height for instances of this class |
static int |
getDefaultWidth()
Returns the default width for instances of this class |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns the ExtendedBeanInfo for this class. |
java.util.Vector |
getRequiredInterfaces()
Returns the required interfaces Vector for this component. |
boolean |
isDefaultModelAttached()
Returns whether the default model is attached. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Processes a PropertyChangeEvent sent by the model. |
void |
refresh(com.sas.ModelInterface model)
Sets properties (blockIncrement, maximum, minimum, unitIncrement, value and visibleAmount) with the values obtained from the attached model |
void |
refreshBlockIncrement()
Sets the blockIncrement based on the model value for blockIncrement. |
void |
refreshMaximum()
Sets the maximum based on the model value for maximum. |
void |
refreshMinimum()
Sets the minimum based on the model value for minimum. |
void |
refreshUnitIncrement()
Sets the unitIncrement based on the model value for unitIncrement. |
void |
refreshValue()
Sets the value based on the model value. |
void |
setBlockIncrement(int v)
Sets the block increment. |
static void |
setDefaultHeight(int newDefaultHeight)
Sets the default height of the component. |
void |
setDefaultValues()
Sets the initial values to the default values. |
static void |
setDefaultWidth(int newDefaultWidth)
Sets the default width of the component. |
void |
setMaximum(int newMaximum)
Sets the maximum value |
void |
setMinimum(int newMinimum)
Sets the minimum value |
void |
setOrientation(int orientation)
Sets the orientation of the Scrollbar |
void |
setUnitIncrement(int v)
Sets the unit increment. |
void |
setValue(int newValue)
Sets the value to the specified value. |
void |
setValues(int value,
int visible,
int minimum,
int maximum)
Sets the values for the Scrollbar. |
void |
setVisibleAmount(int newAmount)
Sets the visible amount to the specified value |
Field Detail |
---|
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public Scrollbar()
public Scrollbar(int orientation)
orientation
- an integer that specifies the orientation of the
scrollbar (Scrollbar.HORIZONTAL = horizontal, Scrollbar.VERTICAL = vertical)public Scrollbar(int orientation, int value, int visible, int minimum, int maximum)
orientation
- an integer that specifies the orientation of the
scrollbar (Scrollbar.HORIZONTAL = horizontal, Scrollbar.VERTICAL = vertical)value
- an integer that is the current value of the scrollbarvisible
- an integer that specifies the amount that is visible of the
scrollbar thumbminimum
- is an integer that specifies the minimum value of the scrollbarmaximum
- is an integer that specifies the maximum value of the scrollbarMethod Detail |
---|
public static int getDefaultWidth()
setDefaultWidth(int)
public static void setDefaultWidth(int newDefaultWidth)
newDefaultWidth
- the new default width in pixelsgetDefaultWidth()
public static int getDefaultHeight()
setDefaultHeight(int)
public static void setDefaultHeight(int newDefaultHeight)
newDefaultHeight
- the new default height in pixelsgetDefaultHeight()
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public void attachModel(com.sas.ModelInterface model)
attachModel
in interface com.sas.ViewInterface
attachModel
in class ScrollbarVisualComponent
model
- model to attachViewInterface.attachModel(com.sas.ModelInterface)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface com.sas.PublicClonable
clone
in class ScrollbarVisualComponent
java.lang.CloneNotSupportedException
- if the model attached to the component being cloned
will not allow the clone to attach.public void detachModel(com.sas.ModelInterface model)
detachModel
in interface com.sas.ViewInterface
detachModel
in class ScrollbarVisualComponent
model
- Model to detachViewInterface.detachModel(com.sas.ModelInterface)
public java.util.Vector getRequiredInterfaces()
getRequiredInterfaces
in interface com.sas.ViewInterface
getRequiredInterfaces
in class ScrollbarVisualComponent
ViewInterface.getRequiredInterfaces()
public boolean isDefaultModelAttached()
isDefaultModelAttached
in interface com.sas.ViewDefaultModelInterface
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class ScrollbarVisualComponent
event
- The event from the model indicating what property changedPropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public void refresh(com.sas.ModelInterface model)
refresh
in interface com.sas.ViewInterface
refresh
in class ScrollbarVisualComponent
model
- attached modelViewInterface.refresh(com.sas.ModelInterface)
public void refreshBlockIncrement()
public void refreshMaximum()
public void refreshMinimum()
public void refreshUnitIncrement()
public void refreshValue()
public void setBlockIncrement(int v)
setBlockIncrement
in interface java.awt.Adjustable
setBlockIncrement
in class java.awt.Scrollbar
v
- value of the block incrementpublic void setDefaultValues()
setDefaultValues
in interface VisualInterface
setDefaultValues
in interface com.sas.ComponentInterface
setDefaultValues
in class ScrollbarVisualComponent
ComponentInterface.setDefaultValues()
public void setMaximum(int newMaximum)
setMaximum
in interface java.awt.Adjustable
setMaximum
in class java.awt.Scrollbar
newMaximum
- maximum valuepublic void setMinimum(int newMinimum)
setMinimum
in interface java.awt.Adjustable
setMinimum
in class java.awt.Scrollbar
newMinimum
- minimum valuepublic void setOrientation(int orientation)
setOrientation
in class java.awt.Scrollbar
orientation
- orientation (horizontal or vertical) of the Scrollbarpublic void setUnitIncrement(int v)
setUnitIncrement
in interface java.awt.Adjustable
setUnitIncrement
in class java.awt.Scrollbar
v
- value of the unit incrementpublic void setValue(int newValue)
setValue
in interface java.awt.Adjustable
setValue
in class java.awt.Scrollbar
newValue
- new value of the Scrollbar.public void setValues(int value, int visible, int minimum, int maximum)
setValues
in class java.awt.Scrollbar
value
- valuevisible
- size of the scrollbar thumbminimum
- minimum valuemaximum
- maximum valuepublic void setVisibleAmount(int newAmount)
setVisibleAmount
in interface java.awt.Adjustable
setVisibleAmount
in class java.awt.Scrollbar
newAmount
- size of the scrollbar thumb
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |