HEADER

biouml.model
Class DefaultDiagramViewBuilder

Direct Known Subclasses:
EModelDiagramViewBuilder, PathwayDiagramViewBuilder

public class DefaultDiagramViewBuilder
implements DiagramViewBuilder

Default implementation of DiagramViewBuilder.

todo implementation

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)
          Creates compartment view.
 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)
           
 Action[]getInsertActions(Diagram diagram)
           
 voidhide(Compartment diagram, Filter filter)
           
 voidhideElement(DiagramElement element)
           
 voidhighlight(Compartment diagram, Filter filter, Brush brush)
           
 voidhighlightNode(Node node, Filter filter, Brush brush)
           
 voidmoveNode(Node node, Point newLocation)
           
 static intproportion(int L, int l)
           
 voidremoveElement(DiagramElement element)
           
 voidrestoreView(Compartment diagram)
          Removes effects of previous filter.

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)
Creates compartment view.

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.

createNodeView

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

getInsertActions

public Action[] getInsertActions(Diagram diagram)

hide

public void hide(Compartment diagram, Filter filter)
todo comment

hideElement

public void hideElement(DiagramElement element)
todo implement

highlight

public void highlight(Compartment diagram, Filter filter, Brush brush)

highlightNode

public void highlightNode(Node node, Filter filter, Brush brush)

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

restoreView

public void restoreView(Compartment diagram)
Removes effects of previous filter.

Association Links

to Class java.lang.String


FOOTER

BOTTOM