NASA World Wind

gov.nasa.worldwindx.examples.shapebuilder
Class RigidShapeBuilder.AbstractShapeEntry

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwindx.examples.shapebuilder.RigidShapeBuilder.AbstractShapeEntry
All Implemented Interfaces:
AVList, MessageListener, WWObject, PropertyChangeListener, EventListener
Enclosing class:
RigidShapeBuilder

protected static class RigidShapeBuilder.AbstractShapeEntry
extends WWObjectImpl

The AbstractShapeEntry class defines a shape entry in the AbstractShapeBuilderModel. Each entry contains an instance of an AbstractShape, its associated editor and attributes, and state variables indicating whether the entry is currently selected or being edited.


Field Summary
protected  ShapeAttributes attributes
           
protected  boolean editing
           
protected  AbstractShapeEditor editor
           
protected  boolean selected
           
protected  AbstractShape shape
           
 
Constructor Summary
RigidShapeBuilder.AbstractShapeEntry(AbstractShape shape, AbstractShapeEditor editor)
           
 
Method Summary
 ShapeAttributes getAttributes()
           
 AbstractShapeEditor getEditor()
           
 String getName()
           
 AbstractShape getShape()
           
 Object getValue(String key)
          Returns the value for a specified key.
 boolean isEditing()
           
 boolean isSelected()
           
 void setEditing(boolean editing)
           
 void setName(String name)
           
 void setSelected(boolean selected)
           
 Object setValue(String key, Object value)
          Adds a key/value pair to the list.
 String toString()
           
protected  void updateAttributes()
           
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
 
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValues
 

Field Detail

attributes

protected ShapeAttributes attributes

editing

protected boolean editing

editor

protected AbstractShapeEditor editor

selected

protected boolean selected

shape

protected AbstractShape shape
Constructor Detail

RigidShapeBuilder.AbstractShapeEntry

public RigidShapeBuilder.AbstractShapeEntry(AbstractShape shape,
                                            AbstractShapeEditor editor)
Method Detail

getAttributes

public ShapeAttributes getAttributes()

getEditor

public AbstractShapeEditor getEditor()

getName

public String getName()

getShape

public AbstractShape getShape()

getValue

public Object getValue(String key)
Description copied from interface: AVList
Returns the value for a specified key.

Specified by:
getValue in interface AVList
Overrides:
getValue in class AVListImpl
Parameters:
key - the attribute name. May not be null.
Returns:
the attribute value if one exists in the collection, otherwise null.

isEditing

public boolean isEditing()

isSelected

public boolean isSelected()

setEditing

public void setEditing(boolean editing)

setName

public void setName(String name)

setSelected

public void setSelected(boolean selected)

setValue

public Object setValue(String key,
                       Object value)
Description copied from interface: AVList
Adds a key/value pair to the list. Replaces an existing key/value pair if the list already contains the key.

Specified by:
setValue in interface AVList
Overrides:
setValue in class AVListImpl
Parameters:
key - the attribute name. May not be null.
value - the attribute value. May be null, in which case any existing value for the key is removed from the collection.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.

toString

public String toString()
Overrides:
toString in class Object

updateAttributes

protected void updateAttributes()

NASA World Wind