HEADER

biouml.model
Class DefaultDiagramViewBuilder

Direct Known Subclasses:
EModelDiagramViewBuilder, GinSimDiagramViewBuilder, PathwayDiagramViewBuilder

public class DefaultDiagramViewBuilder
implements DiagramViewBuilder

Default implementation of DiagramViewBuilder.

todo implementation

Constructor Summary
DefaultDiagramViewBuilder()
           

Method Summary
 static voidcalcAttachmentPoints(Rectangle r1, Rectangle r2, Point p1, Point p2, int offset)
          Calculates the attachment points to paint relation between two images described by the specified rectangles.
 CompositeViewcreateCompartmentView(Compartment compartment, DiagramViewOptions options, Graphics g)
           
 DiagramViewOptionscreateDefaultDiagramViewOptions()
           
 CompositeViewcreateDiagramView(Diagram diagram, Graphics g)
          Creates the diagram view
 CompositeViewcreateEdgeView(Edge edge, DiagramViewOptions options, Graphics g)
           
 CompositeViewcreateEquivalentNodeGroupView(EquivalentNodeGroup group, DiagramViewOptions options, Graphics g)
          Creates view for equivalent node grpoup.
 CompositeViewcreateNodeView(Node node, DiagramViewOptions options, Graphics g)
           
 IcongetIcon(Class type)
          Default implimentation of the method.
 voidhideElement(DiagramElement element)
           
 booleanisReaction(Base kernel)
           
 voidmoveNode(Node node, Point newLocation)
           
 static intproportion(int L, int l)
           
 voidremoveElement(DiagramElement element)
           

Constructor Detail

DefaultDiagramViewBuilder

public DefaultDiagramViewBuilder()
Method Detail

calcAttachmentPoints

public static void calcAttachmentPoints(Rectangle r1, Rectangle r2, Point p1, Point p2, int offset)
Calculates the attachment points to paint relation between two images described by the specified rectangles.
Parameters:
r1 - the minimal rectangle containing the first image
r2 - the minimal rectangle containing the second image
p1 - the attchment point for the first image
p2 - the attchment point for the second image
offset - the distance between the attachment point and minimal rectangle

Two situations are possible:

1 situation                           2 situation
________                     ______                 _______
|        |                   |      |               |       |
|        |    _______        |      |               |       |
|        |___|       |       |______|               |_______|
|________|   |       |               \                    |
|_______|                \ _______         __|_____
|       |       |        |
|       |       |        |
|_______|       |________|


createCompartmentView

public CompositeView createCompartmentView(Compartment compartment, DiagramViewOptions options, Graphics g)

createDefaultDiagramViewOptions

public DiagramViewOptions createDefaultDiagramViewOptions()

createDiagramView

public CompositeView createDiagramView(Diagram diagram, Graphics g)
Creates the diagram view

createEdgeView

public CompositeView createEdgeView(Edge edge, DiagramViewOptions options, Graphics g)
todo implement

createEquivalentNodeGroupView

public CompositeView createEquivalentNodeGroupView(EquivalentNodeGroup group, DiagramViewOptions options, Graphics g)
Creates view for equivalent node grpoup. In view mode they are represented by one node image, in design mode they look likes compartment.
pending design mode

createNodeView

public CompositeView createNodeView(Node node, DiagramViewOptions options, Graphics g)
todo implement

getIcon

public Icon getIcon(Class type)
Default implimentation of the method. The following convention is used: icon images located in the subdirectory 'resources' relative the specific DiagramViewBuilder. Icon file name is class name with suffix ".gif", first letter is lower case.

hideElement

public void hideElement(DiagramElement element)
todo implement

isReaction

public boolean isReaction(Base kernel)

moveNode

public void moveNode(Node node, Point newLocation)
todo implement

proportion

public static int proportion(int L, int l)

removeElement

public void removeElement(DiagramElement element)
todo implement

Association Links

to Class org.apache.log4j.Category


FOOTER

BOTTOM