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

## biouml.model
Class DefaultDiagramViewBuilder

    java.lang.Object
      biouml.model.DefaultDiagramViewBuilder

All Implemented Interfaces:
  DiagramViewBuilder

Direct Known Subclasses:
  EModelDiagramViewBuilder, GinSimDiagramViewBuilder, PathwayDiagramViewBuilder

public class DefaultDiagramViewBuilder
extends java.lang.Object
implements DiagramViewBuilder

Default implementation of `DiagramViewBuilder`.

To do:
  implementation

Field Summary
`protected org.apache.log4j.Category` | `log`

Constructor Summary
`DefaultDiagramViewBuilder()`

Method Summary
`protected void` | `buildNodes(Compartment compartment, DiagramViewOptions options, java.awt.Graphics g)` built all nodes and add them into compartment
`static void` | `calcAttachmentPoints(java.awt.Rectangle r1, java.awt.Rectangle r2, java.awt.Point p1, java.awt.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, java.awt.Graphics g)`
`DiagramViewOptions` | `createDefaultDiagramViewOptions()`
`CompositeView` | `createDiagramView(Diagram diagram, java.awt.Graphics g)` Creates the diagram view
`CompositeView` | `createEdgeView(Edge edge, DiagramViewOptions options, java.awt.Graphics g)`
`CompositeView` | `createEquivalentNodeGroupView(EquivalentNodeGroup group, DiagramViewOptions options, java.awt.Graphics g)` Creates view for equivalent node grpoup.
`protected boolean` | `createNodeCoreView(CompositeView container, Node node, DiagramViewOptions options, java.awt.Graphics g)`
`CompositeView` | `createNodeView(Node node, DiagramViewOptions options, java.awt.Graphics g)`
`protected boolean` | `createNoteView(CompositeView container, Node node, DiagramViewOptions options, java.awt.Graphics g)`
`protected CompositeView` | `doCreateCompartmentView(Compartment compartment, DiagramViewOptions options, java.awt.Graphics g)` Creates compartment view.
`javax.swing.Icon` | `getIcon(java.lang.Class type)` Default implimentation of the method.
`protected javax.swing.Icon` | `getIcon(java.lang.Class type, java.lang.Class resourceRoot)`
`void` | `hideElement(DiagramElement element)`
`boolean` | `isReaction(Base kernel)`
`void` | `moveNode(Node node, java.awt.Point newLocation)`
`static int` | `proportion(int L, int l)`
`void` | `removeElement(DiagramElement element)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected org.apache.log4j.Category log

Constructor Detail

### DefaultDiagramViewBuilder

    public DefaultDiagramViewBuilder()

Method Detail

### createDefaultDiagramViewOptions

    public DiagramViewOptions createDefaultDiagramViewOptions()

  Specified by:
    `createDefaultDiagramViewOptions` in interface `DiagramViewBuilder`

### getIcon

    public javax.swing.Icon getIcon(java.lang.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.

  Specified by:
    `getIcon` in interface `DiagramViewBuilder`

### getIcon

    protected javax.swing.Icon getIcon(java.lang.Class type,
                                       java.lang.Class resourceRoot)

### createDiagramView

    public CompositeView createDiagramView(Diagram diagram,
                                           java.awt.Graphics g)

  Creates the diagram view

  Specified by:
    `createDiagramView` in interface `DiagramViewBuilder`

### createCompartmentView

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

  Specified by:
    `createCompartmentView` in interface `DiagramViewBuilder`

### doCreateCompartmentView

    protected CompositeView doCreateCompartmentView(Compartment compartment,
                                                    DiagramViewOptions options,
                                                    java.awt.Graphics g)

  Creates compartment view.

### createEquivalentNodeGroupView

    public CompositeView createEquivalentNodeGroupView(EquivalentNodeGroup group,
                                                       DiagramViewOptions options,
                                                       java.awt.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.

  Pendung:
    design mode

### buildNodes

    protected void buildNodes(Compartment compartment,
                              DiagramViewOptions options,
                              java.awt.Graphics g)

  built all nodes and add them into compartment

### isReaction

    public boolean isReaction(Base kernel)

### createNodeView

    public CompositeView createNodeView(Node node,
                                        DiagramViewOptions options,
                                        java.awt.Graphics g)

  Specified by:
    `createNodeView` in interface `DiagramViewBuilder`
  To do:
    implement

### createNodeCoreView

    protected boolean createNodeCoreView(CompositeView container,
                                         Node node,
                                         DiagramViewOptions options,
                                         java.awt.Graphics g)

  Returns:
    indicates whether a node title should be added to node core view

### createNoteView

    protected boolean createNoteView(CompositeView container,
                                     Node node,
                                     DiagramViewOptions options,
                                     java.awt.Graphics g)

### createEdgeView

    public CompositeView createEdgeView(Edge edge,
                                        DiagramViewOptions options,
                                        java.awt.Graphics g)

  Specified by:
    `createEdgeView` in interface `DiagramViewBuilder`
  To do:
    implement

### hideElement

    public void hideElement(DiagramElement element)

  Specified by:
    `hideElement` in interface `DiagramViewBuilder`
  To do:
    implement

### removeElement

    public void removeElement(DiagramElement element)

  Specified by:
    `removeElement` in interface `DiagramViewBuilder`
  To do:
    implement

### moveNode

    public void moveNode(Node node,
                         java.awt.Point newLocation)

  Specified by:
    `moveNode` in interface `DiagramViewBuilder`
  To do:
    implement

### proportion

    public static int proportion(int L,
                                 int l)

### calcAttachmentPoints

    public static void calcAttachmentPoints(java.awt.Rectangle r1,
                                            java.awt.Rectangle r2,
                                            java.awt.Point p1,
                                            java.awt.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
           ________                     ______                 _______
          |        |                   |      |               |       |
          |        |    _______        |      |               |       |
          |        |___|       |       |______|               |_______|
          |________|   |       |               \                    |
                       |_______|                \ _______         __|_____
                                                 |       |       |        |
                                                 |       |       |        |
                                                 |_______|       |________|

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

Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.