Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.jboogie.layout

Class LayoutableElements

com.gentleware.jboogie.layout.LayoutableElements

public final class LayoutableElements


Some utility methods used especially in layouts.
Authors:
Stephen Kelvin


 Constructor Summary
private   LayoutableElements()
 
arrow_up
 

 Method Summary
public static void   convertFromGlobal(LayoutableElement destination, Point2D pos)
converts a global position to a position relative to some graphnode. 
public static void   convertPosition(Point2D pos, LayoutableElement source, LayoutableElement dest)
Converts a position relative to source into a position relative to dest. 
public static void   convertToGlobal(LayoutableElement source, Point2D pos)
converts a position which is relative to some graphnode to a global position. 
public static LayoutableElement   findContainedWithTypeInfo(Project project, LayoutableElement parent, SimpleTypeInfo typeInfo)
Looks for a descendant of the graph element that has a certain type info set. 
private static LayoutableElement   findContainedWithTypeInfoInternal(Project project, LayoutableElement parent, SimpleTypeInfo typeInfo, boolean allowUmlSemantic)
 
public static Point2D   getGlobalPosition(LayoutableElement source)
 
public static boolean   isAdornment(Project project, LayoutableElement element)
Checks if the given element is an adornment to another element, e.g. 
public static boolean   isNodeAdornment(Project project, LayoutableElement element)
Checks if the given element is a node adornment to a node, e.g. 
arrow_up
 

Tagged Values
static false
 

 Constructor Detail

LayoutableElements

private LayoutableElements LayoutableElements()

Returns:
arrow_up
 Method Detail

convertFromGlobal

public static void convertFromGlobal(LayoutableElement destination, Point2D pos)


converts a global position to a position relative to some graphnode.  
Parameters:
destination - the node that will serve as the new origin
pos - the Point2D that you want to transform to local coordinates
arrow_up


convertPosition

public static void convertPosition(Point2D pos, LayoutableElement source, LayoutableElement dest)


Converts a position relative to source into a position relative to dest.  
Parameters:
pos - The position in the coordinate system of source.
source - The first coordinate system.
dest - The destination coordinate system.
arrow_up


convertToGlobal

public static void convertToGlobal(LayoutableElement source, Point2D pos)


converts a position which is relative to some graphnode to a global position. For example, the position of a rapid button within the attribute compartment might be (90,2), and will be (390,102) afterwards for use in a jemmy test, if you pass the attributecompartment as node  
Parameters:
source - the node which contains the local position
pos - the Point2D that you want to transform to Global coordinates
arrow_up


findContainedWithTypeInfo

public static LayoutableElement findContainedWithTypeInfo(Project project, LayoutableElement parent, SimpleTypeInfo typeInfo)


Looks for a descendant of the graph element that has a certain type info set. The search is depth-first, but search on a branch will stop if a graph element is encountered that has an associated Uml1SemanticModelBridge or CoreSemanticModelBridge (because type infos of any further descendants are associated to those nodes.) E.g. the graph node that represent a UML class has a descendant graph node with associated type info = "name", which itself has a contained text element that holds the name of the class:
GraphNode -> Uml14SemanticBridge -> UmlClass
GraphNode (header compartment)
GraphNode -> SimpleSemanticModelElement -> "name"
TextElement "ClassName"
...
 
Parameters:
project -
parent -
typeInfo -
Returns:
arrow_up


findContainedWithTypeInfoInternal

private static LayoutableElement findContainedWithTypeInfoInternal(Project project, LayoutableElement parent, SimpleTypeInfo typeInfo, boolean allowUmlSemantic)

Parameters:
project -
parent -
typeInfo -
allowUmlSemantic -
Returns:
arrow_up


getGlobalPosition

public static Point2D getGlobalPosition(LayoutableElement source)

Parameters:
source -
Returns:
arrow_up


isAdornment

public static boolean isAdornment(Project project, LayoutableElement element)


Checks if the given element is an adornment to another element, e.g. an association end name or the stereotype of an actor stickman.  
Parameters:
project -
element - The element you want to check.
Returns:
True if the given element has an AdornmentShape set as layouting Shape.
arrow_up


isNodeAdornment

public static boolean isNodeAdornment(Project project, LayoutableElement element)


Checks if the given element is a node adornment to a node, e.g. the stereotype of an actor stickman.  
Parameters:
project - The current project.
element - The element you want to check.
Returns:
True if the given element has a NodeAdornmentShape set as layouting Shape.
arrow_up
Created  2004 - 10 - 21

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.