|
| 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(ModelInterface model)
Attaches a model to the component. |
java.lang.Object |
clone()
Clones the component |
void |
detachModel(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(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 |
| Methods inherited from interface com.sas.ViewInterface |
|---|
getModelInterface, getViewInterfaceSupportInfo, removeInterfaceTraps, setModelInterface, setRequiredInterfaces, setViewInterfaceSupportInfo, supportsRequiredInterfaces, trapInterfaceEvents |
| 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 scrollbar| Method 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(ModelInterface model)
attachModel in interface ViewInterfaceattachModel in class ScrollbarVisualComponentmodel - model to attachViewInterface.attachModel(com.sas.ModelInterface)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface com.sas.PublicClonableclone in class ScrollbarVisualComponentjava.lang.CloneNotSupportedException - if the model attached to the component being cloned
will not allow the clone to attach.public void detachModel(ModelInterface model)
detachModel in interface ViewInterfacedetachModel in class ScrollbarVisualComponentmodel - Model to detachViewInterface.detachModel(com.sas.ModelInterface)public java.util.Vector getRequiredInterfaces()
getRequiredInterfaces in interface ViewInterfacegetRequiredInterfaces in class ScrollbarVisualComponentViewInterface.getRequiredInterfaces()public boolean isDefaultModelAttached()
isDefaultModelAttached in interface ViewDefaultModelInterfacepublic void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class ScrollbarVisualComponentevent - The event from the model indicating what property changedPropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)public void refresh(ModelInterface model)
refresh in interface ViewInterfacerefresh in class ScrollbarVisualComponentmodel - 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.AdjustablesetBlockIncrement in class java.awt.Scrollbarv - value of the block incrementpublic void setDefaultValues()
setDefaultValues in interface VisualInterfacesetDefaultValues in interface ComponentInterfacesetDefaultValues in class ScrollbarVisualComponentComponentInterface.setDefaultValues()public void setMaximum(int newMaximum)
setMaximum in interface java.awt.AdjustablesetMaximum in class java.awt.ScrollbarnewMaximum - maximum valuepublic void setMinimum(int newMinimum)
setMinimum in interface java.awt.AdjustablesetMinimum in class java.awt.ScrollbarnewMinimum - minimum valuepublic void setOrientation(int orientation)
setOrientation in class java.awt.Scrollbarorientation - orientation (horizontal or vertical) of the Scrollbarpublic void setUnitIncrement(int v)
setUnitIncrement in interface java.awt.AdjustablesetUnitIncrement in class java.awt.Scrollbarv - value of the unit incrementpublic void setValue(int newValue)
setValue in interface java.awt.AdjustablesetValue in class java.awt.ScrollbarnewValue - new value of the Scrollbar.
public void setValues(int value,
int visible,
int minimum,
int maximum)
setValues in class java.awt.Scrollbarvalue - valuevisible - size of the scrollbar thumbminimum - minimum valuemaximum - maximum valuepublic void setVisibleAmount(int newAmount)
setVisibleAmount in interface java.awt.AdjustablesetVisibleAmount in class java.awt.ScrollbarnewAmount - size of the scrollbar thumb
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||