|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.clif.scenario.isac.egui.util.BehaviorUtil
public class BehaviorUtil
Some util function for behaviors
Constructor Summary | |
---|---|
BehaviorUtil()
|
Method Summary | |
---|---|
static boolean |
childrenAllowed(org.w3c.dom.Element target)
Test if the target element can have children |
static boolean |
childrenAllowed(org.w3c.dom.Element target,
org.w3c.dom.Element toDrop)
Test if an element can be add into another one |
static java.lang.String |
getAddText(org.eclipse.jface.viewers.IStructuredSelection sel)
Get the add text. |
static java.util.List<org.w3c.dom.Element> |
getSameLevelElement(java.util.List<org.w3c.dom.Element> listElement)
If elements are on differents level, filter only element on the same level |
static boolean |
insertElementInTree(org.w3c.dom.Element newNode,
org.w3c.dom.Element selectedNode,
org.w3c.dom.Element rootBehaviourNode,
ActionPlacement actionPlacement)
Insert a new node in the document dependending on the selected node and the placement required |
static boolean |
isAllowedToMove(org.w3c.dom.Element target)
|
static boolean |
isParent(org.w3c.dom.Element target,
java.lang.String id)
Test if an element target is a child of an element |
static boolean |
siblingAllowed(org.w3c.dom.Element target,
org.w3c.dom.Element newNode)
Test if the target can posses sibling |
static ActionPlacement |
validatePlacement(org.w3c.dom.Element nodeToAdd,
org.w3c.dom.Element node,
ActionPlacement actionPlacement)
Validate and change the action Placement depending on the targeted node |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BehaviorUtil()
Method Detail |
---|
public static boolean isParent(org.w3c.dom.Element target, java.lang.String id)
target
- the supposed childid
- id of parent element
public static boolean childrenAllowed(org.w3c.dom.Element target, org.w3c.dom.Element toDrop)
target
- the selected element where new element will be addedtoDrop
- the element to add
public static boolean siblingAllowed(org.w3c.dom.Element target, org.w3c.dom.Element newNode)
target
- Target element to testnewNode
- Node to insert
public static boolean childrenAllowed(org.w3c.dom.Element target)
target
- element to test
public static boolean isAllowedToMove(org.w3c.dom.Element target)
public static java.lang.String getAddText(org.eclipse.jface.viewers.IStructuredSelection sel)
sel
-
public static boolean insertElementInTree(org.w3c.dom.Element newNode, org.w3c.dom.Element selectedNode, org.w3c.dom.Element rootBehaviourNode, ActionPlacement actionPlacement)
newNode
- Node to addselectedNode
- The selected node. May be nullrootBehaviourNode
- The root behavior element. Used to insert at the begin or at the endactionPlacement
- Place to insert the new nodepublic static ActionPlacement validatePlacement(org.w3c.dom.Element nodeToAdd, org.w3c.dom.Element node, ActionPlacement actionPlacement)
nodeToAdd
- Node to insertnode
- Target nodeactionPlacement
- Placement of the node to insert @return Valide placement to insert a new node
public static java.util.List<org.w3c.dom.Element> getSameLevelElement(java.util.List<org.w3c.dom.Element> listElement)
listElement
- List of element to filter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |