com.dbarnes.sgme
Class Item

java.lang.Object
  extended by com.dbarnes.sgme.Item
Direct Known Subclasses:
Tile, Widget

public abstract class Item
extends java.lang.Object

Base class for the major components of a Map.


Constructor Summary
Item()
           
 
Method Summary
 void clearAttributes()
          Clears the list of custom attributes.
 java.lang.String getAttribute(java.lang.String key)
          Returns a custom attribute.
 java.util.Iterator<java.lang.String> getAttributeNames()
          Returns an iterator containing the names of all the custom attributes.
 int getId()
          Returns the identifier for this Item.
abstract  java.awt.Image getImage()
          Returns the image which represents this Item in the graphical user interface.
 java.lang.String getName()
          Returns the name for this Item.
 void setAttribute(java.lang.String key, java.lang.String value)
          Sets a custom attribute.
 void setId(int id)
          Sets the identifier for this Item.
 void setName(java.lang.String name)
          Sets the name for this Item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Item

public Item()
Method Detail

getImage

public abstract java.awt.Image getImage()
Returns the image which represents this Item in the graphical user interface.


getId

public int getId()
Returns the identifier for this Item.


setId

public void setId(int id)
Sets the identifier for this Item.


getName

public java.lang.String getName()
Returns the name for this Item.


setName

public void setName(java.lang.String name)
Sets the name for this Item.


clearAttributes

public void clearAttributes()
Clears the list of custom attributes.


setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.String value)
Sets a custom attribute.


getAttribute

public java.lang.String getAttribute(java.lang.String key)
Returns a custom attribute.


getAttributeNames

public java.util.Iterator<java.lang.String> getAttributeNames()
Returns an iterator containing the names of all the custom attributes.



Copyright 2006-2009 Don Barnes. All Rights Reserved.