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

## com.change_vision.jude.api.inf.editor
Interface DiagramEditor

    com.change_vision.jude.api.inf.editor.DiagramEditor

All Known Implementing Classes:
  BasicDiagramEditor, BehaviorDiagramEditor, ClassDiagramEditor, CompositeStructureDiagramEditor, ERDiagramEditor, MindmapDiagramEditor, MindmapEditor, RequirementDiagramEditor, StateMachineDiagramEditor, StructureDiagramEditor, UseCaseDiagramEditor

    public DiagramEditor

Interface to edit (create/delete) diagrams. Throws Exception when invalid models are generated.

Method Summary
`abstract INodePresentation` | `createImage(Image image, Point2D location)` Create a Image Presentation.
`abstract ILinkPresentation` | `createLine(Point2D point1, Point2D point2)` Create a Line Presentation.
`abstract INodePresentation` | `createRect(Point2D location, double width, double height)` Create a Rect Presentation.
`abstract INodePresentation` | `createText(String text, Point2D location)` Create a Text Presentation.
`abstract void` | `delete(IDiagram diagram)` Delete a diagram from a project.
`abstract void` | `deleteDiagram()` Delete diagram in DiagramEditor from a project.
`abstract void` | `deletePresentation(IPresentation presentation)` Delete Presentation from a project.
`abstract IDiagram` | `getDiagram()` Get Diagram in DiagramEditor.
`abstract void` | `setDiagram(IDiagram diagram)` Set Diagram to DiagramEditor.

Method Detail

### delete

    abstract void delete(IDiagram diagram)

  Delete a diagram from a project.

  Parameters:
    `element` - Diagram
  Throws:
    `InvalidEditingException` - InvalidEditingException occurs.

        Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited

        Values:
              Error messages for exceptions.

### getDiagram

    abstract IDiagram getDiagram()

  Get Diagram in DiagramEditor.

  Returns:
    Diagram in DiagramEditor.

### setDiagram

    abstract void setDiagram(IDiagram diagram)

  Set Diagram to DiagramEditor.

  Parameters:
    `diagram` - diagram.
  Throws:
    `InvalidEditingException` - InvalidEditingException occurs.

        Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              READ_ONLY_KEY - if a read-only element is edited.

        Values:
              Error messages for exceptions.

### deleteDiagram

    abstract void deleteDiagram()

  Delete diagram in DiagramEditor from a project.

  Throws:
    `InvalidEditingException` - InvalidEditingException occurs.

        Keys:
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.

        Values:
              Error messages for exceptions.

### deletePresentation

    abstract void deletePresentation(IPresentation presentation)

  Delete Presentation from a project.

  Parameters:
    `presentation` - Presentation
  Throws:
    `InvalidEditingException` - InvalidEditingException occurs.

        Keys:
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.

        Values:
              Error messages for exceptions.

### createText

    abstract INodePresentation createText(String text,
                                          Point2D location)

  Create a Text Presentation.

  Parameters:
    `text` - charactors of Text
    `location` - location
  Returns:
    Text Presentaion.
  Throws:
    `InvalidEditingException` - InvalidEditingException occurs.

        Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              NO_NAME_ERROR_KEY - if the name is empty.
              NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.

        Values:
              Error messages for exceptions.

### createImage

    abstract INodePresentation createImage(Image image,
                                           Point2D location)

  Create a Image Presentation.

  Parameters:
    `image` - image
    `location` - location
  Returns:
    Image Presentaion.
  Throws:
    `InvalidEditingException` - InvalidEditingException occurs.

        Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              NO_NAME_ERROR_KEY - if the name is empty.
              NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.

        Values:
              Error messages for exceptions.

### createRect

    abstract INodePresentation createRect(Point2D location,
                                          double width,
                                          double height)

  Create a Rect Presentation.

  Parameters:
    `location` - location
    `width` - Width should be larger than 20.
    `height` - Height should be larger than 20.
  Returns:
    Rect Presentaion.
  Throws:
    `InvalidEditingException` - InvalidEditingException occurs.

        Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              NO_NAME_ERROR_KEY - if the name is empty.
              NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.

        Values:
              Error messages for exceptions.

### createLine

    abstract ILinkPresentation createLine(Point2D point1,
                                          Point2D point2)

  Create a Line Presentation.

  Parameters:
    `point1` - start location
    `point2` - end location
  Returns:
    Line Presentaion.
  Throws:
    `InvalidEditingException` - InvalidEditingException occurs.

        Keys:
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              NO_NAME_ERROR_KEY - if the name is empty.
              NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.

        Values:
              Error messages for exceptions.

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