com.tensegrity.graph.rule
Class RuleChecks

java.lang.Object
  extended bycom.tensegrity.graph.rule.RuleChecks

public final class RuleChecks
extends java.lang.Object

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.

Version:
$Id: RuleChecks.java,v 1.87 2006/06/01 15:59:54 MichaelKegel Exp $
Author:
Stepan Rutz, MKegel

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

checkRuleForSelectable

public static final boolean checkRuleForSelectable(RuleConfiguration config,
                                                   VisualGraph visualgraph,
                                                   VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is selectable.

Parameters:
config - the RuleConfiguration instance
visualgraph - the containing VisualGraph.
visualgraphobject - the VisualGraphObject to check.
Returns:
true if the given VisualGraphObject is selectable, otherwise false.

checkRuleForDeletable

public static final boolean checkRuleForDeletable(RuleConfiguration config,
                                                  VisualGraph visualgraph,
                                                  VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is deletable.

Parameters:
config - the RuleConfiguration instance
visualgraph - the containing VisualGraph.
visualgraphobject - the VisualGraphObject to check.
Returns:
true if the given VisualGraphObject is deletable, otherwise false.

checkRuleForMovable

public static final boolean checkRuleForMovable(RuleConfiguration config,
                                                VisualGraph visualgraph,
                                                VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is movable.

Parameters:
config - the RuleConfiguration instance
visualgraph - the containing VisualGraph.
visualgraphobject - the VisualGraphObject to check.
Returns:
true if the given VisualGraphObject is movable, otherwise false.

checkRuleForCopyable

public static final boolean checkRuleForCopyable(RuleConfiguration config,
                                                 VisualGraph visualgraph,
                                                 VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is copyable.

Parameters:
config - the RuleConfiguration instance
visualgraph - the containing VisualGraph.
visualgraphobject - the VisualGraphObject to check.
Returns:
true if the given VisualGraphObject is copyable, otherwise false.

checkRuleForCutable

public static final boolean checkRuleForCutable(RuleConfiguration config,
                                                VisualGraph visualgraph,
                                                VisualGraphObject visualgraphobject)
Checks whether the given VisualGraphObject is cutable.

Parameters:
config - the RuleConfiguration instance
visualgraph - the containing VisualGraph.
visualgraphobject - the VisualGraphObject to check.
Returns:
true if the given VisualGraphObject is cutable, otherwise false.

checkEdgeRuleForDetachSource

public static final boolean checkEdgeRuleForDetachSource(RuleConfiguration config,
                                                         VisualGraph visualgraph,
                                                         VisualEdge visualedge)
Identifies whether the given VisualEdge allows source deattachments.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualedge - the VisualEdge to check.
Returns:
true if source dettachments are allowed, otherwise false.

checkEdgeRuleForDetachTarget

public static final boolean checkEdgeRuleForDetachTarget(RuleConfiguration config,
                                                         VisualGraph visualgraph,
                                                         VisualEdge visualedge)
Identifies whether the given VisualEdge allows target deattachments.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualedge - the VisualEdge to check.
Returns:
true if target dettachments are allowed, otherwise false.

checkEdgeRuleForEdgeInsertMode

public static final int checkEdgeRuleForEdgeInsertMode(RuleConfiguration config,
                                                       VisualGraph visualgraph,
                                                       VisualEdge visualedge)
Identifies the edge-insert mode of the given VisualEdge.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualedge - the VisualEdge to check.
Returns:
the edge-insert mode of the given VisualEdge.

checkEdgeRuleForSnapToPortDistance

public static final int checkEdgeRuleForSnapToPortDistance(RuleConfiguration config,
                                                           VisualGraph visualgraph,
                                                           VisualEdge visualedge)
Identifies the snap-to-port distance value of the given VisualEdge.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualedge - the VisualEdge to check.
Returns:
the snap-to-port distance value of the given VisualEdge.

checkNodeRuleForApplyDegreesHierarchical

public static final boolean checkNodeRuleForApplyDegreesHierarchical(RuleConfiguration config,
                                                                     VisualGraph visualgraph,
                                                                     VisualNode visualnode)
Identifies whether the degree given by a NodeRule should be applied hierarchical.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if degrees should be applied hierarchical, otherwise false
See Also:
NodeRule.getIndegreeMinimum(), NodeRule.getIndegreeMaximum(), NodeRule.getOutdegreeMinimum(), NodeRule.getOutdegreeMaximum()

checkNodeRuleForDetachTarget

public static final boolean checkNodeRuleForDetachTarget(RuleConfiguration config,
                                                         VisualGraph visualgraph,
                                                         VisualNode visualnode)
Identifies whether the given VisualNode allows target deattachments.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if target detachments are allowed, otherwise false.

checkNodeRuleForAttachTarget

public static final boolean checkNodeRuleForAttachTarget(RuleConfiguration config,
                                                         VisualGraph visualgraph,
                                                         VisualNode visualnode)
Identifies whether the given VisualNode allows target attachments.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if target attachments are allowed, otherwise false.

checkNodeRuleForDetachSource

public static final boolean checkNodeRuleForDetachSource(RuleConfiguration config,
                                                         VisualGraph visualgraph,
                                                         VisualNode visualnode)
Identifies whether the given VisualNode allows source dettachments.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if source detachments are allowed, otherwise false.

checkNodeRuleForAttachSource

public static final boolean checkNodeRuleForAttachSource(RuleConfiguration config,
                                                         VisualGraph visualgraph,
                                                         VisualNode visualnode)
Identifies whether the given VisualNode allows source attachments.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if source attachments are allowed, otherwise false.

checkNodeRuleForMinimumInstanceCount

public static final boolean checkNodeRuleForMinimumInstanceCount(RuleConfiguration config,
                                                                 VisualGraph visualgraph,
                                                                 VisualNode visualnode)
Checks whether the given node has reached its minimum instance count. The nodes are categorized by their assigned rules.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the minimum instance count has been reached, otherwise false.

checkNodeRuleForMaximumInstanceCount

public static final boolean checkNodeRuleForMaximumInstanceCount(RuleConfiguration config,
                                                                 VisualGraph visualgraph,
                                                                 VisualNode visualnode)
Checks whether the given node has reached its maximum instance count. The nodes are categorized by their assigned rules.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the maximum instance count has been reached, otherwise false.

checkNodeRuleForMaximumInstanceCount2

public static final boolean checkNodeRuleForMaximumInstanceCount2(RuleConfiguration config,
                                                                  VisualGraph visualgraph,
                                                                  VisualNode visualnode)

checkNodeRuleForLegalSubgraph

public static final boolean checkNodeRuleForLegalSubgraph(RuleConfiguration config,
                                                          VisualGraph visualgraph,
                                                          VisualNode visualnode,
                                                          VisualSubgraph visualsubgraph)
Identifies whether the given VisualNode can be legally part of the specified VisualSubgraph.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
visualsubgraph - the VisualSubgraph to check.
Returns:
true if subgraph is legal, otherwise false.

checkNodeRuleForCascadeDeleteEdges

public static final boolean checkNodeRuleForCascadeDeleteEdges(RuleConfiguration config,
                                                               VisualGraph visualgraph,
                                                               VisualNode visualnode)
Identifies whether the given VisualNode cascades its edges when its deleted.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if cascading is enabled. otherwise false.

checkNodeRuleFor11NodeDelete

public static final boolean checkNodeRuleFor11NodeDelete(RuleConfiguration config,
                                                         VisualGraph visualgraph,
                                                         VisualNode visualnode)
Identifies whether the given 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.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if cascading is enabled. otherwise false.

checkNodeRuleForApplyCascadeNodeDeleteHierarchical

public static final boolean checkNodeRuleForApplyCascadeNodeDeleteHierarchical(RuleConfiguration config,
                                                                               VisualGraph visualgraph,
                                                                               VisualNode visualnode)
Identifies whether the cascade node delete operations should be applied hierarchical.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the cascade node delete operations should be applied hierarchical, otherwise false
See Also:
NodeRule.isCascade11NodeDelete()

checkNodeRuleForDetachOnMove

public static final boolean checkNodeRuleForDetachOnMove(RuleConfiguration config,
                                                         VisualGraph visualgraph,
                                                         VisualNode visualnode)
Identifies whether the given VisualNode detaches on move.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the node detaches on move, otherwise false.

checkNodeRuleForApplyEdgeSplitHierarchical

public static final boolean checkNodeRuleForApplyEdgeSplitHierarchical(RuleConfiguration config,
                                                                       VisualGraph visualgraph,
                                                                       VisualNode visualnode)
Identifies whether the edge split operations should be applied hierarchical.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the edge split operation should be applied hierarchical, otherwise false
See Also:
NodeRule.isEdgeSplitProhibited(), EdgeRule.getEdgeInsertMode()

checkNodeRuleForProhibitEdgeSplit

public static final boolean checkNodeRuleForProhibitEdgeSplit(RuleConfiguration config,
                                                              VisualGraph visualgraph,
                                                              VisualNode visualnode)
Identifies whether the given VisualNode prohibits edge-splits.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the node prohibits edge-splits, otherwise false.

checkNodeRuleForAcceptOverlayEdgeCreation

public static final boolean checkNodeRuleForAcceptOverlayEdgeCreation(RuleConfiguration config,
                                                                      VisualGraph visualgraph,
                                                                      VisualNode visualnode)
Identifies whether a VisualNode should accept an overlay edge creation.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the VisualNode should accept overlay edge creation, otherwise false

checkNodeRuleForAcceptLooseNodesIfGroup

public static final boolean checkNodeRuleForAcceptLooseNodesIfGroup(RuleConfiguration config,
                                                                    VisualGraph visualgraph,
                                                                    VisualNode visualnode)
Identifies whether the given VisualNode accepts loose VisualNodes if it is an instance of VisualSubgraph.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the node accepts loose nodes or is not an instance of VisualSubgraph, otherwise false.

checkNodeRuleForAcceptLooseNodesIfGroup

public static final boolean checkNodeRuleForAcceptLooseNodesIfGroup(RuleConfiguration config,
                                                                    VisualGraph visualgraph,
                                                                    java.lang.String noderuleName)
Identifies whether the NodeRule given through noderuleName accepts loose VisualNodes.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
Returns:
true if the NodeRule accepts loose nodes, otherwise false.

checkNodeRuleForAcceptPasteIfGroup

public static final boolean checkNodeRuleForAcceptPasteIfGroup(RuleConfiguration config,
                                                               VisualGraph visualgraph,
                                                               VisualNode visualnode)
Identifies whether the given VisualNode accepts paste operations if it is an instance of VisualSubgraph.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the node accepts paste operations, otherwise false.

checkNodeRuleForDropHandlerName

public static final java.lang.String checkNodeRuleForDropHandlerName(RuleConfiguration config,
                                                                     VisualGraph visualgraph,
                                                                     VisualNode visualnode)
Identifies whether the given VisualNode has a drop-handler.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
the string name of the associated drop-handler, otherwise null.

checkNodeRuleForNodeMovedInSubgraphHandlerName

public static final java.lang.String checkNodeRuleForNodeMovedInSubgraphHandlerName(RuleConfiguration config,
                                                                                    VisualGraph visualgraph,
                                                                                    VisualNode visualnode)
Identifies whether the given VisualNode has a node-moved-in-subgraph handler.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
the string name of the associated node-moved-in-subgraph handler, otherwise null.

checkNodeRuleForSubgraphRemoveHandlerName

public static final java.lang.String checkNodeRuleForSubgraphRemoveHandlerName(RuleConfiguration config,
                                                                               VisualGraph visualgraph,
                                                                               VisualNode visualnode)
Identifies whether the given VisualNode has a subgraph-remove handler.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
the string name of the associated subgraph-remove handler, otherwise null.

checkNodeRuleForVisualNodeOverlayHandlerName

public static final java.lang.String checkNodeRuleForVisualNodeOverlayHandlerName(RuleConfiguration config,
                                                                                  VisualGraph visualgraph,
                                                                                  VisualNode visualnode)
Identifies whether the given VisualNode has a node-overlay handler.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
the string name of the associated node-overlay handler, otherwise null.

checkNodeRuleForDisallowEdgeSplitRule

public static final 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.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
checkrule - the name of the rule to check for.
Returns:
true if the split is allowed, otherwise null.

checkNodeRuleForOverlayEdgeCreation

public static final java.lang.String checkNodeRuleForOverlayEdgeCreation(RuleConfiguration config,
                                                                         VisualGraph visualgraph,
                                                                         VisualNode visualnode)
Identifies whether the given VisualNode has automatic edge creation upon node overlay.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
null if no edge creation is enabled, otherwise the edge creation string.

checkGraphRuleForAutoSpace

public static final int checkGraphRuleForAutoSpace(RuleConfiguration config,
                                                   VisualGraph visualgraph)
Checks whether the given VisualGraph has auto-space enabled. The current auto-space mode is returned.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
Returns:
the current auto-space mode is returned.

checkGraphRuleForEdgeInsertSinglePosition

public static final 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.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
Returns:
true if edge splits occur at a single position, otherwise false.

checkGraphRuleForEdgeSplitTolerance

public static final int checkGraphRuleForEdgeSplitTolerance(RuleConfiguration config,
                                                            VisualGraph visualgraph)
Checks for the tolerance value for edge-splitting.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
Returns:
the tolerance value for edge-splitting.

checkGraphRuleForLegalCrossVisualSubgrahEdgeSplit

public static final boolean checkGraphRuleForLegalCrossVisualSubgrahEdgeSplit(RuleConfiguration config,
                                                                              VisualGraph visualgraph,
                                                                              VisualNode visualnode)
Identifies whether the given VisualGraph permits its edges to be split by the given VisualNode

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
visualnode - the VisualNode to check.
Returns:
true if the edgesplit across graphs is legal, otherwise false.

checkGraphRuleForAcceptLooseObjects

public static final boolean checkGraphRuleForAcceptLooseObjects(RuleConfiguration config,
                                                                VisualGraph visualgraph)
Checks whether the given VisualGraph accepts loose objects.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
Returns:
true if the given VisualGraph accepts loose objects, otherwise false.

checkGraphRuleForDropHandlerName

public static final java.lang.String checkGraphRuleForDropHandlerName(RuleConfiguration config,
                                                                      VisualGraph visualgraph)
Checks whether the given VisualGraph is associated with a drop-handler.

Parameters:
config - the RuleConfiguration instance
visualgraph - the VisualGraph to check.
Returns:
the name of the associated drop-handler, otherwise null.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.