|
Multivalent API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmultivalent.VObject
multivalent.Behavior
multivalent.std.ui.Multipage
Interface for paginated document types to choose page number (next, previous, first, last, enter number).
Common code shared by multipage media adaptors (edu.berkeley.adaptor.Xdoc
, tex.dvi.DVI
, PDF
).
Uses Document.ATTR_PAGE
and Document.ATTR_PAGECOUNT
.
PersonalAnnos
,
MediaAdaptor
Field Summary | |
---|---|
static java.lang.String |
MSG_CLOSEPAGE
Close current document page, giving other behaviors a chance to save state before moving to a new page or different document. |
static java.lang.String |
MSG_FIRSTPAGE
Move to the first page of a multipage document. |
static java.lang.String |
MSG_GOPAGE
Move to the given page of a multipage document. |
static java.lang.String |
MSG_LASTPAGE
Move to the last page of a multipage document. |
static java.lang.String |
MSG_NEXTPAGE
Move to the next page of a multipage document. |
static java.lang.String |
MSG_OPENEDPAGE
Announce new page of document has been opened. |
static java.lang.String |
MSG_OPENPAGE
Open a different page of a multipage document as given by the Document 's Document.ATTR_PAGE attribute. |
static java.lang.String |
MSG_PREVPAGE
Move to the previous page of a multipage document. |
static java.lang.String |
MSG_RELOADPAGE
Opens same page. |
static int |
PAGECOUNT_NOT_APPLICABLE
|
static int |
PAGECOUNT_UNKNOWN
|
Fields inherited from class multivalent.Behavior |
---|
ATTR_BEHAVIOR, name_ |
Fields inherited from class multivalent.VObject |
---|
attr_ |
Constructor Summary | |
---|---|
Multipage()
|
Method Summary | |
---|---|
void |
buildAfter(Document doc)
Traverses all behaviors from lowest to highest priority, during which tweaks hack their content into the tree, |
boolean |
eventAfter(java.awt.AWTEvent e,
java.awt.Point rel,
Node n)
If at bottom of page, Space and PageDown flip to next page. |
void |
restore(ESISNode n,
java.util.Map<java.lang.String,java.lang.Object> attr,
Layer layer)
If page given in URL anchor (e.g, #page=5 or #page10 or #page.15 ), use that. |
boolean |
semanticEventAfter(SemanticEvent se,
java.lang.String msg)
Implement the following events: previosuPage, nextPage, fistPage, lastPage. |
boolean |
semanticEventBefore(SemanticEvent se,
java.lang.String msg)
Appear in Go menu, doc popup, toolbar. |
Methods inherited from class multivalent.Behavior |
---|
buildBefore, checkRep, clipboardAfter, clipboardBefore, createUI, destroy, eventBefore, formatAfter, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, paintAfter, paintBefore, putPreference, redo, restoreChildren, save, setName, toString, undo |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MSG_OPENPAGE
Document
's Document.ATTR_PAGE
attribute.
"openDocumentPage".
public static final java.lang.String MSG_OPENEDPAGE
"openedDocumentPage": arg= xxx
public static final java.lang.String MSG_CLOSEPAGE
"closePage": arg= Integer
current-page-number
public static final java.lang.String MSG_RELOADPAGE
"reloadDocumentPage".
public static final java.lang.String MSG_NEXTPAGE
"nextPage".
public static final java.lang.String MSG_PREVPAGE
"previousPage".
public static final java.lang.String MSG_FIRSTPAGE
"firstDocumentPage".
public static final java.lang.String MSG_LASTPAGE
"lastDocumentPage".
public static final java.lang.String MSG_GOPAGE
"goPageNum": arg= String
or Integer
new-page-number
public static final int PAGECOUNT_UNKNOWN
public static final int PAGECOUNT_NOT_APPLICABLE
Constructor Detail |
---|
public Multipage()
Method Detail |
---|
public boolean semanticEventBefore(SemanticEvent se, java.lang.String msg)
semanticEventBefore
in class Behavior
public boolean semanticEventAfter(SemanticEvent se, java.lang.String msg)
semanticEventAfter
in class Behavior
public void buildAfter(Document doc)
Behavior
buildAfter
in class Behavior
public boolean eventAfter(java.awt.AWTEvent e, java.awt.Point rel, Node n)
eventAfter
in class Behavior
public void restore(ESISNode n, java.util.Map<java.lang.String,java.lang.Object> attr, Layer layer)
#page=5
or #page10
or #page.15
), use that.
Else if PAGE attr already set, store it and set to null, so paginated media adaptor won't try to build.
restore
in class Behavior
|
Multivalent API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |