|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.tostring0.AToString com.rubecula.darwin.visualization.Avatar_
public abstract class Avatar_
Abstract base class for implementers of Avatar
.
Field Summary | |
---|---|
static java.text.NumberFormat |
numberFormatter
|
Fields inherited from interface net.sf.tostring0.IToString |
---|
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE |
Constructor Summary | |
---|---|
protected |
Avatar_(Individual individual)
Protected constructor which creates a new instance of Avatar at the point [0,0] and with color black. |
protected |
Avatar_(Individual individual,
java.awt.Color color)
Protected constructor which creates a new instance of Avatar at the point [0,0] and with given color . |
protected |
Avatar_(Individual individual,
java.awt.Point location)
Protected constructor which creates a new instance of Avatar at the given point and with color black. |
protected |
Avatar_(Individual individual,
java.awt.Point location,
java.awt.Color color)
Protected constructor which creates a new instance of Avatar at the given point and with given color . |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
This is purely for debugging/logging purposes. |
java.awt.Color |
getColor()
|
Individual |
getIndividual()
|
java.awt.Point |
getLocation()
|
double |
getSize()
By default, we simply return 1. |
int |
hashCode()
|
protected void |
moveTo(java.awt.Point point)
Not a public method unless Moveable is implemented. |
protected void |
setColor(java.awt.Color color)
Not a public method unless Colorable is implemented. |
static java.lang.String |
showColor(java.awt.Color color)
|
static java.lang.String |
showLocation(java.awt.Point location)
|
static java.lang.String |
showSize(java.lang.Double size)
|
Methods inherited from class net.sf.tostring0.AToString |
---|
toString, toString, toStringBrief, toStringId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.text.NumberFormat numberFormatter
Constructor Detail |
---|
protected Avatar_(Individual individual)
individual
- the individual which is modeled by this avatar.protected Avatar_(Individual individual, java.awt.Color color)
color
.
individual
- the individual which is modeled by this avatar.color
- the color for the new Avatar.protected Avatar_(Individual individual, java.awt.Point location)
point
and with color black.
individual
- the individual which is modeled by this avatar.location
- the location for the new Avatar.
TESTprotected Avatar_(Individual individual, java.awt.Point location, java.awt.Color color)
point
and with given color
.
individual
- the individual which is modeled by this avatar.location
- the location for the new Avatar.color
- the color for the new Avatar.Method Detail |
---|
public static java.lang.String showColor(java.awt.Color color)
color
-
public static java.lang.String showLocation(java.awt.Point location)
location
-
public static java.lang.String showSize(java.lang.Double size)
location
-
public double getSize()
getSize
in interface Avatar
Avatar.getSize()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
protected void moveTo(java.awt.Point point)
point
- protected void setColor(java.awt.Color color)
color
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.awt.Color getColor()
getColor
in interface Avatar
public Individual getIndividual()
getIndividual
in interface Avatar
Avatar.getIndividual()
public java.awt.Point getLocation()
getLocation
in interface Avatar
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |