Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## multivalent.gui
Class VScrollbar

    java.lang.Object
      multivalent.VObject
          multivalent.Node
              multivalent.Leaf
                  multivalent.gui.VScrollbar

All Implemented Interfaces:
  java.lang.Cloneable, EventListener, java.util.EventListener

public class VScrollbar
extends Leaf
implements EventListener

Scrollbars, both vertical and horizontal. Communication is done with logical values, as opposed to visual or display coordinates. Unless otherwise noted, method parameters and return values that are geometric are relative to the source being scrolled, not the internal scrollbar display. The scrollbar visually indicates the amount of the document displayed.

Version:
  $Revision: 1.11 $ $Date: 2003/06/02 05:20:34 $
See Also:
  `IScrollPane`

Field Summary
`static int` | `BOTTOMARROW` Logical parts of scrollbar reported by `idLocation(Point)`.
`static int` | `BOTTOMTROUGH` Logical parts of scrollbar reported by `idLocation(Point)`.
`static int` | `HORIZONTAL` Scrollbar orientation to pass in constructor.
`static int` | `NIB` Logical parts of scrollbar reported by `idLocation(Point)`.
`static int` | `NOWHERE` Logical parts of scrollbar reported by `idLocation(Point)`.
`static byte` | `SHOW_ALWAYS` Policy for showing scrollbar.
`static byte` | `SHOW_AS_NEEDED` Policy for showing scrollbar.
`static byte` | `SHOW_NEVER` Policy for showing scrollbar.
`static int` | `SIZE` Width of scrollbar (height if horizontal).
`static int` | `TOPARROW` Logical parts of scrollbar reported by `idLocation(Point)`.
`static int` | `TOPTROUGH` Logical parts of scrollbar reported by `idLocation(Point)`.
`static int` | `VERTICAL` Scrollbar orientation to pass in constructor.

Fields inherited from class multivalent.Node
`align, ALIGN_INVALID, ATTR_ID, ATTR_SCRIPT, baseline, BASELINE, bbox, BOTH, BOTTOM, CENTER, CHAR, FILL, floats, INHERIT, JUSTIFY, LEFT, MAXNONSTRUCTDEPTH, MIDDLE, name_, NONE, observers_, parent_, PROBEWIDTH, RIGHT, sticky_, stickycnt_, TOP, valid_, valign`

Fields inherited from class multivalent.VObject
`attr_`

Constructor Summary
`VScrollbar(int orientation)`
`VScrollbar(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attr, INode parent, int orientation)`

Method Summary
`void` | `event(java.awt.AWTEvent e)`
`boolean` | `eventNode(java.awt.AWTEvent e, java.awt.Point rel)` unless overridden, leaves see if owner is interested
`boolean` | `formatNode(int width, int height, Context cx)` Handles span transitions on node and elided portions.
`int` | `getBlockIncrement()`
`int` | `getLineIncrement()`
`int` | `getMax()`
`int` | `getMin()`
`byte` | `getShowPolicy()`
`int` | `getValue()`
`int` | `idLocation(java.awt.Point rel)` Figure out what scrollbar part lies under the passed point, such as `TOPARROW`.
`boolean` | `paintNodeContent(Context cx, int start, int end)` Subclass for different scrollbar appearances.
`void` | `setMinMax(int minimum, int maximum)` Set min and max values of source.
`void` | `setShowPolicy(byte policy)`
`void` | `setValue(int value)` Same as `setValue(value, false)`.
`void` | `setValue(int value, boolean pickplace)` Value is in source coordinates.

Methods inherited from class multivalent.Leaf
`append, checkRep, clipboardBeforeAfter, clipboardNode, copy, cut, delete, dx, dy, eatme, eventBeforeAfter, formatBeforeAfter, formatNodeContent, getFirstLeaf, getLastLeaf, insert, insert, isLeaf, lengthTo, markDirtySubtreeDown, offset2rel, paintBeforeAfter, paintNode, paste, paste, removeTidy, setName, split, subelement, subelementCalc, subelementHit`

Methods inherited from class multivalent.Node
`addObserver, addSticky, addSticky, breakAfter, breakBefore, childNum, clipboardBeforeAfter, clone, cmp, commonAncestor, commonAncestor, contains, contains, deleteObserver, dump, dump, dump, findBFS, findBFS, findBFS, findDFS, findDFS, findDFS, findDFS, getAbsLocation, getActivesAt, getActivesAt, getActivesAt, getBbox, getBrowser, getDocument, getElementById, getIScrollPane, getName, getNextLeaf, getNextNode, getNodeName, getObservers, getParentNode, getPrevLeaf, getPrevNode, getRelLocation, getRoot, getSticky, indexSticky, intersects, isStruct, isValid, markDirty, markDirtySubtree, markDirtyTo, morphInto, reformat, remove, removeSticky, removeSticky, repaint, repaint, repaint, repaint, scrollTo, scrollTo, setParentNode, setValid, size, sizeSticky, spanChunky, spanChunky, structChildNum, toString`

Methods inherited from class multivalent.VObject
`attrEntrySetIterator, attrKeysIterator, clearAttributes, getAttr, getAttr, getAttributes, getGlobal, getValue, hasAttributes, putAttr, removeAttr, setAttributes`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### SHOW_NEVER

    public static final byte SHOW_NEVER

  Policy for showing scrollbar.

  See Also:
    Constant Field Values

### SHOW_AS_NEEDED

    public static final byte SHOW_AS_NEEDED

  Policy for showing scrollbar.

  See Also:
    Constant Field Values

### SHOW_ALWAYS

    public static final byte SHOW_ALWAYS

  Policy for showing scrollbar.

  See Also:
    Constant Field Values

### VERTICAL

    public static final int VERTICAL

  Scrollbar orientation to pass in constructor.

  See Also:
    Constant Field Values

### HORIZONTAL

    public static final int HORIZONTAL

  Scrollbar orientation to pass in constructor.

  See Also:
    Constant Field Values

### NOWHERE

    public static final int NOWHERE

  Logical parts of scrollbar reported by `idLocation(Point)`.

  See Also:
    Constant Field Values

### TOPARROW

    public static final int TOPARROW

  Logical parts of scrollbar reported by `idLocation(Point)`.

  See Also:
    Constant Field Values

### TOPTROUGH

    public static final int TOPTROUGH

  Logical parts of scrollbar reported by `idLocation(Point)`.

  See Also:
    Constant Field Values

### NIB

    public static final int NIB

  Logical parts of scrollbar reported by `idLocation(Point)`.

  See Also:
    Constant Field Values

### BOTTOMTROUGH

    public static final int BOTTOMTROUGH

  Logical parts of scrollbar reported by `idLocation(Point)`.

  See Also:
    Constant Field Values

### BOTTOMARROW

    public static final int BOTTOMARROW

  Logical parts of scrollbar reported by `idLocation(Point)`.

  See Also:
    Constant Field Values

### SIZE

    public static int SIZE

  Width of scrollbar (height if horizontal).

Constructor Detail

### VScrollbar

    public VScrollbar(int orientation)

### VScrollbar

    public VScrollbar(java.lang.String name,
                      java.util.Map<java.lang.String,java.lang.Object> attr,
                      INode parent,
                      int orientation)

Method Detail

### setMinMax

    public void setMinMax(int minimum,
                          int maximum)

  Set min and max values of source.

### getMin

    public int getMin()

### getMax

    public int getMax()

### getValue

    public int getValue()

### setShowPolicy

    public void setShowPolicy(byte policy)

### getShowPolicy

    public byte getShowPolicy()

### setValue

    public void setValue(int value,
                         boolean pickplace)

  Value is in source coordinates. Cannot set past end of scrollbar minus source equivalent of height of nib.

  Parameters:
    `pickplace` - Smart scrolling, after Tk's text widget -pickplace option: If the location is already shown, do nothing; if it's a little way off the screen (top or bottom), scroll just enough to bring it into view; if it's far away, show it centered.

### setValue

    public void setValue(int value)

  Same as `setValue(value, false)`.

### getBlockIncrement

    public int getBlockIncrement()

### getLineIncrement

    public int getLineIncrement()

### formatNode

    public boolean formatNode(int width,
                              int height,
                              Context cx)

  Description copied from class: `Leaf`
  Handles span transitions on node and elided portions. Called medium-specific leaf formatNodeContent in hunks of maximum-length homogeneous span coverage to get content size. Marks node valid, so if node not (e.g., LeafImage's image not loaded), set valid_=false in formatNodeContent.

  Overrides:
    `formatNode` in class `Leaf`

### paintNodeContent

    public boolean paintNodeContent(Context cx,
                                    int start,
                                    int end)

  Subclass for different scrollbar appearances.

  Overrides:
    `paintNodeContent` in class `Leaf`

### eventNode

    public boolean eventNode(java.awt.AWTEvent e,
                             java.awt.Point rel)

  Description copied from class: `Leaf`
  unless overridden, leaves see if owner is interested

  Overrides:
    `eventNode` in class `Leaf`
  See Also:
    `TreeEvent`, `SemanticEvent`

### event

    public void event(java.awt.AWTEvent e)

  Specified by:
    `event` in interface `EventListener`

### idLocation

    public int idLocation(java.awt.Point rel)

  Figure out what scrollbar part lies under the passed point, such as `TOPARROW`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Multivalent API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD