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 EllipseFillLayout

com.gentleware.jboogie.layout.LayoutStrategy
    inheritcom.gentleware.jboogie.layout.EllipseFillLayout

public class EllipseFillLayout


Reports its own preferred size so that an ellipse can be drawn around the rectangular bounds of its children. Each children is centered in the ellipse.

An ellipse (centered on the origin) can be described by

(1) (x/a)^2 + (y/b)^2 = 1 with a being its width and b its height.

I'd like the ellipse to have the same width/height ratio as the child, so for the upper right corner of the child:

(2) x/y == a/b <=> x = ay/b

Substituting x with ay/b in (1) yields: b = sqrt(2) * x and also a = sqrt(2) * y, so the ellipse must simply be by a factor of sqrt(2) wider and higher than its child.

Created: 22.04.2003 17:49:46

Authors:
Stephen Kelvin


 Attribute Summary
private double  _gap
 
private double  _sqrt2
 
arrow_up
 

 Association Summary
private LayoutX  _xAlign
 
arrow_up
 

 Constructor Summary
public   EllipseFillLayout(Project project, double gap, LayoutX xAlign)
 
arrow_up
 

 Method Summary
protected PBounds   getPreferredBoundsImpl(LayoutableElement container, List layoutableElements)
 
public void   reshapeElements(LayoutableElement container, List layoutableElements, DiMacroMemento memento)
 
arrow_up
 

Tagged Values
static false
 

 Attribute Detail

_gap

private double _gap

arrow_up


_sqrt2

private double _sqrt2

arrow_up
 Association Detail

_xAlign

private LayoutX _xAlign

arrow_up
 Constructor Detail

EllipseFillLayout

public EllipseFillLayout EllipseFillLayout(Project project, double gap, LayoutX xAlign)

Parameters:
project -
gap - distance between each corner of the contained element(s) and the ellipse.
xAlign -
Returns:
arrow_up
 Method Detail

getPreferredBoundsImpl

protected PBounds getPreferredBoundsImpl(LayoutableElement container, List layoutableElements)

Parameters:
container -
layoutableElements -
Returns:
arrow_up


reshapeElements

public void reshapeElements(LayoutableElement container, List layoutableElements, DiMacroMemento memento)

Parameters:
container -
layoutableElements -
memento -
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.