|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.visuals.Scrollbar
public class Scrollbar
Scrollbar is a class that creates a lightweight scrollbar.
This scrollbar has default behavior similar to the java.awt.Scrollbar.
It supports a com.sas.models.BoundedNumberInterface model, and uses a
com.sas.models.BoundedLong model by default.
Notes:
ScrollSlider
,
ArrowButton
,
Serialized FormField Summary | |
---|---|
protected java.awt.event.AdjustmentListener |
adjustmentListener
|
protected ArrowButton |
downArrow
|
protected ScrollSlider |
trackArea
|
protected ArrowButton |
upArrow
|
Fields inherited from class com.sas.visuals.CompositeContainer |
---|
RB_KEY |
Constructor Summary | |
---|---|
Scrollbar()
Default constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
java.awt.event.ActionListener method to handle ActionEvents that the Scrollbar listens for. |
void |
addAdjustmentListener(java.awt.event.AdjustmentListener l)
Add a listener to receive adjustment events when the value of the ScrollBar changes. |
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
java.awt.event.AdjustmentListener method to handle AdjustmentEvents that the Scrollbar listens for. |
void |
attachModel(com.sas.ModelInterface model)
Attaches the specified model to the Scrollbar. |
void |
detachModel(com.sas.ModelInterface model)
Detaches the specified model from the Scrollbar. |
int |
getBlockIncrement()
Get the integer value of the blockIncrement property. |
java.lang.Number |
getBlockIncrementNumber()
Get the blockIncrement number based on the model. |
static int |
getDefaultHeight()
Return the default height |
static int |
getDefaultWidth()
Return the default width |
long |
getDelay()
Return the amount of delay before the scrollbar begins to powerscroll. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
|
int |
getMaximum()
Get the value of the maximum property. |
java.lang.Number |
getMaximumNumber()
Get the maximum bounds number based on the model. |
int |
getMinimum()
Get the value of the minimum property. |
java.lang.Number |
getMinimumNumber()
Get the minimum bounds number based on the model. |
int |
getMinimumThumbHeight()
Get the minimum pixel height of the thumb area. |
com.sas.ModelInterface |
getModelInterface()
Get the connected model. |
java.lang.Number |
getNumberValue()
Get the value number based on the model. |
int |
getOrientation()
Get the orientation of the scrollbar. |
java.util.Vector |
getRequiredInterfaces()
Returns the required interfaces Vector for this component. |
com.sas.util.transforms.TransformInterface |
getRoundNumberTransform()
Get the transform used to round the numberValue set when the thumb area of the slider is dragged. |
int |
getUnitIncrement()
Get the value of the unitIncrement property. |
java.lang.Number |
getUnitIncrementNumber()
Get the unitIncrement number based on the model. |
int |
getValue()
Get the integer value of the value property. |
int |
getVisibleAmount()
Get the integer value of the visible amount of the thumb. |
java.lang.Number |
getVisibleAmountNumber()
Get the Number value of the visible amount of the thumb. |
java.lang.Number |
incrementBy(int increment,
int incrementType)
Increment, by unit or block increment amount, the current value by the specified number of increments. |
boolean |
isMaximumReachable()
Returns if the thumb area can drag the value to the maximum. |
protected void |
processAdjustmentEvent(java.awt.event.AdjustmentEvent e)
Process adjustment events. |
protected void |
processEvent(java.awt.AWTEvent e)
Process events. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
java.beans.PropertyChangeListener method to handle PropertyChangeEvents that the Scrollbar listens for. |
void |
refresh(com.sas.ModelInterface model)
Refresh the Scrollbar based on its model. |
void |
removeAdjustmentListener(java.awt.event.AdjustmentListener l)
Remove the adjustment listener. |
void |
setBlockIncrement(int block)
Set the integer value of the blockIncrement property. |
void |
setBlockIncrementNumber(java.lang.Number block)
Set the blockIncrement number. |
static void |
setDefaultHeight(int newDefaultHeight)
Set the default height |
void |
setDefaultValues()
Set the default values for the properties of the Scrollbar. |
static void |
setDefaultWidth(int newDefaultWidth)
Set the default width |
void |
setDelay(long delay)
Set the amount of delay before the scrollbar begins to powerscroll. |
void |
setEnabled(boolean enabled)
Set the enabled state of the Scrollbar. |
void |
setMaximum(int max)
Set the integer value of the maximum bounds. |
void |
setMaximumNumber(java.lang.Number max)
Set the maximum bounds number. |
void |
setMaximumReachable(boolean reachable)
Set whether the thumb area can drag the value to the maximum. |
void |
setMinimum(int min)
Set the integer value of the minimum property. |
void |
setMinimumNumber(java.lang.Number min)
Set the minimum bounds number. |
void |
setMinimumThumbHeight(int minThumb)
Set the minimum pixel height of the thumb area. |
void |
setModelInterface(com.sas.ModelInterface model)
Set the connected model. |
void |
setNumberValue(java.lang.Number newValue)
Set the number value. |
void |
setOrientation(int orient)
Set the orientation of the scrollbar. |
void |
setRoundNumberTransform(com.sas.util.transforms.TransformInterface transform)
Set the transform used to round the numberValue set when the thumb area of the slider is dragged. |
void |
setUnitIncrement(int unit)
Set the integer value of the unitIncrement for the Scrollbar. |
void |
setUnitIncrementNumber(java.lang.Number unit)
Set the unitIncrement number. |
void |
setValue(int newValue)
Set the integer value of the value property. |
void |
setVisibleAmount(int amt)
Set the integer value of the visible amount of the thumb. |
void |
setVisibleAmountNumber(java.lang.Number amt)
Set the Number value of the visible amount of the thumb. |
Methods inherited from interface com.sas.awt.ContainerInterface |
---|
getComponents, getLayout, invalidate, setLayout, validate |
Field Detail |
---|
protected ArrowButton upArrow
protected ArrowButton downArrow
protected ScrollSlider trackArea
protected transient java.awt.event.AdjustmentListener adjustmentListener
Constructor Detail |
---|
public Scrollbar()
Method Detail |
---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public static int getDefaultWidth()
public static void setDefaultWidth(int newDefaultWidth)
newDefaultWidth
- the new default widthpublic static int getDefaultHeight()
public static void setDefaultHeight(int newDefaultHeight)
newDefaultHeight
- the new default heightpublic long getDelay()
public void setDelay(long delay)
delay
- the delay before holding down the mouse button will cause the value to scroll automatically.public java.util.Vector getRequiredInterfaces()
getRequiredInterfaces
in interface com.sas.ViewInterface
getRequiredInterfaces
in class ContainerVisualComponent
ViewInterface.getRequiredInterfaces()
public int getOrientation()
getOrientation
in interface java.awt.Adjustable
public void setOrientation(int orient)
orient
- the orientation of the scrollbarpublic java.lang.Number getVisibleAmountNumber()
public void setVisibleAmountNumber(java.lang.Number amt)
amt
- the value of the visible amount of the Scrollbar thumb.public int getVisibleAmount()
getVisibleAmount
in interface java.awt.Adjustable
public void setVisibleAmount(int amt)
setVisibleAmount
in interface java.awt.Adjustable
amt
- the value of the visible amount of the Scrollbar thumb.public void setDefaultValues()
setDefaultValues
in interface ContainerInterface
setDefaultValues
in interface VisualInterface
setDefaultValues
in interface com.sas.ComponentInterface
setDefaultValues
in class CompositeContainer
ContainerInterface.setDefaultValues()
public void setEnabled(boolean enabled)
setEnabled
in interface VisualInterface
setEnabled
in class ContainerVisualComponent
enabled
- if false the thumb is hidden and the arrow buttons are grayed out, otherwise
the scrollbar behaves normally.VisualInterface.setEnabled(boolean)
public void addAdjustmentListener(java.awt.event.AdjustmentListener l)
addAdjustmentListener
in interface java.awt.Adjustable
l
- the adjustment listenerAdjustable.addAdjustmentListener(java.awt.event.AdjustmentListener)
,
AdjustmentEvent
public void removeAdjustmentListener(java.awt.event.AdjustmentListener l)
removeAdjustmentListener
in interface java.awt.Adjustable
l
- the adjustment listeneraddAdjustmentListener(java.awt.event.AdjustmentListener)
,
AdjustmentEvent
public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged
in interface java.awt.event.AdjustmentListener
e
- the AdjustmentEvent to handlepublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- the ActionEvent to handlepublic void attachModel(com.sas.ModelInterface model)
attachModel
in interface com.sas.ViewInterface
attachModel
in class ContainerVisualComponent
model
- the model to attach toViewInterface.attachModel(com.sas.ModelInterface)
public void detachModel(com.sas.ModelInterface model)
detachModel
in interface com.sas.ViewInterface
detachModel
in class ContainerVisualComponent
model
- the model to detach fromViewInterface.detachModel(com.sas.ModelInterface)
public com.sas.ModelInterface getModelInterface()
getModelInterface
in interface com.sas.ViewInterface
getModelInterface
in class ContainerVisualComponent
ViewInterface.getModelInterface()
public void setModelInterface(com.sas.ModelInterface model)
setModelInterface
in interface com.sas.ViewInterface
setModelInterface
in class ContainerVisualComponent
model
- the new model for the ScrollbarViewInterface.setModelInterface(com.sas.ModelInterface)
public void refresh(com.sas.ModelInterface model)
refresh
in interface com.sas.ViewInterface
refresh
in class ContainerVisualComponent
model
- Model that has just been updatedViewInterface.refresh(com.sas.ModelInterface)
public java.lang.Number incrementBy(int increment, int incrementType)
incrementBy
in interface com.sas.models.IncrementInterface
increment
- The number of incrementType(unit or block) amounts to increment
the current value(can be negative to decrement value).incrementType
- UNIT to increment by the unit amount;
BLOCK to increment by the block amountprotected void processEvent(java.awt.AWTEvent e)
processEvent
in class java.awt.Container
protected void processAdjustmentEvent(java.awt.event.AdjustmentEvent e)
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class ContainerVisualComponent
event
- the PropertyChangeEvent to handlePropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public final int getBlockIncrement()
getBlockIncrement
in interface java.awt.Adjustable
setBlockIncrement(int)
public final int getMaximum()
getMaximum
in interface java.awt.Adjustable
setMaximum(int)
public final int getMinimum()
getMinimum
in interface java.awt.Adjustable
setMinimum(int)
public final int getUnitIncrement()
getUnitIncrement
in interface java.awt.Adjustable
setUnitIncrement(int)
public final int getValue()
getValue
in interface java.awt.Adjustable
setValue(int)
public final void setBlockIncrement(int block)
setBlockIncrement
in interface java.awt.Adjustable
blockIncrement
- the new value of the blockIncrement property.getBlockIncrement()
public boolean isMaximumReachable()
public void setMaximumReachable(boolean reachable)
reachable
- set whether the thumb value can reach the maximum.public final void setMaximum(int max)
setMaximum
in interface java.awt.Adjustable
max
- the new value of the maximum bounds.getMaximum()
public final void setMinimum(int min)
setMinimum
in interface java.awt.Adjustable
min
- the new value of the minimum bounds.getMinimum()
public int getMinimumThumbHeight()
public void setMinimumThumbHeight(int minThumb)
minThumb
- the minimum pixel height of the thumb area.public com.sas.util.transforms.TransformInterface getRoundNumberTransform()
public void setRoundNumberTransform(com.sas.util.transforms.TransformInterface transform)
transform
- the transform used to round the numberValue set when the slider is draggedpublic final void setUnitIncrement(int unit)
setUnitIncrement
in interface java.awt.Adjustable
unit
- the amount the value is incremented/decremented when
the Scrollbar is triggered.getUnitIncrement()
public final void setValue(int newValue)
setValue
in interface java.awt.Adjustable
newValue
- the new value of the Scrollbar.getValue()
public java.lang.Number getUnitIncrementNumber()
getUnitIncrementNumber
in interface com.sas.models.IncrementInterface
setUnitIncrementNumber(java.lang.Number)
public java.lang.Number getBlockIncrementNumber()
getBlockIncrementNumber
in interface com.sas.models.IncrementInterface
setBlockIncrementNumber(java.lang.Number)
public java.lang.Number getMaximumNumber()
setMaximumNumber(java.lang.Number)
public java.lang.Number getMinimumNumber()
setMinimumNumber(java.lang.Number)
public java.lang.Number getNumberValue()
setNumberValue(java.lang.Number)
public void setMaximumNumber(java.lang.Number max)
max
- the new maximum bounds for the Scrollbar value.getMaximumNumber()
public void setMinimumNumber(java.lang.Number min)
min
- the new minimum bounds for the Scrollbar value.getMinimumNumber()
public void setBlockIncrementNumber(java.lang.Number block)
setBlockIncrementNumber
in interface com.sas.models.IncrementInterface
block
- the new blockIncrement number.getBlockIncrementNumber()
public void setUnitIncrementNumber(java.lang.Number unit)
setUnitIncrementNumber
in interface com.sas.models.IncrementInterface
unit
- the new blockIncrement number.getUnitIncrementNumber()
public void setNumberValue(java.lang.Number newValue)
newValue
- the new value.getNumberValue()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |