Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.modama.framework.entities
Class ImageEntity  view ImageEntity download ImageEntity.java

java.lang.Object
  extended byorg.modama.ModelStates
      extended byorg.modama.Model
          extended byorg.modama.framework.AbstractFrameworkModel
              extended byorg.modama.framework.entities.AbstractEntity
                  extended byorg.modama.framework.entities.ImageEntity

public class ImageEntity
extends AbstractEntity

An Image entity. holds a RenderedImage


Field Summary
(package private)  java.lang.String codecname
          the codecname, after loading an image this is the codec that was used to load the image and will also be used to save it (if their is a decoder), but it also can be changed if you want to save it in another format
(package private)  java.awt.image.RenderedImage data
          the rendered image
static java.lang.String PROP_CODECNAME
           
 
Fields inherited from class org.modama.framework.entities.AbstractEntity
fullName, ID, IDcnt, PROP_DATA, PROP_FULLNAME
 
Fields inherited from class org.modama.framework.AbstractFrameworkModel
name, PROP_NAME
 
Fields inherited from class org.modama.Model
changeAgent, EVENT_FIRED, state
 
Fields inherited from class org.modama.ModelStates
CREATED, DELETED, MODIFIED, SAVED
 
Constructor Summary
ImageEntity()
           
ImageEntity(java.lang.String initName)
           
 
Method Summary
protected  void create()
          create an empty imageentity
 void delete()
          delete the entity from the world
 java.lang.String getCodecname()
           
 java.lang.Object getData()
          end implementation of abstract methods
 java.awt.image.RenderedImage getImage()
           
 boolean isEmpty()
          should return true if their is no data, this is used by the operations to know wether they can execute
 boolean load(java.net.URL url)
          load data for the object
 void save(java.net.URL url)
          save data for the object
 void setCodecname(java.lang.String codecname)
           
 void setData(java.lang.Object data)
          setter for data, cause fire
 void setImage(java.awt.image.RenderedImage img)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class org.modama.framework.entities.AbstractEntity
getFullName, getID, setFullName
 
Methods inherited from class org.modama.framework.AbstractFrameworkModel
getName, setName
 
Methods inherited from class org.modama.Model
addPropertyChangeListener, addPropertyChangeListener, fire, fire, fire, getState, removePropertyChangeListener, removePropertyChangeListener, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_CODECNAME

public static final java.lang.String PROP_CODECNAME
See Also:
Constant Field Values

data

java.awt.image.RenderedImage data
the rendered image


codecname

java.lang.String codecname
the codecname, after loading an image this is the codec that was used to load the image and will also be used to save it (if their is a decoder), but it also can be changed if you want to save it in another format

Constructor Detail

ImageEntity

public ImageEntity()

ImageEntity

public ImageEntity(java.lang.String initName)
Method Detail

create

protected void create()
create an empty imageentity

Overrides:
create in class AbstractEntity

delete

public void delete()
            throws org.modama.framework.exceptions.DeleteCancelledException
Description copied from class: AbstractEntity
delete the entity from the world

Overrides:
delete in class AbstractEntity

load

public boolean load(java.net.URL url)
             throws java.io.IOException
Description copied from class: org.modama.framework.AbstractFrameworkModel
load data for the object


save

public void save(java.net.URL url)
          throws java.io.IOException
Description copied from class: org.modama.framework.AbstractFrameworkModel
save data for the object


isEmpty

public boolean isEmpty()
Description copied from class: AbstractEntity
should return true if their is no data, this is used by the operations to know wether they can execute

Specified by:
isEmpty in class AbstractEntity

getData

public java.lang.Object getData()
end implementation of abstract methods

Specified by:
getData in class AbstractEntity

setData

public void setData(java.lang.Object data)
Description copied from class: AbstractEntity
setter for data, cause fire

Specified by:
setData in class AbstractEntity

getImage

public java.awt.image.RenderedImage getImage()

setImage

public void setImage(java.awt.image.RenderedImage img)

getCodecname

public java.lang.String getCodecname()

setCodecname

public void setCodecname(java.lang.String codecname)

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).