Class ShapeAttribute<V>

java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.interfaces.attributes.Attribute<V>
mgui.interfaces.shapes.attributes.ShapeAttribute<V>
Type Parameters:
V -
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<Attribute<V>>, InterfaceObject, NamedObject, TreeObject, CleanableObject, XMLObject

public class ShapeAttribute<V>
extends Attribute<V>
Extends Attribute to indicate shape-specific parameters (e.g., whether a change to the value requires a redraw.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

    • needsRedraw2D

      protected boolean needsRedraw2D
    • needsRedraw3D

      protected boolean needsRedraw3D
  • Constructor Details

    • ShapeAttribute

      public ShapeAttribute​(java.lang.String name, java.lang.Class<V> clazz)
      Instantiates a ShapeAttribute
      Parameters:
      name - Name of the attribute
      clazz - Class of the attribute value
    • ShapeAttribute

      public ShapeAttribute​(java.lang.String name, V value)
      Instantiates a ShapeAttribute
      Parameters:
      name - Name of the attribute
      value - Value of the attribute
    • ShapeAttribute

      public ShapeAttribute​(java.lang.String name, V value, boolean needsRedraw)
      Instantiates a ShapeAttribute
      Parameters:
      name - Name of the attribute
      value - Value of the attribute
      needsRedraw2D - Does changing this attribute require a 2D/3D redraw?
    • ShapeAttribute

      public ShapeAttribute​(java.lang.String name, V value, boolean needsRedraw2D, boolean needsRedraw3D)
      Instantiates a ShapeAttribute
      Parameters:
      name - Name of the attribute
      value - Value of the attribute
      needsRedraw2D - Does changing this attribute require a 2D redraw?
      needsRedraw3D - Does changing this attribute require a 3D redraw?
    • ShapeAttribute

      public ShapeAttribute​(java.lang.String name, V value, boolean needsRedraw2D, boolean needsRedraw3D, boolean isEditable)
      Instantiates a ShapeAttribute
      Parameters:
      name - Name of the attribute
      value - Value of the attribute
      needsRedraw2D - Does changing this attribute require a 2D redraw?
      needsRedraw3D - Does changing this attribute require a 3D redraw?
      isEditable - Is this attribute editable?
    • ShapeAttribute

      public ShapeAttribute​(java.lang.String name, V value, boolean needsRedraw2D, boolean needsRedraw3D, boolean isEditable, boolean isCopiable)
      Instantiates a ShapeAttribute
      Parameters:
      name - Name of the attribute
      value - Value of the attribute
      needsRedraw2D - Does changing this attribute require a 2D redraw?
      needsRedraw3D - Does changing this attribute require a 3D redraw?
      isEditable - Is this attribute editable?
      isCopiable - Is this attribute copiable?
  • Method Details

    • needsRedraw2D

      public boolean needsRedraw2D()
      Indicates whether a change to this attribute's value requires a 2D redraw of the shape.
      Returns:
    • needsRedraw2D

      public void needsRedraw2D​(boolean b)
      Sets whether a change to this attribute's value requires a 2D redraw of the shape.
    • needsRedraw3D

      public boolean needsRedraw3D()
      Indicates whether a change to this attribute's value requires a 3D redraw of the shape.
      Returns:
    • needsRedraw3D

      public void needsRedraw3D​(boolean b)
      Sets whether a change to this attribute's value requires a 3D redraw of the shape.