|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.molwind.model.BaseWorldEntity org.molwind.model.PlacedWorldEntity org.molwind.chemical.model.ChemicalEntity
public class ChemicalEntity
ChemicalEntity represents a chemical entity in a Molwind world.
Field Summary |
---|
Fields inherited from class org.molwind.model.PlacedWorldEntity |
---|
x, y |
Fields inherited from class org.molwind.model.BaseWorldEntity |
---|
relationships |
Constructor Summary | |
---|---|
ChemicalEntity()
Creates a new empty chemical entity. |
|
ChemicalEntity(org.openscience.cdk.interfaces.IMolecule newMolecule)
Creates a new empty chemical entity. |
Method Summary | |
---|---|
void |
addRelationship(Relationship relation)
Adds a new relationship if it is not existing already. |
boolean |
equals(java.lang.Object object)
Tests whether two objects are identical by using the Identity strategy which has been provided (optionally). |
java.lang.String |
getAttribute(java.lang.String name)
Returns the value of the attribute with the given name. |
int |
getDimension()
Returns int for the bigness of the entity |
java.awt.image.BufferedImage |
getDrawing()
Renders an image representation of this entity. |
Identity |
getIdentity()
Get the Identity value. |
org.openscience.cdk.interfaces.IMolecule |
getMolecule()
Return the molecule object |
MoleculeRenderer |
getMoleculeRenderer()
Get the MoleculeRenderer value. |
double |
getX()
Get the X value. |
double |
getY()
Get the Y value. |
int |
hashCode()
Returns a hash code value for this relationship. |
Relationship[] |
hasRelationship(ChemicalEntity entity)
Tests whether there are relationships between this entity and the given entity. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets the value of the attribute with the given name. |
void |
setIdentity(Identity newIdentity)
Set the Identity value. |
void |
setMolecule(org.openscience.cdk.interfaces.IMolecule mol)
Sets the molecule object |
void |
setMoleculeRenderer(MoleculeRenderer newMoleculeRenderer)
Set the MoleculeRenderer value. |
void |
setX(double newX)
Set the X value. |
void |
setY(double newY)
Set the Y value. |
Methods inherited from class org.molwind.model.PlacedWorldEntity |
---|
getLayer, setDeltaX, setDeltaY, setLayer |
Methods inherited from class org.molwind.model.BaseWorldEntity |
---|
existRelationship, getRelationship, getRelationships, putAttribute |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChemicalEntity()
public ChemicalEntity(org.openscience.cdk.interfaces.IMolecule newMolecule)
newMolecule
- the new molecule valueMethod Detail |
---|
public Identity getIdentity()
public void setIdentity(Identity newIdentity)
newIdentity
- the new Identity valuepublic void addRelationship(Relationship relation)
addRelationship
in class BaseWorldEntity
relation
- the relationshippublic Relationship[] hasRelationship(ChemicalEntity entity)
entity
- the entity to test relationship
public MoleculeRenderer getMoleculeRenderer()
public void setMoleculeRenderer(MoleculeRenderer newMoleculeRenderer)
newMoleculeRenderer
- the new MoleculeRenderer valuepublic java.awt.image.BufferedImage getDrawing()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the object to compare to
public int hashCode()
equals(Object)
.
TODO Auto-generated hashCode() method
hashCode
in class java.lang.Object
public org.openscience.cdk.interfaces.IMolecule getMolecule()
public void setMolecule(org.openscience.cdk.interfaces.IMolecule mol)
IMolecule
- public java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface WorldEntity
getAttribute
in class BaseWorldEntity
name
- the name of the attribute
public int getDimension()
getDimension
in interface WorldEntity
getDimension
in class BaseWorldEntity
public void setAttribute(java.lang.String name, java.lang.Object value)
name
- the name of the attributevalue
- the value of the attributepublic double getX()
getX
in interface Place
getX
in class PlacedWorldEntity
public void setX(double newX)
setX
in class PlacedWorldEntity
newX
- The new X value.public double getY()
getY
in interface Place
getY
in class PlacedWorldEntity
public void setY(double newY)
setY
in class PlacedWorldEntity
newY
- The new Y value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |