Package hec.map

Class ModelDrawingAttributeSet

java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.map.ModelDrawingAttributeSet
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, Serializable, Cloneable, Comparable, Observer, Modifiable
Direct Known Subclasses:
StreamAlignmentAttributeSet

public class ModelDrawingAttributeSet extends NamedType implements Cloneable
Class Description
See Also:
  • Field Details

  • Constructor Details

    • ModelDrawingAttributeSet

      public ModelDrawingAttributeSet()
      Constructor for the ModelDrawingAttributeSet object
    • ModelDrawingAttributeSet

      public ModelDrawingAttributeSet(String name)
      Constructor for the ModelDrawingAttributeSet object
      Parameters:
      name - Description
  • Method Details

    • createAttributesTable

      protected Map<String,Object> createAttributesTable()
      create the Attributes table. subclasses can override to implement the table using a different class if need by.
      Returns:
    • getAttributes

      public Hashtable<String,Boolean> getAttributes()
      Gets the Attributes attribute of the ModelDrawingAttributeSet object
      Returns:
      The Attributes value
    • setAttribute

      public void setAttribute(String att, boolean shown)
      Sets the Attribute attribute of the ModelDrawingAttributeSet object
      Parameters:
      att - The new Attribute value
      shown - The new Attribute value
    • putAttribute

      public void putAttribute(String att, boolean shown)
    • hasFixedAttributes

      public boolean hasFixedAttributes()
      return whether this attribute set has fixed attributes. default is true;
      Returns:
      Description
    • removeAttribute

      public void removeAttribute(String attrName)
      Method Description
      Parameters:
      attrName - Description
    • getAttributeNames

      public List<String> getAttributeNames()
      Gets the AttributeNames attribute of the ModelDrawingAttributeSet object
      Returns:
      The AttributeNames value
    • isAttributeShown

      public boolean isAttributeShown(String att)
      Gets the AttributeShown attribute of the ModelDrawingAttributeSet object
      Parameters:
      att - Description
      Returns:
      The AttributeShown value
    • setShown

      public void setShown(boolean b)
      Sets the Shown attribute of the ModelDrawingAttributeSet object
      Parameters:
      b - The new Shown value
    • isShown

      public boolean isShown()
      Gets the Shown attribute of the ModelDrawingAttributeSet object
      Returns:
      The Shown value
    • fireAttributeChanged

      protected void fireAttributeChanged(String attrName, boolean shown)
      Method Description
      Parameters:
      attrName - Description
      shown - Description
    • fireAttributeAdded

      protected void fireAttributeAdded(Object attribute)
      Method Description
      Parameters:
      attribute - Description
    • fireAttributeRemoved

      protected void fireAttributeRemoved(Object attribute)
      Method Description
      Parameters:
      attribute - Description
    • addAttributeChangedListener

      public void addAttributeChangedListener(AttributeChangedListener acl)
      Adds a feature to the AttributeChangedListener attribute of the ModelDrawingAttributeSet object
      Parameters:
      acl - The feature to be added to the AttributeChangedListener attribute
    • removeAttributeChangeListener

      public void removeAttributeChangeListener(AttributeChangedListener acl)
      Method Description
      Parameters:
      acl - Description
    • addAttributeAddRemoveListener

      public void addAttributeAddRemoveListener(AttributeAddRemoveListener aarl)
      Adds a feature to the AttributeAddRemoveListener attribute of the ModelDrawingAttributeSet object
      Parameters:
      aarl - The feature to be added to the AttributeAddRemoveListener attribute
    • removeAttributeAddRemoveListener

      public void removeAttributeAddRemoveListener(AttributeAddRemoveListener aarl)
      Method Description
      Parameters:
      aarl - Description
    • getDrawPropDialogClassname

      public String getDrawPropDialogClassname()
      Gets the DrawPropDialogClassname attribute of the ModelDrawingAttributeSet object
      Returns:
      The DrawPropDialogClassname value
    • getDrawPropDlg

      public JDialog getDrawPropDlg()
    • isValidAttribute

      public boolean isValidAttribute(String attrName)
      Gets the ValidAttribute attribute of the ModelDrawingAttributeSet object
      Parameters:
      attrName - Description
      Returns:
      The ValidAttribute value
    • displayDrawPropDialogClass

      public void displayDrawPropDialogClass(Frame frame, boolean modal)
      Method Description
      Parameters:
      frame - Description
      modal - Description
    • closeDrawPropDialog

      public void closeDrawPropDialog()
      Method Description
    • getIcon

      public Icon getIcon(String attrName)
      Gets the Icon attribute of the ModelDrawingAttributeSet object
      Parameters:
      attrName - Description
      Returns:
      The Icon value
    • workspaceOpening

      public void workspaceOpening()
      Method Description
    • workspaceClosing

      public void workspaceClosing()
      Method Description
    • getNameAttribute

      public String getNameAttribute()
      return the name stored in the attributes table
      Returns:
      the name
    • clone

      public Object clone()
      Description copied from class: NamedType
      Creates a new object of the same class as this object.
      It then initializes each of the new object's fields by assigning it the same value as the corresponding field in this object. No
      constructor is called.
      Overrides:
      clone in class NamedType
    • getAttributeValue

      public Object getAttributeValue(String attrName)
      Parameters:
      attrName -
      Returns:
    • getAttributeInfo

      public List<AttributeInfo> getAttributeInfo(String attrName)
      return the list of attribute info object for the attribute name. This method returns null and is left for subclasses to override when they want to provide more than just a single icon for an attribute.
      Parameters:
      attrName - attribute name
      Returns:
      null here, override it to provide more info