All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class DiagramView
extends IDiagramView
See Also:
Serialized Form
  • Constructor Details

    • DiagramView

      public DiagramView​(MindMap mindMap)
  • Method Details

    • getCenterX

      public int getCenterX()
      Description copied from class: IDiagramView
      X-coordinate of the center of the painting area.
      Specified by:
      getCenterX in class IDiagramView
      Returns:
      X-coordinate of the center of the painting area.
    • getCenterY

      public int getCenterY()
      Description copied from class: IDiagramView
      Y-coordinate of the center of the painting area.
      Specified by:
      getCenterY in class IDiagramView
      Returns:
      Y-coordinate of the center of the painting area.
    • paintRectangle

      public void paintRectangle​(int x1, int y1, int x2, int y2)
      Description copied from class: IDiagramView
      Paints a (temporary) rectangle for displaying lasso-selection.
      Specified by:
      paintRectangle in class IDiagramView
      Parameters:
      x1 - Origin x.
      y1 - Origin y.
      x2 - Endpoint x.
      y2 - Endpoint y.
    • paintLine

      public void paintLine​(int x1, int y1, int x2, int y2)
      Description copied from class: IDiagramView
      Paints a (temporary) line for displaying connections being drawn.
      Specified by:
      paintLine in class IDiagramView
      Parameters:
      x1 - Origin x.
      y1 - Origin y.
      x2 - Endpoint x.
      y2 - Endpoint y.
    • clearHelpers

      public void clearHelpers()
      Description copied from class: IDiagramView
      Clears all temporary lines/rectangles/other helpers being drawn.
      Specified by:
      clearHelpers in class IDiagramView
    • zoomIn

      public void zoomIn​(double coefficient)
      Description copied from class: IDiagramView
      Zoom in on the view.
      Specified by:
      zoomIn in class IDiagramView
      Parameters:
      coefficient - Zooming coefficient.
    • zoomOut

      public void zoomOut​(double coefficient)
      Description copied from class: IDiagramView
      Zoom out from the view.
      Specified by:
      zoomOut in class IDiagramView
      Parameters:
      coefficient - Zooming coefficient.
    • translateView

      public void translateView​(int dx, int dy)
      Description copied from class: IDiagramView
      Translate diagram view by dx and dy.
      Specified by:
      translateView in class IDiagramView
      Parameters:
      dx - Horizontal translation.
      dy - Vertical translation.
    • getScaling

      public double getScaling()
      Description copied from class: IDiagramView
      Returns the current scaling factor of the painted view.
      Specified by:
      getScaling in class IDiagramView
      Returns:
      Current scaling factor of the painted view.
    • getTranslationX

      public double getTranslationX()
      Description copied from class: IDiagramView
      Translation along the X-axis due to zooming.
      Specified by:
      getTranslationX in class IDiagramView
      Returns:
      Translation along the X-axis due to zooming.
    • getTranslationY

      public double getTranslationY()
      Description copied from class: IDiagramView
      Translation along the Y-axis due to zooming.
      Specified by:
      getTranslationY in class IDiagramView
      Returns:
      Translation along the Y-axis due to zooming.
    • getFramework

      public DiagramFramework getFramework()
      Specified by:
      getFramework in class IDiagramView