Class AbstractShape

java.lang.Object
org.pathvisio.libgpml.model.shape.AbstractShape
All Implemented Interfaces:
IShape

public class AbstractShape
extends java.lang.Object
implements IShape
Class for shapes.
Author:
unknown
  • Field Summary

    Fields
    Modifier and Type Field Description
    private boolean isResizeable  
    private boolean isRotatable  
    private java.lang.String name  
    private java.awt.Shape sh  
  • Constructor Summary

    Constructors
    Constructor Description
    AbstractShape​(java.awt.Shape sh, java.lang.String name)  
    AbstractShape​(java.awt.Shape sh, java.lang.String name, boolean isResizeable, boolean isRotatable)
    Instantiates.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getName()
    Returns String name of this shape.
    java.awt.Shape getShape​(double mw, double mh)  
    boolean isResizeable()
    Returns boolean for whether shape is resizeable.
    boolean isRotatable()
    Returns boolean for whether shape is rotatable.
    java.lang.String toString()
    Returns String name of this shape.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • name

      private java.lang.String name
    • isResizeable

      private boolean isResizeable
    • isRotatable

      private boolean isRotatable
    • sh

      private java.awt.Shape sh
  • Constructor Details

    • AbstractShape

      public AbstractShape​(java.awt.Shape sh, java.lang.String name, boolean isResizeable, boolean isRotatable)
      Instantiates.
      Parameters:
      sh - the Shape.
      name - the String name.
      isResizeable - if true shape is resizeable.
      isRotatable - if true shape is rotatable.
    • AbstractShape

      public AbstractShape​(java.awt.Shape sh, java.lang.String name)
      Parameters:
      sh -
      name -
  • Method Details

    • getName

      public java.lang.String getName()
      Returns String name of this shape.
      Specified by:
      getName in interface IShape
      Returns:
      name
    • getShape

      public java.awt.Shape getShape​(double mw, double mh)
      Specified by:
      getShape in interface IShape
    • isResizeable

      public boolean isResizeable()
      Returns boolean for whether shape is resizeable.
      Specified by:
      isResizeable in interface IShape
      Returns:
      isResizeable if true shape is resizeable.
    • isRotatable

      public boolean isRotatable()
      Returns boolean for whether shape is rotatable.
      Specified by:
      isRotatable in interface IShape
      Returns:
      isRotatable if true shape is rotatable.
    • toString

      public java.lang.String toString()
      Returns String name of this shape.
      Overrides:
      toString in class java.lang.Object
      Returns:
      name