multivalent
public class Browser extends JPanel
State:
browser name
grab
cursor
and selection span
(at most one of which is valid at a time)
offscreen image
document
, the one with the focus
Functionality:
Browsers do not contain:
Version: $Revision: 1.23 $ $Date: 2003/06/02 04:46:57 $
Field Summary | |
---|---|
static String | MSG_CLOSE
Close browser window, safely saving component documents as needed and releasing resources.
|
static String | MSG_CREATE_TOOLBAR
Construct toolbar by passing around to behaviors and letting them add (or delete) entiries.
|
static String | MSG_CREATE_TOOLBAR2 Like MSG_CREATE_TOOLBAR, but for a second toolbar, under the first. |
static String | MSG_NEW
Create new browser window.
|
static String | MSG_STATUS
Another semantic command, which should be given more descriptive name.
|
static String | PROTOCOL_BUILD |
static String | PROTOCOL_EVENT |
static String | PROTOCOL_FORMAT |
static String | PROTOCOL_PAINT |
static String | PROTOCOL_REFORMAT |
static String | PROTOCOL_RESTORE |
static String | PROTOCOL_SEMANTICEVENT |
Method Summary | |
---|---|
Object | callSemanticEvent(String msg, Object arg)
Treat mutation (filtering, augmenting, replacing) during semantic event pass as a method.
|
boolean | checkRep() |
String | clipboard() |
String | clipboard(Span span) |
void | createBufferStrategy(int numBuffers, BufferCapabilities caps) |
boolean | event(AWTEvent e)
Process event.
|
void | eventq(AWTEvent e)
There are two types of events: low-level events and semantic events.
|
void | eventq(String message, Object arg)
A convenience function for behaviors to create a semantic event and put on event queue.
|
void | format()
FORMAT - geometrically place doc tree elements.
|
Document | getCurDocument()
Current Document on which to attach annotations.
|
Node | getCurNode() Returns node under the cursor. |
int | getCurOffset() Returns offset within node under the cursor. |
Point | getCurScrn() Returns coordinates of mouse cursor, relative to top-level Frame. |
CursorMark | getCursorMark() Returns handle to cursor . |
INode | getDocRoot() |
EventListener | getGrab() Returns owner of grab; null if none. |
String | getName() Return logical internal name of browser window instance. |
Image | getOffImage()
Returns handle to offscreen java.awt.Image that holds the image of the Browser content.
|
Dimension | getPreferredSize() |
Root | getRoot() Returns master Root, which contains both GUI and perhaps multiple content subdocument. |
INode | getScope() Interactive editing should be done only within subtree rooted here. |
Span | getSelectionSpan() Returns handle to the selection span . |
void | paint(Graphics g_old_api) |
protected void | processEvent(AWTEvent e)
Hook into Java's event system |
void | releaseGrab(EventListener owner)
Release grab, assuming owner currently has grab.
|
void | resetProfile() |
void | setBounds(int x, int y, int width, int height) |
void | setCurDocument(Document doc)
Switching from one completely formed independent document tree (Document) to another.
|
void | setCurNode(Mark m) |
void | setCurNode(Node newnode, int newoffset) The current node under the cursor, either a Leaf or its corresponding IScrollPane. |
void | setGrab(EventListener owner)
Delivers subsequent events directly to |
void | setGrab(EventListener owner, Node relativeTo)
Delivers subsequent events directly to owner, in coordinates relative to relativeTo.
|
void | setScope(INode scope) |
void | showProfile(StringBuffer sb) |
void | showStatusX(String label) |
boolean | tickleActives(AWTEvent e, Point rel, Node obsn)
Used by Leaf (which knows rel) and IHBox and IParaBox. |
"closeBrowserInstance": arg= Browser browser to close
"createWidget/Toolbar": out= INode instance-under-construction.
"newBrowserInstance": arg= java.util.HashMap attributes, in= INode root of tree, out=unused.
"showStatus": arg= java.lang.String message-to-show.
Returns: the mutated clientData.
eventq()
, instead on demanding instant attention.
See Also: SemanticEvent
Deprecated:
FORMAT - geometrically place doc tree elements. In depth-first tree traversal, call observing behaviors in each node in priority order. Default/lowest priority is implicitly the flow layout. Specialized formatters, e.g., CSS, can intercept and prevent subsequent action.cursor
.null
if none.selection span
. Check isSet to see if presently set or not.Deprecated: in favor of MSG_STATUS.