|
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.TableSort
Sort structural table at given column, heuristically determining data type. Assume HTML/CALS-style table (row major; TABLE tag with THEAD, TBODYs, and TFOOT as children, and TRs as their children). Relies on HTML parser normalizing table by filling in cells not explicit in rowspan or colspan, though painting and formatting will still be weird if these are around. Unlike most behaviors, which work on all document types, TableSort works only on flowed documents.
To do: generalize to range of lines, as tables aren't used for tabular information much, as least in HTML.
Field Summary | |
---|---|
static java.lang.String |
MSG_ASCENDING
Sort table in ascending order. |
static java.lang.String |
MSG_DESCENDING
Sort table in descending order. |
static java.lang.String |
MSG_SORT
Sort table in ascending order, or reverse order if already sorted in ascending order. |
Fields inherited from class multivalent.Behavior |
---|
ATTR_BEHAVIOR, name_ |
Fields inherited from class multivalent.VObject |
---|
attr_ |
Constructor Summary | |
---|---|
TableSort()
|
Method Summary | |
---|---|
boolean |
semanticEventAfter(SemanticEvent se,
java.lang.String msg)
Round robin distribution to all behaviors. |
boolean |
semanticEventBefore(SemanticEvent se,
java.lang.String msg)
Since not all man page references are recognizable as such, have docpopup choice to treat current word as man page ref. |
void |
sortTable(java.lang.Object colin,
int direction)
|
Methods inherited from class multivalent.Behavior |
---|
buildAfter, buildBefore, checkRep, clipboardAfter, clipboardBefore, createUI, destroy, eventAfter, eventBefore, formatAfter, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, paintAfter, paintBefore, putPreference, redo, restore, 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_SORT
"tableSort": arg= Node
column-to-sort
public static final java.lang.String MSG_ASCENDING
"tableSortAscending": arg= Node
column-to-sort
public static final java.lang.String MSG_DESCENDING
"tableSortDescending": arg= Node
column-to-sort
Constructor Detail |
---|
public TableSort()
Method Detail |
---|
public boolean semanticEventBefore(SemanticEvent se, java.lang.String msg)
semanticEventBefore
in class Behavior
public boolean semanticEventAfter(SemanticEvent se, java.lang.String msg)
Behavior
semanticEventAfter
in class Behavior
public void sortTable(java.lang.Object colin, int direction)
colin
- some node within column to sortdirection:
- -1=descending order, 1=ascending order, 0=ascending but descending if already in ascending.
|
Multivalent API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |