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
-
Nested Class Summary
Nested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType -
Field Summary
Fields Modifier and Type Field Description protected booleanneedsRedraw2Dprotected booleanneedsRedraw3DFields inherited from class mgui.interfaces.attributes.Attribute
isCopiable, isEditable, isNumeric, isSecret, name, object_class, valueFields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes -
Constructor Summary
Constructors Constructor Description ShapeAttribute(java.lang.String name, java.lang.Class<V> clazz)Instantiates aShapeAttributeShapeAttribute(java.lang.String name, V value)Instantiates aShapeAttributeShapeAttribute(java.lang.String name, V value, boolean needsRedraw)Instantiates aShapeAttributeShapeAttribute(java.lang.String name, V value, boolean needsRedraw2D, boolean needsRedraw3D)Instantiates aShapeAttributeShapeAttribute(java.lang.String name, V value, boolean needsRedraw2D, boolean needsRedraw3D, boolean isEditable)Instantiates aShapeAttributeShapeAttribute(java.lang.String name, V value, boolean needsRedraw2D, boolean needsRedraw3D, boolean isEditable, boolean isCopiable)Instantiates aShapeAttribute -
Method Summary
Modifier and Type Method Description booleanneedsRedraw2D()Indicates whether a change to this attribute's value requires a 2D redraw of the shape.voidneedsRedraw2D(boolean b)Sets whether a change to this attribute's value requires a 2D redraw of the shape.booleanneedsRedraw3D()Indicates whether a change to this attribute's value requires a 3D redraw of the shape.voidneedsRedraw3D(boolean b)Sets whether a change to this attribute's value requires a 3D redraw of the shape.Methods inherited from class mgui.interfaces.attributes.Attribute
addAttributeListener, clone, compareTo, fireAttributeListeners, getDTD, getGenericInstance, getLocalName, getName, getObjectClass, getShortXML, getTreeLabel, getValue, getValueStr, getValueStr, getXML, getXML, getXMLInstance, getXMLSchema, handleXMLElementEnd, handleXMLElementStart, handleXMLString, isCopiable, isEditable, isNumeric, isSecret, issueTreeNode, removeAttributeListener, setEditable, setFromAttribute, setFromAttribute, setName, setSecret, setTreeNode, setValue, setValue, setValue, toString, writeXML, writeXML, writeXML, writeXMLMethods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, destroy, isDestroyed, updateTreeNodesMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
needsRedraw2D
protected boolean needsRedraw2D -
needsRedraw3D
protected boolean needsRedraw3D
-
-
Constructor Details
-
ShapeAttribute
Instantiates aShapeAttribute- Parameters:
name- Name of the attributeclazz- Class of the attribute value
-
ShapeAttribute
Instantiates aShapeAttribute- Parameters:
name- Name of the attributevalue- Value of the attribute
-
ShapeAttribute
Instantiates aShapeAttribute- Parameters:
name- Name of the attributevalue- Value of the attributeneedsRedraw2D- Does changing this attribute require a 2D/3D redraw?
-
ShapeAttribute
public ShapeAttribute(java.lang.String name, V value, boolean needsRedraw2D, boolean needsRedraw3D)Instantiates aShapeAttribute- Parameters:
name- Name of the attributevalue- Value of the attributeneedsRedraw2D- 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 aShapeAttribute- Parameters:
name- Name of the attributevalue- Value of the attributeneedsRedraw2D- 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 aShapeAttribute- Parameters:
name- Name of the attributevalue- Value of the attributeneedsRedraw2D- 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.
-