|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.rule.RuleChecks
All the code that actually checks the rules is kept in this class.
The checks copy for
RuleRegistry that are set to
null. In this case the checks return the default
behavior.
This class is subject to changes in the future.
| Method Summary | |
static boolean |
checkEdgeRuleForDetachSource(RuleConfiguration config,
VisualGraph visualgraph,
VisualEdge visualedge)
Identifies whether the given VisualEdge
allows source deattachments. |
static boolean |
checkEdgeRuleForDetachTarget(RuleConfiguration config,
VisualGraph visualgraph,
VisualEdge visualedge)
Identifies whether the given VisualEdge
allows target deattachments. |
static int |
checkEdgeRuleForEdgeInsertMode(RuleConfiguration config,
VisualGraph visualgraph,
VisualEdge visualedge)
Identifies the edge-insert mode of the given VisualEdge. |
static int |
checkEdgeRuleForSnapToPortDistance(RuleConfiguration config,
VisualGraph visualgraph,
VisualEdge visualedge)
Identifies the snap-to-port distance value of the given VisualEdge. |
static boolean |
checkGraphRuleForAcceptLooseObjects(RuleConfiguration config,
VisualGraph visualgraph)
Checks whether the given VisualGraph accepts loose objects. |
static int |
checkGraphRuleForAutoSpace(RuleConfiguration config,
VisualGraph visualgraph)
Checks whether the given VisualGraph has
auto-space enabled. |
static java.lang.String |
checkGraphRuleForDropHandlerName(RuleConfiguration config,
VisualGraph visualgraph)
Checks whether the given VisualGraph is associated with a
drop-handler. |
static boolean |
checkGraphRuleForEdgeInsertSinglePosition(RuleConfiguration config,
VisualGraph visualgraph)
Checks whether the given VisualGraph is set
to edge-insert into a single position if multiple items
are subject to edge-splits. |
static int |
checkGraphRuleForEdgeSplitTolerance(RuleConfiguration config,
VisualGraph visualgraph)
Checks for the tolerance value for edge-splitting. |
static boolean |
checkGraphRuleForLegalCrossVisualSubgrahEdgeSplit(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualGraph
permits its edges to be split by the given VisualNode |
static boolean |
checkNodeRuleFor11NodeDelete(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
cascades its edges when its deleted. |
static boolean |
checkNodeRuleForAcceptLooseNodesIfGroup(RuleConfiguration config,
VisualGraph visualgraph,
java.lang.String noderuleName)
Identifies whether the NodeRule given through
noderuleName accepts loose
VisualNodes. |
static boolean |
checkNodeRuleForAcceptLooseNodesIfGroup(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
accepts loose VisualNodes if it is an
instance of VisualSubgraph. |
static boolean |
checkNodeRuleForAcceptOverlayEdgeCreation(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether a VisualNode should accept an overlay
edge creation. |
static boolean |
checkNodeRuleForAcceptPasteIfGroup(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
accepts paste operations if it is an instance of
VisualSubgraph. |
static boolean |
checkNodeRuleForApplyCascadeNodeDeleteHierarchical(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the cascade node delete operations should be applied hierarchical. |
static boolean |
checkNodeRuleForApplyDegreesHierarchical(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the degree given by a NodeRule should be
applied hierarchical. |
static boolean |
checkNodeRuleForApplyEdgeSplitHierarchical(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the edge split operations should be applied hierarchical. |
static boolean |
checkNodeRuleForAttachSource(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
allows source attachments. |
static boolean |
checkNodeRuleForAttachTarget(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
allows target attachments. |
static boolean |
checkNodeRuleForCascadeDeleteEdges(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
cascades its edges when its deleted. |
static boolean |
checkNodeRuleForDetachOnMove(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
detaches on move. |
static boolean |
checkNodeRuleForDetachSource(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
allows source dettachments. |
static boolean |
checkNodeRuleForDetachTarget(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
allows target deattachments. |
static boolean |
checkNodeRuleForDisallowEdgeSplitRule(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode,
java.lang.String checkrule)
Identifies whether the given VisualNode
allows edge splits for the given checkrule name. |
static java.lang.String |
checkNodeRuleForDropHandlerName(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
has a drop-handler. |
static boolean |
checkNodeRuleForLegalSubgraph(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode,
VisualSubgraph visualsubgraph)
Identifies whether the given VisualNode
can be legally part of the specified VisualSubgraph. |
static boolean |
checkNodeRuleForMaximumInstanceCount(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Checks whether the given node has reached its maximum instance count. |
static boolean |
checkNodeRuleForMaximumInstanceCount2(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
|
static boolean |
checkNodeRuleForMinimumInstanceCount(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Checks whether the given node has reached its minimum instance count. |
static java.lang.String |
checkNodeRuleForNodeMovedInSubgraphHandlerName(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
has a node-moved-in-subgraph handler. |
static java.lang.String |
checkNodeRuleForOverlayEdgeCreation(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
has automatic edge creation upon node overlay. |
static boolean |
checkNodeRuleForProhibitEdgeSplit(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
prohibits edge-splits. |
static java.lang.String |
checkNodeRuleForSubgraphRemoveHandlerName(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
has a subgraph-remove handler. |
static java.lang.String |
checkNodeRuleForVisualNodeOverlayHandlerName(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
Identifies whether the given VisualNode
has a node-overlay handler. |
static boolean |
checkRuleForCopyable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is copyable. |
static boolean |
checkRuleForCutable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is cutable. |
static boolean |
checkRuleForDeletable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is deletable. |
static boolean |
checkRuleForMovable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is movable. |
static boolean |
checkRuleForSelectable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is selectable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final boolean checkRuleForSelectable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
VisualGraphObject is selectable.
config - the RuleConfiguration instancevisualgraph - the containing VisualGraph.visualgraphobject - the VisualGraphObject to check.
true if the given VisualGraphObject
is selectable, otherwise false.
public static final boolean checkRuleForDeletable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
VisualGraphObject is deletable.
config - the RuleConfiguration instancevisualgraph - the containing VisualGraph.visualgraphobject - the VisualGraphObject to check.
true if the given VisualGraphObject
is deletable, otherwise false.
public static final boolean checkRuleForMovable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
VisualGraphObject is movable.
config - the RuleConfiguration instancevisualgraph - the containing VisualGraph.visualgraphobject - the VisualGraphObject to check.
true if the given VisualGraphObject
is movable, otherwise false.
public static final boolean checkRuleForCopyable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
VisualGraphObject is copyable.
config - the RuleConfiguration instancevisualgraph - the containing VisualGraph.visualgraphobject - the VisualGraphObject to check.
true if the given VisualGraphObject
is copyable, otherwise false.
public static final boolean checkRuleForCutable(RuleConfiguration config,
VisualGraph visualgraph,
VisualGraphObject visualgraphobject)
VisualGraphObject is cutable.
config - the RuleConfiguration instancevisualgraph - the containing VisualGraph.visualgraphobject - the VisualGraphObject to check.
true if the given VisualGraphObject
is cutable, otherwise false.
public static final boolean checkEdgeRuleForDetachSource(RuleConfiguration config,
VisualGraph visualgraph,
VisualEdge visualedge)
VisualEdge
allows source deattachments.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualedge - the VisualEdge to check.
true if source dettachments are allowed,
otherwise false.
public static final boolean checkEdgeRuleForDetachTarget(RuleConfiguration config,
VisualGraph visualgraph,
VisualEdge visualedge)
VisualEdge
allows target deattachments.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualedge - the VisualEdge to check.
true if target dettachments are allowed,
otherwise false.
public static final int checkEdgeRuleForEdgeInsertMode(RuleConfiguration config,
VisualGraph visualgraph,
VisualEdge visualedge)
VisualEdge.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualedge - the VisualEdge to check.
VisualEdge.
public static final int checkEdgeRuleForSnapToPortDistance(RuleConfiguration config,
VisualGraph visualgraph,
VisualEdge visualedge)
VisualEdge.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualedge - the VisualEdge to check.
VisualEdge.
public static final boolean checkNodeRuleForApplyDegreesHierarchical(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
NodeRule should be
applied hierarchical.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if degrees should be applied hierarchical,
otherwise falseNodeRule.getIndegreeMinimum(),
NodeRule.getIndegreeMaximum(),
NodeRule.getOutdegreeMinimum(),
NodeRule.getOutdegreeMaximum()
public static final boolean checkNodeRuleForDetachTarget(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
allows target deattachments.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if target detachments are allowed,
otherwise false.
public static final boolean checkNodeRuleForAttachTarget(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
allows target attachments.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if target attachments are allowed,
otherwise false.
public static final boolean checkNodeRuleForDetachSource(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
allows source dettachments.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if source detachments are allowed,
otherwise false.
public static final boolean checkNodeRuleForAttachSource(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
allows source attachments.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if source attachments are allowed,
otherwise false.
public static final boolean checkNodeRuleForMinimumInstanceCount(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if the minimum instance count has been
reached, otherwise false.
public static final boolean checkNodeRuleForMaximumInstanceCount(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if the maximum instance count has been
reached, otherwise false.
public static final boolean checkNodeRuleForMaximumInstanceCount2(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
public static final boolean checkNodeRuleForLegalSubgraph(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode,
VisualSubgraph visualsubgraph)
VisualNode
can be legally part of the specified VisualSubgraph.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.visualsubgraph - the VisualSubgraph to check.
true if subgraph is legal,
otherwise false.
public static final boolean checkNodeRuleForCascadeDeleteEdges(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
cascades its edges when its deleted.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if cascading is enabled.
otherwise false.
public static final boolean checkNodeRuleFor11NodeDelete(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
cascades its edges when its deleted. This rule applies
only to nodes with indegree = outdegree = 1. The two
deleted edges are then replaced by a new edge.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if cascading is enabled.
otherwise false.
public static final boolean checkNodeRuleForApplyCascadeNodeDeleteHierarchical(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if the cascade node delete operations should be
applied hierarchical, otherwise falseNodeRule.isCascade11NodeDelete()
public static final boolean checkNodeRuleForDetachOnMove(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
detaches on move.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if the node detaches on move,
otherwise false.
public static final boolean checkNodeRuleForApplyEdgeSplitHierarchical(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if the edge split operation should be applied
hierarchical, otherwise falseNodeRule.isEdgeSplitProhibited(),
EdgeRule.getEdgeInsertMode()
public static final boolean checkNodeRuleForProhibitEdgeSplit(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
prohibits edge-splits.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if the node prohibits edge-splits,
otherwise false.
public static final boolean checkNodeRuleForAcceptOverlayEdgeCreation(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode should accept an overlay
edge creation.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if the VisualNode should accept
overlay edge creation, otherwise false
public static final boolean checkNodeRuleForAcceptLooseNodesIfGroup(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
accepts loose VisualNodes if it is an
instance of VisualSubgraph.
config - the RuleConfiguration instancevisualgraph - the VisualGraph
to check.visualnode - the VisualNode
to check.
true if the node accepts loose nodes or is not an
instance of VisualSubgraph, otherwise
false.
public static final boolean checkNodeRuleForAcceptLooseNodesIfGroup(RuleConfiguration config,
VisualGraph visualgraph,
java.lang.String noderuleName)
NodeRule given through
noderuleName accepts loose
VisualNodes.
config - the RuleConfiguration instancevisualgraph - the VisualGraph
to check.
true if the NodeRule accepts loose nodes,
otherwise false.
public static final boolean checkNodeRuleForAcceptPasteIfGroup(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
accepts paste operations if it is an instance of
VisualSubgraph.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if the node accepts paste operations,
otherwise false.
public static final java.lang.String checkNodeRuleForDropHandlerName(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
has a drop-handler.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
null.
public static final java.lang.String checkNodeRuleForNodeMovedInSubgraphHandlerName(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
has a node-moved-in-subgraph handler.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
null.
public static final java.lang.String checkNodeRuleForSubgraphRemoveHandlerName(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
has a subgraph-remove handler.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
null.
public static final java.lang.String checkNodeRuleForVisualNodeOverlayHandlerName(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
has a node-overlay handler.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
null.
public static final boolean checkNodeRuleForDisallowEdgeSplitRule(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode,
java.lang.String checkrule)
VisualNode
allows edge splits for the given checkrule name.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.checkrule - the name of the rule to check for.
true if the split is allowed,
otherwise null.
public static final java.lang.String checkNodeRuleForOverlayEdgeCreation(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualNode
has automatic edge creation upon node overlay.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
null if no edge creation is enabled,
otherwise the edge creation string.
public static final int checkGraphRuleForAutoSpace(RuleConfiguration config,
VisualGraph visualgraph)
VisualGraph has
auto-space enabled. The current auto-space mode is returned.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.
public static final boolean checkGraphRuleForEdgeInsertSinglePosition(RuleConfiguration config,
VisualGraph visualgraph)
VisualGraph is set
to edge-insert into a single position if multiple items
are subject to edge-splits.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.
true if edge splits occur at a single position,
otherwise false.
public static final int checkGraphRuleForEdgeSplitTolerance(RuleConfiguration config,
VisualGraph visualgraph)
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.
public static final boolean checkGraphRuleForLegalCrossVisualSubgrahEdgeSplit(RuleConfiguration config,
VisualGraph visualgraph,
VisualNode visualnode)
VisualGraph
permits its edges to be split by the given VisualNode
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.visualnode - the VisualNode to check.
true if the edgesplit across graphs is legal,
otherwise false.
public static final boolean checkGraphRuleForAcceptLooseObjects(RuleConfiguration config,
VisualGraph visualgraph)
VisualGraph accepts loose objects.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.
true if the given VisualGraph accepts
loose objects, otherwise false.
public static final java.lang.String checkGraphRuleForDropHandlerName(RuleConfiguration config,
VisualGraph visualgraph)
VisualGraph is associated with a
drop-handler.
config - the RuleConfiguration instancevisualgraph - the VisualGraph to check.
null.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||