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.view
Interface IDiagramViewManager

    com.change_vision.jude.api.inf.view.IDiagramViewManager

    public abstract IDiagramViewManager

Interface to manage Astah diagram view. This class can be used with plugin only.

Field Summary
`static String` | `BACKGROUND_COLOR` Property key for background color.
`static String` | `BORDER_COLOR` Property key for rect's line color.
`static String` | `LINE_COLOR` Property key for line color.
`static String` | `USER_ICON` Property key for user icon.

Method Summary
`abstract void` | `addDropTargetListener(DiagramDropTargetListener listener)` Add DiagramDropTargetListener when models are dropped on the diagram.
`abstract void` | `addEntitySelectionListener(IEntitySelectionListener listener)` Add IEntitySelectionListener to receive the event.
`abstract void` | `clearAllViewProperties(IPresentation presentation)` Clear All View Properties.
`abstract void` | `clearAllViewProperties(IDiagram dgm)` Clear All View Properties.
`abstract void` | `close(IDiagram diagram)` Close the specified diagram.
`abstract void` | `closeAll()` Close all Diagram Editors.
`abstract void` | `closeCurrentDiagramEditor()` Close the current diagram editor.
`abstract IDiagram` | `getCurrentDiagram()` Get the selected diagram in the Diagram Editor.
`abstract IDiagram[]` | `getOpenDiagrams()` Get the diagrams opened in editors.
`abstract IElement[]` | `getSelectedElements()` Get the selected models on the current Diagram Editor.
`abstract IPresentation[]` | `getSelectedPresentations()` Get the selected presentations on the current Diagram Editor.
`abstract Object` | `getViewProperty(IPresentation presentation, String key)` Get View Property for Presentation.
`abstract void` | `layoutAll()` Layout all presentations in the selected Diagram Editor.
`abstract void` | `layoutSelected()`
`abstract void` | `open(IDiagram diagram)` Open specified diagram in Diagram Editor.
`abstract void` | `removeEntitySelectionListener(IEntitySelectionListener listener)` Remove IEntitySelectionListener.
`abstract void` | `select(IPresentation presentation)` Select the specified presentation in current Diagram Editor.
`abstract void` | `select(IPresentation[] presentations)` Select the specified presentations in current Diagram Editor.
`abstract void` | `selectAll()` Select all presentations in current Diagram Editor.
`abstract void` | `setViewProperty(IPresentation presentation, String key, Object value)` Set View Property for Presentation.
`abstract void` | `showInDiagramEditor(IPresentation presentation)` Show and select the presentation in the center of the Diagram Editor.
`abstract double` | `toDeviceCoordX(double xInWorldCoord)` Convert a X value of the world(Model) coordinate system to the X value of the device(GUI) coordinate system.
`abstract double` | `toDeviceCoordY(double yInWorldCoord)` Convert a Y value of the world(Model) coordinate system to the Y value of the device(GUI) coordinate system.
`abstract double` | `toWorldCoordX(double xInDeviceCoord)` Convert a X value of the device(GUI) coordinate system to the X value of the world(Model) coordinate system.
`abstract double` | `toWorldCoordY(double yInDeviceCoord)` Convert a Y value of the device(GUI) coordinate system to the Y value of the world(Model) coordinate system.
`abstract void` | `unselectAll()` Unselect all presentations in current Diagram Editor.

Field Detail

### BACKGROUND_COLOR

    static final String BACKGROUND_COLOR

  Property key for background color. The value of this property is a java.awt.Color object.

### BORDER_COLOR

    static final String BORDER_COLOR

  Property key for rect's line color. The value of this property is a java.awt.Color object.

### LINE_COLOR

    static final String LINE_COLOR

  Property key for line color. The value of this property is a java.awt.Color object.

### USER_ICON

    static final String USER_ICON

  Property key for user icon. The value of this property is a javax.swing.ImageIcon object.

Method Detail

### setViewProperty

    abstract void setViewProperty(IPresentation presentation,
                                  String key,
                                  Object value)

  Set View Property for Presentation. Change the view property of the presentation on diagram editor temporarily. e.g The view changes if the background color property is set. The original color is displayed if the diagram editor is reopened because the color of the presentation changes temporarily and the original color is still stored in the presentation.

  Parameters:
    `presentation` - Presentation
    `key` - Key
    `value` - Value

### getViewProperty

    abstract Object getViewProperty(IPresentation presentation,
                                    String key)

  Get View Property for Presentation.

  Parameters:
    `presentation` - Presentation
    `key` - Key
  Returns:
    value Value

### clearAllViewProperties

    abstract void clearAllViewProperties(IPresentation presentation)

  Clear All View Properties.

  Parameters:
    `presentation` - Presentation to set properties

### clearAllViewProperties

    abstract void clearAllViewProperties(IDiagram dgm)

  Clear All View Properties.

  Parameters:
    `dgm` - the target Diagram
  Throws:
    `InvalidUsingException` - InvalidUsingException occurs.

### showInDiagramEditor

    abstract void showInDiagramEditor(IPresentation presentation)

  Show and select the presentation in the center of the Diagram Editor.

  Parameters:
    `presentation` - Presentation

### getCurrentDiagram

    abstract IDiagram getCurrentDiagram()

  Get the selected diagram in the Diagram Editor.

  Returns:
    IDiagram

### getSelectedPresentations

    abstract IPresentation[] getSelectedPresentations()

  Get the selected presentations on the current Diagram Editor.

  Returns:
    Selected presentations. This method returns an empty array if no diagram is opened or no presentation is selected

### getSelectedElements

    abstract IElement[] getSelectedElements()

  Get the selected models on the current Diagram Editor.

  Returns:
    Selected models. This method returns an empty array if no diagram is opened or no element is selected
  Since:
    6.6

### addEntitySelectionListener

    abstract void addEntitySelectionListener(IEntitySelectionListener listener)

  Add IEntitySelectionListener to receive the event.

  Parameters:
    `listener` - Listener of the IEntitySelectionEvent
  Since:
    6.6

### removeEntitySelectionListener

    abstract void removeEntitySelectionListener(IEntitySelectionListener listener)

  Remove IEntitySelectionListener.

  Parameters:
    `listener` - Listener of the IEntitySelectionEvent
  Since:
    6.6

### addDropTargetListener

    abstract void addDropTargetListener(DiagramDropTargetListener listener)

  Add DiagramDropTargetListener when models are dropped on the diagram.

  Parameters:
    `listener` - Listener for the drop event on the diagram

### layoutAll

    abstract void layoutAll()

  Layout all presentations in the selected Diagram Editor.

### layoutSelected

    abstract void layoutSelected()

### getOpenDiagrams

    abstract IDiagram[] getOpenDiagrams()

  Get the diagrams opened in editors.

  Returns:
    Diagrams

### open

    abstract void open(IDiagram diagram)

  Open specified diagram in Diagram Editor. The diagram is shown in the front if the diagram has already been open.

  Parameters:
    `diagram` - Diagram to be opened

### closeCurrentDiagramEditor

    abstract void closeCurrentDiagramEditor()

  Close the current diagram editor.

### close

    abstract void close(IDiagram diagram)

  Close the specified diagram.

  Parameters:
    `diagram` - Diagram to be closed

### closeAll

    abstract void closeAll()

  Close all Diagram Editors.

### select

    abstract void select(IPresentation presentation)

  Select the specified presentation in current Diagram Editor.

  Parameters:
    `presentation` - Presentation to be selected

### select

    abstract void select(IPresentation[] presentations)

  Select the specified presentations in current Diagram Editor.

  Parameters:
    `presentations` - Presentations to be selected

### selectAll

    abstract void selectAll()

  Select all presentations in current Diagram Editor.

### unselectAll

    abstract void unselectAll()

  Unselect all presentations in current Diagram Editor.

### toWorldCoordX

    abstract double toWorldCoordX(double xInDeviceCoord)

  Convert a X value of the device(GUI) coordinate system to the X value of the world(Model) coordinate system.

  Parameters:
    `xInDeviceCoord` - X value of the device(GUI) coordinate system
  Returns:
    X value of the world(Model) coordinate system

### toWorldCoordY

    abstract double toWorldCoordY(double yInDeviceCoord)

  Convert a Y value of the device(GUI) coordinate system to the Y value of the world(Model) coordinate system.

  Parameters:
    `yInDeviceCoord` - Y value of the device(GUI) coordinate system
  Returns:
    Y value of the world(Model) coordinate system

### toDeviceCoordX

    abstract double toDeviceCoordX(double xInWorldCoord)

  Convert a X value of the world(Model) coordinate system to the X value of the device(GUI) coordinate system.

  Parameters:
    `xInWorldCoord` - X value of the world(Model) coordinate system
  Returns:
    X value of the device(GUI) coordinate system

### toDeviceCoordY

    abstract double toDeviceCoordY(double yInWorldCoord)

  Convert a Y value of the world(Model) coordinate system to the Y value of the device(GUI) coordinate system.

  Parameters:
    `yInWorldCoord` - Y value of the world(Model) coordinate system
  Returns:
    Y value of the device(GUI) coordinate system

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