|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfi.hut.tml.xsmiles.mlfc.xforms.ui.RepeatIndexHandler
The repeat index handler. Only one instance of this class exists per document in the bubbling phase, all index values are set, and traversed indexes are unshown in the UI when the event comes to the root repeat, it starts to show nested repeat indexes if some nested repeat is outside the event target, then the nested repeat's index is set to 1 * FUNCTIONAL: o Repeat element listens for DOMFocusIn o When DOMFocusIn is received, repeat calls RepeatIndexHandler, which + unsets the previous cursors in event flow + sets the new cursors for the whole repeat hierarchy
| Field Summary | |
static java.lang.String |
CSS_CURSOR_BACKGROUND_COLOR_PROPERTY
|
static java.lang.String |
CSS_CURSOR_COLOR_PROPERTY
|
protected java.awt.Color |
cursorBGColor
the repeat cursors color |
protected java.awt.Color |
cursorFGColor
the repeat cursors color |
protected java.util.Hashtable |
previousCursorValues
|
protected java.util.Hashtable |
repeatsWithCursor
|
protected XFormsContext |
xformsContext
|
| Constructor Summary | |
RepeatIndexHandler(XFormsContext context)
|
|
| Method Summary | |
org.w3c.dom.Element |
findRepeatedId(org.w3c.dom.Element elem,
java.lang.String id)
Find the active instance of the given id as determined by enclosing repeat's indexes. |
protected int |
getIndex(org.w3c.dom.Node target,
RepeatHandler handler)
This method handles the event when the user selects a control in repeat Events are used to set the repeatcursor to whatever the user has selected |
RepeatItemPseudoElement |
getRepeatItem(RepeatHandler handler,
int i)
|
protected boolean |
hasAncestorRepeat(RepeatHandler handler)
goes towards the root and reports if any repeat's are found as ancestors |
void |
repeatAboutToChange(RepeatHandler handler)
call this before any changes to UI, it will clear out the previous cursor |
void |
repeatCaughtFocusEvent(org.w3c.dom.events.UIEvent event,
RepeatHandler handler)
the repeat has caught the DOMFocusIn event |
void |
repeatChanged(RepeatHandler handler)
call this method when new items have been inserted into repeat or old ones removed. |
void |
repeatInitialized(RepeatHandler handler)
call this method when a repeat has been initialized in the beginning. |
protected int |
resolveItemNumber(org.w3c.dom.Node target,
RepeatHandler handler)
find out which item was focused |
protected java.lang.String |
resolveRepeatId(RepeatHandler handler)
find out the repeat id of this repeat handler |
protected void |
setIndexValue(java.lang.String repeatId,
int item)
set the cursor value thru model |
void |
setRepeatIndex(org.w3c.dom.Node target,
RepeatHandler handler,
int item)
|
void |
setRepeatIndexRecursively(org.w3c.dom.Element elem)
|
protected void |
unsetPreviousIndex(RepeatHandler handler)
unset the previous cursors for all repeats in the document, leave prevCursor=-1 if you want to use the cursor value from model |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Hashtable repeatsWithCursor
protected java.util.Hashtable previousCursorValues
public static final java.lang.String CSS_CURSOR_BACKGROUND_COLOR_PROPERTY
public static final java.lang.String CSS_CURSOR_COLOR_PROPERTY
protected java.awt.Color cursorFGColor
protected java.awt.Color cursorBGColor
protected XFormsContext xformsContext
| Constructor Detail |
public RepeatIndexHandler(XFormsContext context)
| Method Detail |
public void repeatCaughtFocusEvent(org.w3c.dom.events.UIEvent event,
RepeatHandler handler)
public void repeatChanged(RepeatHandler handler)
public void repeatAboutToChange(RepeatHandler handler)
public void repeatInitialized(RepeatHandler handler)
public void setRepeatIndex(org.w3c.dom.Node target,
RepeatHandler handler,
int item)
public void setRepeatIndexRecursively(org.w3c.dom.Element elem)
public RepeatItemPseudoElement getRepeatItem(RepeatHandler handler,
int i)
protected boolean hasAncestorRepeat(RepeatHandler handler)
protected int resolveItemNumber(org.w3c.dom.Node target,
RepeatHandler handler)
protected java.lang.String resolveRepeatId(RepeatHandler handler)
protected void unsetPreviousIndex(RepeatHandler handler)
protected void setIndexValue(java.lang.String repeatId,
int item)
protected int getIndex(org.w3c.dom.Node target,
RepeatHandler handler)
public org.w3c.dom.Element findRepeatedId(org.w3c.dom.Element elem,
java.lang.String id)
elem - the element to search forid - the elemnt's id
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||