| java.lang.Object org.wings.SComponent org.wings.SAbstractAdjustable
All known Subclasses: org.wings.SScrollBar, org.wings.SPageScroller,
Method Summary | |
public void | addAdjustmentListener(AdjustmentListener l) Adds an AdjustmentListener. | abstract protected void | adjust() | protected void | fireAdjustmentValueChanged(int id, int type, int value) | public void | fireFinalEvents() | public void | fireIntermediateEvents() | public int | getBlockIncrement(int direction) Returns the amount to change the scrollbar's value by,
given a block (usually "page") up/down request. | final public int | getBlockIncrement() For backwards compatibility with java.awt.Scrollbar. | final public int | getExtent() | final public int | getMaximum() The maximum value of the scrollbar is maximum - extent. | final public int | getMinimum() Returns the minimum value supported by the scrollbar
(usually zero). | final public SBoundedRangeModel | getModel() Returns data model that handles the scrollbar's four
fundamental properties: minimum, maximum, value, extent. | final public int | getOrientation() Returns the adjustable's orientation (horizontal or vertical). | public int | getUnitIncrement(int direction) Returns the amount to change the scrollbar's value by,
given a unit up/down request. | final public int | getUnitIncrement() For backwards compatibility with java.awt.Scrollbar. | final public int | getValue() Returns the scrollbar's value. | final public boolean | getValueIsAdjusting() True if the scrollbar knob is being dragged. | final public int | getVisibleAmount() Returns the scrollbar's extent, aka its "visibleAmount". | public boolean | isChangeFromEvent() | public boolean | isEpochCheckEnabled() | public void | processLowLevelEvent(String action, String[] values) | public void | removeAdjustmentListener(AdjustmentListener l) Removes an AdjustmentEvent listener. | public void | setBlockIncrement(int blockIncrement) Sets the blockIncrement property. | public void | setEpochCheckEnabled(boolean epochCheckEnabled) | public void | setExtent(int value) | public void | setMaximum(int maximum) Sets the model's maximum property. | public void | setMinimum(int minimum) Sets the scrollbar's minimum value.. | public void | setModel(SBoundedRangeModel newModel) Sets the model that handles the scrollbar's four
fundamental properties: minimum, maximum, value, extent. | public void | setOrientation(int orientation) Set the scrollbar's orientation to either VERTICAL or
HORIZONTAL. | public void | setUnitIncrement(int unitIncrement) Sets the unitIncrement property. | public void | setValue(int value) Sets the scrollbar's value. | public void | setValueIsAdjusting(boolean b) Sets the model's valueIsAdjusting property. | public void | setValues(int newValue, int newExtent, int newMin, int newMax) | public void | setVisibleAmount(int extent) Set the model's extent property:
The amount of the view that is currently visible. |
BLOCK | final public static int BLOCK(Code) | | |
MARGIN | final public static int MARGIN(Code) | | |
UNIT | final public static int UNIT(Code) | | |
changeFromEvent | protected boolean changeFromEvent(Code) | | |
SAbstractAdjustable | public SAbstractAdjustable(int value, int extent, int min, int max)(Code) | | Creates a scrollbar with the specified orientation,
value, extent, mimimum, and maximum.
The "extent" is the size of the viewable area. It is also known
as the "visible amount".
Note: Use setBlockIncrement to set the block
increment to a size slightly smaller than the view's extent.
That way, when the user jumps the knob to an adjacent position,
one or two lines of the original contents remain in view.
throws: IllegalArgumentException - if orientation is not one of VERTICAL, HORIZONTAL See Also: SAbstractAdjustable.setOrientation See Also: SAbstractAdjustable.setValue See Also: SAbstractAdjustable.setVisibleAmount See Also: SAbstractAdjustable.setMinimum See Also: SAbstractAdjustable.setMaximum |
SAbstractAdjustable | public SAbstractAdjustable()(Code) | | Creates a scrollbar with the specified orientation
and the following initial values:
minimum = 0
maximum = 100
value = 0
extent = 10
|
addAdjustmentListener | public void addAdjustmentListener(AdjustmentListener l)(Code) | | Adds an AdjustmentListener. Adjustment listeners are notified
each time the scrollbar's model changes. Adjustment events are
provided for backwards compatability with java.awt.Scrollbar.
Note that the AdjustmentEvents type property will always have a
placeholder value of AdjustmentEvent.TRACK because all changes
to a BoundedRangeModels value are considered equivalent. To change
the value of a BoundedRangeModel one just sets its value property,
i.e. model.setValue(123). No information about the origin of the
change, e.g. it's a block decrement, is provided. We don't try
fabricate the origin of the change here.
Parameters: l - the AdjustmentLister to add See Also: SAbstractAdjustable.removeAdjustmentListener See Also: BoundedRangeModel.addChangeListener |
adjust | abstract protected void adjust()(Code) | | |
fireAdjustmentValueChanged | protected void fireAdjustmentValueChanged(int id, int type, int value)(Code) | | |
fireFinalEvents | public void fireFinalEvents()(Code) | | |
fireIntermediateEvents | public void fireIntermediateEvents()(Code) | | |
getBlockIncrement | public int getBlockIncrement(int direction)(Code) | | Returns the amount to change the scrollbar's value by,
given a block (usually "page") up/down request. A ScrollBarUI
implementation typically calls this method when the user clicks
above or below the scrollbar "knob" to change the value
up or down by large amount. Subclasses my override this
method to compute a value, e.g. the change required to scroll
up or down one paragraph in a text document.
The JScrollPane component creates scrollbars (by default)
that override this method and delegate to the viewports
Scrollable view, if it has one. The Scrollable interface
provides a more specialized version of this method.
Parameters: direction - is -1 or 1 for up/down respectively the value of the blockIncrement property See Also: SAbstractAdjustable.setBlockIncrement See Also: SAbstractAdjustable.setValue |
getExtent | final public int getExtent()(Code) | | |
getMaximum | final public int getMaximum()(Code) | | The maximum value of the scrollbar is maximum - extent.
the value of the model's maximum property See Also: SAbstractAdjustable.setMaximum |
getMinimum | final public int getMinimum()(Code) | | Returns the minimum value supported by the scrollbar
(usually zero).
the value of the model's minimum property See Also: SAbstractAdjustable.setMinimum |
getUnitIncrement | public int getUnitIncrement(int direction)(Code) | | Returns the amount to change the scrollbar's value by,
given a unit up/down request. A ScrollBarUI implementation
typically calls this method when the user clicks on a scrollbar
up/down arrow and uses the result to update the scrollbar's
value. Subclasses my override this method to compute
a value, e.g. the change required to scroll up or down one
(variable height) line text or one row in a table.
The JScrollPane component creates scrollbars (by default)
that override this method and delegate to the viewports
Scrollable view, if it has one. The Scrollable interface
provides a more specialized version of this method.
Parameters: direction - is -1 or 1 for up/down respectively the value of the unitIncrement property See Also: SAbstractAdjustable.setUnitIncrement See Also: SAbstractAdjustable.setValue |
getVisibleAmount | final public int getVisibleAmount()(Code) | | Returns the scrollbar's extent, aka its "visibleAmount". In many
scrollbar look and feel implementations the size of the
scrollbar "knob" or "thumb" is proportional to the extent.
the value of the model's extent property See Also: SAbstractAdjustable.setVisibleAmount |
isChangeFromEvent | public boolean isChangeFromEvent()(Code) | | |
processLowLevelEvent | public void processLowLevelEvent(String action, String[] values)(Code) | | |
setExtent | public void setExtent(int value)(Code) | | |
setValueIsAdjusting | public void setValueIsAdjusting(boolean b)(Code) | | Sets the model's valueIsAdjusting property. Scrollbar look and
feel implementations should set this property to true when
a knob drag begins, and to false when the drag ends. The
scrollbar model will not generate ChangeEvents while
valueIsAdjusting is true. True if the scrollbar thumb is being dragged.
See Also: SAbstractAdjustable.getValueIsAdjusting See Also: BoundedRangeModel.setValueIsAdjusting |
Methods inherited from org.wings.SComponent | final public void addComponentListener(SComponentListener l)(Code)(Java Doc) public void addDynamicStyle(Style style)(Code)(Java Doc) final protected void addEventListener(Class<T> type, T listener)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) final public void addParentFrameListener(SParentFrameListener l)(Code)(Java Doc) final public void addRenderListener(SRenderListener renderListener)(Code)(Java Doc) final public void addScriptListener(ScriptListener listener)(Code)(Java Doc) public void addStyle(String additionalCssClassName)(Code)(Java Doc) public Object clone()(Code)(Java Doc) protected void fireComponentChangeEvent(SComponentEvent aEvent)(Code)(Java Doc) public void fireFinalEvents()(Code)(Java Doc) protected void fireKeyEvents()(Code)(Java Doc) final public void fireRenderEvent(int type)(Code)(Java Doc) public ActionMap getActionMap()(Code)(Java Doc) public Color getBackground()(Code)(Java Doc) public SBorder getBorder()(Code)(Java Doc) public ComponentCG getCG()(Code)(Java Doc) final public Object getClientProperty(Object key)(Code)(Java Doc) public SPopupMenu getComponentPopupMenu()(Code)(Java Doc) public Style getDynamicStyle(Selector selector)(Code)(Java Doc) public Collection getDynamicStyles()(Code)(Java Doc) public int getFocusTraversalIndex()(Code)(Java Doc) public SFont getFont()(Code)(Java Doc) public Color getForeground()(Code)(Java Doc) public int getHorizontalAlignment()(Code)(Java Doc) public InputMap getInputMap()(Code)(Java Doc) public InputMap getInputMap(int condition)(Code)(Java Doc) final protected int getListenerCount(Class type)(Code)(Java Doc) final protected Object[] getListenerList()(Code)(Java Doc) final public EventListener[] getListeners(Class<? extends EventListener> type)(Code)(Java Doc) public String getLowLevelEventId()(Code)(Java Doc) final public String getName()(Code)(Java Doc) final public SContainer getParent()(Code)(Java Doc) public SFrame getParentFrame()(Code)(Java Doc) public SDimension getPreferredSize()(Code)(Java Doc) public RequestURL getRequestURL()(Code)(Java Doc) public boolean getResidesInForm()(Code)(Java Doc) public List<ScriptListener> getScriptListenerList()(Code)(Java Doc) public ScriptListener[] getScriptListeners()(Code)(Java Doc) final public Session getSession()(Code)(Java Doc) public boolean getShowAsFormComponent()(Code)(Java Doc) public String getStyle()(Code)(Java Doc) public String getToolTipText()(Code)(Java Doc) public int getVerticalAlignment()(Code)(Java Doc) public void invite(ComponentVisitor visitor) throws Exception(Code)(Java Doc) protected static boolean isDifferent(Object oldObject, Object newObject)(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isFocusOwner()(Code)(Java Doc) public boolean isRecursivelyVisible()(Code)(Java Doc) public boolean isReloadForced()(Code)(Java Doc) protected boolean isUpdatePossible()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) protected String paramString()(Code)(Java Doc) protected void processComponentEvent(SComponentListener listener, SComponentEvent e)(Code)(Java Doc) protected boolean processKeyEvents(String[] values)(Code)(Java Doc) protected void processLowLevelEvent(String name, String[] values)(Code)(Java Doc) final public void putClientProperty(Object key, Object value)(Code)(Java Doc) final void register()(Code)(Java Doc) public void reload()(Code)(Java Doc) final protected void reloadIfChange(Object oldVal, Object newVal)(Code)(Java Doc) final protected void reloadIfChange(int oldVal, int newVal)(Code)(Java Doc) final protected void reloadIfChange(boolean oldVal, boolean newVal)(Code)(Java Doc) final protected void reloadIfChange(byte oldVal, byte newVal)(Code)(Java Doc) final protected void reloadIfChange(short oldVal, short newVal)(Code)(Java Doc) final protected void reloadIfChange(long oldVal, long newVal)(Code)(Java Doc) final protected void reloadIfChange(float oldVal, float newVal)(Code)(Java Doc) final protected void reloadIfChange(double oldVal, double newVal)(Code)(Java Doc) final protected void reloadIfChange(char oldVal, char newVal)(Code)(Java Doc) final public void removeComponentListener(SComponentListener l)(Code)(Java Doc) public void removeDynamicStyle(Selector selector)(Code)(Java Doc) final protected void removeEventListener(Class<T> type, T listener)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) final public void removeParentFrameListener(SParentFrameListener l)(Code)(Java Doc) final public void removeRenderListener(SRenderListener renderListener)(Code)(Java Doc) final public void removeScriptListener(ScriptListener listener)(Code)(Java Doc) public void removeStyle(String cssStyleClassName)(Code)(Java Doc) public void requestFocus()(Code)(Java Doc) public void scrollRectToVisible(Rectangle aRect)(Code)(Java Doc) public void setActionMap(ActionMap actionMap)(Code)(Java Doc) public void setAttribute(String cssPropertyName, String value)(Code)(Java Doc) public void setAttribute(CSSProperty property, String propertyValue)(Code)(Java Doc) public void setAttribute(Selector selector, CSSProperty property, String propertyValue)(Code)(Java Doc) public void setAttribute(Selector selector, CSSProperty property, SIcon icon)(Code)(Java Doc) public void setAttribute(Selector selector, CSSProperty property, Color color)(Code)(Java Doc) public void setAttributes(Selector selector, CSSAttributeSet attributes)(Code)(Java Doc) public void setBackground(Color color)(Code)(Java Doc) public void setBorder(SBorder border)(Code)(Java Doc) public void setCG(ComponentCG newCG)(Code)(Java Doc) public void setComponentPopupMenu(SPopupMenu popupMenu)(Code)(Java Doc) public void setDynamicStyles(Collection dynamicStyles)(Code)(Java Doc) public void setEnabled(boolean enabled)(Code)(Java Doc) public void setFocusTraversalIndex(int index)(Code)(Java Doc) public void setFont(SFont font)(Code)(Java Doc) public void setForeground(Color color)(Code)(Java Doc) public void setHorizontalAlignment(int alignment)(Code)(Java Doc) public void setInputMap(InputMap inputMap)(Code)(Java Doc) public void setInputMap(int condition, InputMap inputMap)(Code)(Java Doc) public void setName(String uniqueName)(Code)(Java Doc) public void setNameRaw(String uncheckedName)(Code)(Java Doc) public void setParent(SContainer parent)(Code)(Java Doc) protected void setParentFrame(SFrame parentFrame)(Code)(Java Doc) public void setPreferredSize(SDimension preferredSize)(Code)(Java Doc) public void setReloadForced(boolean forced)(Code)(Java Doc) public void setShowAsFormComponent(boolean showAsFormComponent)(Code)(Java Doc) public void setStyle(String cssClassName)(Code)(Java Doc) public void setToolTipText(String t)(Code)(Java Doc) public void setVerticalAlignment(int alignment)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public String toString()(Code)(Java Doc) final void unregister()(Code)(Java Doc) public void update(Update update)(Code)(Java Doc) public void updateCG()(Code)(Java Doc) public void write(Device s) throws IOException(Code)(Java Doc)
|
|
|