multivalent
public class IScrollPane extends INode
Dimensions are independent of its children's. Therefore, unlike other Nodes, dimensions should be set externally, either directly in pixels on bbox or in characters with IScrollPane. Otherwise, dimensions take all available space.
Does not lay out children, so should have single child, and perhaps visual layers as well. Methods can scroll to (x,y) position or to passed Node.
Contents are formatted on demand, at the first call to paint
.
Thus, the reformatting required by any amount of editing is batched.
On the other hand, if any part of the node is to be painted, it must be entirely formatted;
the scrollbars, for instance, require this to visually indicate the percentage of the document shown.
LATER
Version: $Revision: 1.9 $ $Date: 2003/02/14 02:07:10 $
Field Summary | |
---|---|
boolean | editable Is content editable? |
protected int | hchars_ |
Rectangle | ibbox Bounding box of content. |
static String | MSG_FORMATTED
Report that contents of pane have been formatted.
|
static String | MSG_SCROLL_TO
Scroll document to point that shows arg.
|
protected int | wchars_ |
Constructor Summary | |
---|---|
IScrollPane(String name, Map<String,Object> attr, INode parent) |
Method Summary | |
---|---|
boolean | checkRep() |
void | dump(int level, int maxlevel) |
int | dx() |
int | dy() |
boolean | eventNode(AWTEvent e, Point rel) |
boolean | formatNode(int width, int height, Context cx)
If length of dimension set in characters or to dynamic (these mutually cancel each other out--last one set wins),
use that to set corresponding bounding box dimension.
|
VScrollbar | getHsb() |
IScrollPane | getIScrollPane() |
VScrollbar | getVsb() Scrollbars, which uncharacteristically aren't reachable by walking the tree. |
void | paintBeforeAfter(Rectangle docclip, Context cx)
If IScrollPane not valid when needs to be painted, format it now.
|
void | paintNode(Rectangle docclip, Context cx)
Paints contents in scrolled, clipped java.awt.Graphics2D. |
void | scrollBy(int dx, int dy) Scroll by a delta x and y. |
void | scrollTo(int x, int y) Scroll to an absolute x and y. |
void | scrollTo(Node node, int xoff, int yoff, boolean pickplace)
Pickplace option described in VScrollbar. |
void | setScrollbarShowPolicy(byte policy)
Convenience method to set both scrollbars to same VScrollbar policy.
|
void | setSizeChars(int widthchars, int heightchars)
Compute dimensions from number of characters of prevailing font.
|
"formattedPane": arg= IScrollPane instance
"scrollTo": arg= Span start-of-span-if-set
"scrollTo": arg= Node Node
"scrollTo": arg= Integer absolute-position, in= Node node in tree (usually IScrollPane or Document)
"scrollTo": arg= String name-of-anchor, in= Node node in tree (usually IScrollPane or Document)
See Also: VScrollbar