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 LayoutValidator

com.gentleware.jboogie.layout.LayoutValidator

public class LayoutValidator


Holds a list of all diagram elements that need to be layouted.

Created: 20.03.2003 14:42:25

Authors:
Stephen Kelvin


 Attribute Summary
private Set  _dirtyElements
The closure of all invalid elements including all their containers and dependent edges. 
private Set  _frozenElements
All elements that may not be layouted by the current run of layouting. 
private Set  _invalidElements
All layoutable elements that are explicitly set to invalid because a command or user interaction has changed a property (such as name). 
private double  _oldDiagramBoundsX
 
private double  _oldDiagramBoundsY
 
arrow_up
 

 Association Summary
private LayoutPool  _layoutPool
The default set of layouts  
private Project  _project
 
public ProjectImpl  projectImpl
 
arrow_up
 

 Constructor Summary
public   LayoutValidator(Project project)
 
arrow_up
 

 Method Summary
public void   addAllContainedElementsAndDependentEdges(Collection set, LayoutableElement element)
 
public void   adjustDiagramSize(LayoutableDiagram diagram, DiMacroMemento memento)
Layout this diagram's contained elements and then adjust the size of the diagram itself  
public void   clearFrozenNodes()
 
public void   clearInvalidElements()
 
public void   dispose()
 
private List   getDependentEdges(LayoutableElement layoutableElement)
 
public LayoutStrategy   getLayout(LayoutableElement layoutableElement)
 
public LayoutPool   getLayoutPool()
 
public ShapeStrategy   getShape(LayoutableElement layoutableElement)
 
public void   handleDiElementDeleted(RefObject diagramElement)
If a di-element is deleted (via the destructor), then it must not be contained in the invalidElements-lists, so we remove it  
public boolean   isDirty(LayoutableElement layoutableElement)
 
public boolean   isFrozen(LayoutableElement element)
 
public boolean   isInvalid(LayoutableElement layoutableElement)
 
public boolean   isValid()
 
public void   markContainerAsFrozen(LayoutableElement container)
The given element (container) will not be layouted. 
private void   optimizedDragging(List copyDirtyElements, Set dirtyDiagrams, DiMacroMemento macroMemento)
This method checks if any of the dirty (e.g. 
public void   setCacheEnabled(boolean enable)
 
public void   setDirty(LayoutableElement layoutableElement)
 
public void   setLayoutInvalid(List elements)
 
public void   setLayoutInvalid(LayoutableElement layoutableElement)
 
public void   setLayoutInvalid(LayoutableElement layoutableElement, boolean recursive)
 
public void   setLayoutInvalid(RefObject element, SimpleTypeInfo typeInfo, boolean recursive)
Invalidates all DI representations for the given element. 
public void   validate(DiMacroMemento macroMemento)
Layouts all invalid elements. 
public void   validate(DiMacroMemento macroMemento, boolean allowDraggingOptimizing)
 
public void   validate(DiMacroMemento macroMemento, LayoutPool layoutPool)
 
public void   validate(DiMacroMemento macroMemento, LayoutPool layoutPool, boolean allowDraggingOptimizing)
 
arrow_up
 

Tagged Values
static false
 

 Attribute Detail

_dirtyElements

private Set _dirtyElements

The closure of all invalid elements including all their containers and dependent edges.  
arrow_up


_frozenElements

private Set _frozenElements

All elements that may not be layouted by the current run of layouting.  
arrow_up


_invalidElements

private Set _invalidElements

All layoutable elements that are explicitly set to invalid because a command or user interaction has changed a property (such as name).  
arrow_up


_oldDiagramBoundsX

private double _oldDiagramBoundsX

arrow_up


_oldDiagramBoundsY

private double _oldDiagramBoundsY

arrow_up
 Association Detail

_layoutPool

private LayoutPool _layoutPool

The default set of layouts  
arrow_up


_project

private Project _project

arrow_up


projectImpl

public ProjectImpl projectImpl

arrow_up
 Constructor Detail

LayoutValidator

public LayoutValidator LayoutValidator(Project project)

Parameters:
project -
Returns:
arrow_up
 Method Detail

addAllContainedElementsAndDependentEdges

public void addAllContainedElementsAndDependentEdges(Collection set, LayoutableElement element)

Parameters:
set -
element -
arrow_up


adjustDiagramSize

public void adjustDiagramSize(LayoutableDiagram diagram, DiMacroMemento memento)


Layout this diagram's contained elements and then adjust the size of the diagram itself  
Parameters:
diagram -
memento -
Exceptions:
NullPointerException if diagram is null
arrow_up


clearFrozenNodes

public void clearFrozenNodes()

arrow_up


clearInvalidElements

public void clearInvalidElements()

arrow_up


dispose

public void dispose()

arrow_up


getDependentEdges

private List getDependentEdges(LayoutableElement layoutableElement)

Parameters:
layoutableElement -
Returns:
arrow_up


getLayout

public LayoutStrategy getLayout(LayoutableElement layoutableElement)

Parameters:
layoutableElement -
Returns:
arrow_up


getLayoutPool

public LayoutPool getLayoutPool()

Returns:
arrow_up


getShape

public ShapeStrategy getShape(LayoutableElement layoutableElement)

Parameters:
layoutableElement -
Returns:
arrow_up


handleDiElementDeleted

public void handleDiElementDeleted(RefObject diagramElement)


If a di-element is deleted (via the destructor), then it must not be contained in the invalidElements-lists, so we remove it  
Parameters:
diagramElement -
arrow_up


isDirty

public boolean isDirty(LayoutableElement layoutableElement)

Parameters:
layoutableElement -
Returns:
arrow_up


isFrozen

public boolean isFrozen(LayoutableElement element)

Parameters:
element -
Returns:
arrow_up


isInvalid

public boolean isInvalid(LayoutableElement layoutableElement)

Parameters:
layoutableElement -
Returns:
true if the element is invalid (invalid implies dirty if called during validate)
arrow_up


isValid

public boolean isValid()

Returns:
arrow_up


markContainerAsFrozen

public void markContainerAsFrozen(LayoutableElement container)


The given element (container) will not be layouted. The children will.  
Parameters:
container -
arrow_up


optimizedDragging

private void optimizedDragging(List copyDirtyElements, Set dirtyDiagrams, DiMacroMemento macroMemento)


This method checks if any of the dirty (e.g. dragged) elements is near the diagram border. if so, then a complete "adjustDiagramSize()" is performed. If not, then this check is not performed, which saves a lot of time when dragging elements in the middle of big diagrams.  
Parameters:
copyDirtyElements -
dirtyDiagrams -
macroMemento -
arrow_up


setCacheEnabled

public void setCacheEnabled(boolean enable)

Parameters:
enable -
arrow_up


setDirty

public void setDirty(LayoutableElement layoutableElement)

Parameters:
layoutableElement -
arrow_up


setLayoutInvalid

public void setLayoutInvalid(List elements)

Parameters:
elements -
arrow_up


setLayoutInvalid

public void setLayoutInvalid(LayoutableElement layoutableElement)

Parameters:
layoutableElement -
arrow_up


setLayoutInvalid

public void setLayoutInvalid(LayoutableElement layoutableElement, boolean recursive)

Parameters:
layoutableElement - the element to invalidate. If you give null, nothing will be done.
recursive - set all contained invalid or not?
arrow_up


setLayoutInvalid

public void setLayoutInvalid(RefObject element, SimpleTypeInfo typeInfo, boolean recursive)


Invalidates all DI representations for the given element.  
Parameters:
element - The element that should be re-layouted at the end of the command.
typeInfo - Invalidate only DI elements with the given type info. If null, the type info is ignored.
recursive -
arrow_up


validate

public void validate(DiMacroMemento macroMemento)


Layouts all invalid elements.  
Parameters:
macroMemento - If you give a memento, it is enhanced with the states of the elements before layouting.
arrow_up


validate

public void validate(DiMacroMemento macroMemento, boolean allowDraggingOptimizing)

Parameters:
macroMemento -
allowDraggingOptimizing -
arrow_up


validate

public void validate(DiMacroMemento macroMemento, LayoutPool layoutPool)

Parameters:
macroMemento -
layoutPool -
arrow_up


validate

public void validate(DiMacroMemento macroMemento, LayoutPool layoutPool, boolean allowDraggingOptimizing)

Parameters:
macroMemento -
layoutPool -
allowDraggingOptimizing -
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.