Overview | Package | Class | Use | Tree | Help
| HEADER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 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.
`CompositeView` | `createCompartmentView(Compartment compartment, DiagramViewOptions options, Graphics g)`
`DiagramViewOptions` | `createDefaultDiagramViewOptions()`
`CompositeView` | `createDiagramView(Diagram diagram, Graphics g)` Creates the diagram view
`CompositeView` | `createEdgeView(Edge edge, DiagramViewOptions options, Graphics g)`
`CompositeView` | `createEquivalentNodeGroupView(EquivalentNodeGroup group, DiagramViewOptions options, Graphics g)` Creates view for equivalent node grpoup.
`CompositeView` | `createNodeView(Node node, DiagramViewOptions options, Graphics g)`
`Icon` | `getIcon(Class type)` Default implimentation of the method.
`void` | `hideElement(DiagramElement element)`
`boolean` | `isReaction(Base kernel)`
`void` | `moveNode(Node node, Point newLocation)`
`static int` | `proportion(int L, int l)`
`void` | `removeElement(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

Overview | Package | Class | Use | Tree | Help
| FOOTER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

BOTTOM