|
|||||||||||
| 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.RepeatHandler
The handler for repeats. This class handles "expanding" the UI dom depending on the nodeset that the repeat is bound. This class does not handle the index (cursor in the UI).
| Field Summary | |
static java.lang.String |
CSS_CURSOR_BACKGROUND_COLOR_PROPERTY
|
static java.lang.String |
CSS_CURSOR_COLOR_PROPERTY
|
protected java.util.Vector |
current
|
protected java.awt.Color |
cursorBGColor
the repeat cursors color |
protected java.awt.Color |
cursorFGColor
the repeat cursors color |
protected java.lang.String |
id
the id of this repeat |
protected java.util.Hashtable |
instanceTable
the map between the instance nodes, and corresponding first node in the UI |
protected org.w3c.dom.Element |
ownerElement
the owner element for this handler (e.g. |
protected org.w3c.dom.Element |
prototypeUIElement
the prototype for the UI nodes (cloned from the owner element, only children are used |
protected org.w3c.dom.NodeList |
refNodes
the currently bound nodes |
short |
REPEAT_EXPANDED
|
short |
REPEAT_UNINITIALIZED
|
protected int |
repeatChildCount
The number of children for a single repeat iteration |
protected InstanceNode |
repeatInstanceParent
The parent node in the instance, that I will listen to for additions and deletions |
protected int |
startIndex
The current repeat start index |
protected short |
status
the current status of this repeat |
protected XFormsContext |
xformsContext
|
| Constructor Summary | |
RepeatHandler(XFormsContext context)
|
|
| Method Summary | |
protected org.w3c.dom.Node |
addRemoveSelectively(org.w3c.dom.NodeList newList)
|
protected void |
checkCursorInBounds()
|
int |
countChildNodes(org.w3c.dom.Element parent)
|
void |
createPresentationNodes(int cursor,
org.w3c.dom.Node context,
boolean append)
|
protected void |
createPrototypeElement()
|
void |
destroy()
|
void |
expandUI()
re-inits this repeat's UI elements totally |
org.w3c.dom.NodeList |
getBoundNodeset()
|
protected int |
getIndex(org.w3c.dom.Node added)
find a cursor value from a child node in UI DOM, used by selection events |
protected int |
getIndexOfInstanceNode(org.w3c.dom.Node child)
1 -based index |
static org.w3c.dom.Node |
getNthSibling(org.w3c.dom.Node start,
int count)
|
java.lang.String |
getRepeatId()
|
org.w3c.dom.Element |
getUIElement()
|
java.util.Vector |
getUINodesForIndex(int index)
|
protected boolean |
hasNode(org.w3c.dom.Node n,
org.w3c.dom.NodeList list)
see, if a node is contained in a nodelist |
protected boolean |
hasNode(org.w3c.dom.Node n,
java.util.Vector list)
see, if a node is contained in a nodelist |
void |
notifyBindingChanged(org.w3c.dom.NodeList newBinding)
notifies the listener that the binding and the value changed |
protected void |
notifyRefresh()
|
static void |
removeAllChildrenTest(org.w3c.dom.Element elem)
|
protected void |
removeFromUI(org.w3c.dom.Node n)
|
protected void |
setContextNodeRecursively(org.w3c.dom.Node p,
org.w3c.dom.Node context)
|
protected void |
setRefreshBlocking(boolean state)
|
protected void |
setRepeatIndex(org.w3c.dom.Node n)
|
void |
setUIElement(org.w3c.dom.Element elem)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String CSS_CURSOR_BACKGROUND_COLOR_PROPERTY
public static final java.lang.String CSS_CURSOR_COLOR_PROPERTY
public final short REPEAT_UNINITIALIZED
public final short REPEAT_EXPANDED
protected short status
protected InstanceNode repeatInstanceParent
protected int startIndex
protected int repeatChildCount
protected java.awt.Color cursorFGColor
protected java.awt.Color cursorBGColor
protected org.w3c.dom.NodeList refNodes
protected org.w3c.dom.Element ownerElement
protected org.w3c.dom.Element prototypeUIElement
protected java.lang.String id
protected java.util.Hashtable instanceTable
protected XFormsContext xformsContext
protected java.util.Vector current
| Constructor Detail |
public RepeatHandler(XFormsContext context)
| Method Detail |
public void destroy()
public void setUIElement(org.w3c.dom.Element elem)
public org.w3c.dom.Element getUIElement()
public java.lang.String getRepeatId()
protected void createPrototypeElement()
public int countChildNodes(org.w3c.dom.Element parent)
public void expandUI()
public org.w3c.dom.NodeList getBoundNodeset()
public void createPresentationNodes(int cursor,
org.w3c.dom.Node context,
boolean append)
protected void setContextNodeRecursively(org.w3c.dom.Node p,
org.w3c.dom.Node context)
public static void removeAllChildrenTest(org.w3c.dom.Element elem)
protected int getIndex(org.w3c.dom.Node added)
public java.util.Vector getUINodesForIndex(int index)
protected org.w3c.dom.Node addRemoveSelectively(org.w3c.dom.NodeList newList)
protected void setRepeatIndex(org.w3c.dom.Node n)
public static org.w3c.dom.Node getNthSibling(org.w3c.dom.Node start,
int count)
protected boolean hasNode(org.w3c.dom.Node n,
org.w3c.dom.NodeList list)
protected boolean hasNode(org.w3c.dom.Node n,
java.util.Vector list)
protected void removeFromUI(org.w3c.dom.Node n)
protected void checkCursorInBounds()
public void notifyBindingChanged(org.w3c.dom.NodeList newBinding)
protected void notifyRefresh()
protected void setRefreshBlocking(boolean state)
protected int getIndexOfInstanceNode(org.w3c.dom.Node child)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||