java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
rs.edu.raf.dsw.rudok.app.gui.swing.mindmappanel.diagram.view.IDiagramView
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
DiagramView

public abstract class IDiagramView
extends JPanel
Paints the contents of MindMap into its pane.
See Also:
Serialized Form
  • Constructor Details

    • IDiagramView

      public IDiagramView()
  • Method Details

    • getCenterX

      public abstract int getCenterX()
      X-coordinate of the center of the painting area.
      Returns:
      X-coordinate of the center of the painting area.
    • getCenterY

      public abstract int getCenterY()
      Y-coordinate of the center of the painting area.
      Returns:
      Y-coordinate of the center of the painting area.
    • paintRectangle

      public abstract void paintRectangle​(int x1, int y1, int x2, int y2)
      Paints a (temporary) rectangle for displaying lasso-selection.
      Parameters:
      x1 - Origin x.
      y1 - Origin y.
      x2 - Endpoint x.
      y2 - Endpoint y.
    • paintLine

      public abstract void paintLine​(int x1, int y1, int x2, int y2)
      Paints a (temporary) line for displaying connections being drawn.
      Parameters:
      x1 - Origin x.
      y1 - Origin y.
      x2 - Endpoint x.
      y2 - Endpoint y.
    • clearHelpers

      public abstract void clearHelpers()
      Clears all temporary lines/rectangles/other helpers being drawn.
    • zoomIn

      public abstract void zoomIn​(double coefficient)
      Zoom in on the view.
      Parameters:
      coefficient - Zooming coefficient.
    • zoomOut

      public abstract void zoomOut​(double coefficient)
      Zoom out from the view.
      Parameters:
      coefficient - Zooming coefficient.
    • translateView

      public abstract void translateView​(int dx, int dy)
      Translate diagram view by dx and dy.
      Parameters:
      dx - Horizontal translation.
      dy - Vertical translation.
    • getScaling

      public abstract double getScaling()
      Returns the current scaling factor of the painted view.
      Returns:
      Current scaling factor of the painted view.
    • getTranslationX

      public abstract double getTranslationX()
      Translation along the X-axis due to zooming.
      Returns:
      Translation along the X-axis due to zooming.
    • getTranslationY

      public abstract double getTranslationY()
      Translation along the Y-axis due to zooming.
      Returns:
      Translation along the Y-axis due to zooming.
    • getFramework

      public abstract DiagramFramework getFramework()