Class ImageAttribute

All Implemented Interfaces:
Comparable<Object>, Attribute, CollectionAttribute, DeepCopy, GraphicAttributeConstants, Displayable

public class ImageAttribute
extends HashMapAttribute
implements GraphicAttributeConstants
Contains the graphic attribute image.
Version:
$Revision: 1.6 $
Author:
breu
  • Constructor Details

    • ImageAttribute

      public ImageAttribute​(String id)
      Constructor for Image.
      Parameters:
      id - the id of the attribute.
    • ImageAttribute

      public ImageAttribute​(String id, boolean t, boolean m, AWTImageAttribute i, String r)
      Constructor for Image.
      Parameters:
      id - the id of the attribute.
      t - the tiled-value of the attribute.
      m - the maximize-value of the attribute.
      i - the image-value of the attribute.
      r - the reference-value of the attribute.
    • ImageAttribute

      public ImageAttribute​(String id, BooleanAttribute t, BooleanAttribute m, AWTImageAttribute i, StringAttribute r)
      Constructor for Image.
      Parameters:
      id - the id of the attribute.
      t - the tiled-value of the attribute.
      m - the maximize-value of the attribute.
      i - the image-value of the attribute.
      r - the reference-value of the attribute.
    • ImageAttribute

      public ImageAttribute​(String id, boolean t, boolean m, Image i, String r)
      Constructor for Image.
      Parameters:
      id - the id of the attribute.
      t - the tiled-value of the attribute.
      m - the maximize-value of the attribute.
      i - the java.awt.image-value of the attribute.
      r - the reference-value of the attribute.
  • Method Details

    • setCollection

      public void setCollection​(Map<String,​Attribute> attrs)
      Sets the collection of attributes contained within this CollectionAttribute
      Specified by:
      setCollection in interface CollectionAttribute
      Overrides:
      setCollection in class HashMapAttribute
      Parameters:
      attrs - the map that contains all attributes.
      Throws:
      IllegalArgumentException - DOCUMENT ME!
    • setImage

      public void setImage​(AWTImageAttribute i)
      Sets the 'image'-value.
      Parameters:
      i - the 'image'-value to be set.
    • getImage

      public AWTImageAttribute getImage()
      Returns the 'image'-value of the encapsulated image.
      Returns:
      the 'image'-value of the encapsulated image.
    • setMaximize

      public void setMaximize​(boolean m)
      Sets the 'maximize'-value.
      Parameters:
      m - the 'maximize'-value to be set.
    • getMaximize

      public boolean getMaximize()
      Returns the 'maximize'-value of the encapsulated image.
      Returns:
      the 'maximize'-value of the encapsulated image.
    • setReference

      public void setReference​(String r)
      Sets the 'reference'-value.
      Parameters:
      r - the 'reference'-value to be set.
    • getReference

      public String getReference()
      Returns the 'reference'-value of the encapsulated image.
      Returns:
      the 'reference'-value of the encapsulated image.
    • setTiled

      public void setTiled​(boolean t)
      Sets the 'tiled'-value.
      Parameters:
      t - the 'tiled'-value to be set.
    • getTiled

      public boolean getTiled()
      Returns the 'tiled'-value of the encapsulated image.
      Returns:
      the 'tiled'-value of the encapsulated image.
    • copy

      public Object copy()
      Returns a deep copy of this object.
      Specified by:
      copy in interface DeepCopy
      Overrides:
      copy in class HashMapAttribute
      Returns:
      A deep copy of this object.