ConForM.CoopnTools.CoKer.AspectMgr
Class Aspect

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.AspectMgr.Aspect
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
ArcAspect, ContainerAspect, NodeAspect

public abstract class Aspect
extends java.lang.Object
implements java.lang.Cloneable

Aspect. This abstract class defines general aspects in CoopnTools. An aspect is defined by a location (mandatory), by an information text (optionnal), by locations for the label and the information text, and by three flags deciding if the element, if the label, and if the information text are shown. All distances measures are expressed in (inches/81.92)


Constructor Summary
Aspect(java.awt.Point location, java.lang.String info, java.awt.Point labelLocation, java.awt.Point infoLocation, boolean shown, boolean labelShown, boolean infoShown, java.awt.Color color)
          Simple constructor.
 
Method Summary
abstract  java.lang.Object clone()
          Cloning method.
abstract  boolean equals(java.lang.Object obj)
          Equality method.
 java.awt.Color getColor()
          Get the color.
 java.lang.String getInfo()
          Get the information field.
 java.awt.Point getInfoLocation()
          Get the location of the information field.
 java.awt.Point getLabelLocation()
          Get the location of the label.
 java.awt.Point getLocation()
          Get the location.
 int hashCode()
          Hashcode method.
protected  Aspect internalClone()
           
protected  boolean internalEquals(java.lang.Object obj)
           
protected  java.lang.String internalToString(CoopnEnv env, int indent)
           
 boolean isInfoShown()
          Look if the information field is shown.
 boolean isLabelShown()
          Look if the label is shown.
 boolean isShown()
          Look if the associated element is shown.
 void setAspect(Aspect aspect)
          Copy an aspect.
 void setColor(java.awt.Color color)
          Set the color.
 void setInfo(java.lang.String info)
          Set the information field.
 void setInfoLocation(java.awt.Point infoLocation)
          Set the location of the information field.
 void setInfoShown(boolean shown)
          Specifiy is the information field is shown.
 void setLabelLocation(java.awt.Point labelLocation)
          Set the location of the label.
 void setLabelShown(boolean shown)
          Specifiy is the label is shown.
 void setLocation(java.awt.Point location)
          Set the location.
 void setShown(boolean shown)
          Specifiy if the associated element is shown.
 java.lang.String toString()
          String conversion method.
 java.lang.String toString(CoopnEnv env)
          String conversion method.
abstract  java.lang.String toString(CoopnEnv env, int indent)
          String conversion method.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Aspect

public Aspect(java.awt.Point location,
              java.lang.String info,
              java.awt.Point labelLocation,
              java.awt.Point infoLocation,
              boolean shown,
              boolean labelShown,
              boolean infoShown,
              java.awt.Color color)
Simple constructor. An aspect
Method Detail

getLocation

public java.awt.Point getLocation()
Get the location.
Returns:
The location as a Point.

setLocation

public void setLocation(java.awt.Point location)
Set the location.
Parameters:
location - the location as a Point; cannot be null

getInfo

public java.lang.String getInfo()
Get the information field. This field is never null, but may be an empty string.
Returns:
The information field as a String

setInfo

public void setInfo(java.lang.String info)
Set the information field.
Parameters:
info - the information field as a String; if this parameter is null, an empty string is used as information field

getLabelLocation

public java.awt.Point getLabelLocation()
Get the location of the label.
Returns:
The location as a Point.

setLabelLocation

public void setLabelLocation(java.awt.Point labelLocation)
Set the location of the label.
Parameters:
labelLocation - the location as a Point

getInfoLocation

public java.awt.Point getInfoLocation()
Get the location of the information field.
Returns:
The location as a Point.

setInfoLocation

public void setInfoLocation(java.awt.Point infoLocation)
Set the location of the information field.
Parameters:
infoLocation - the location as a Point

isShown

public boolean isShown()
Look if the associated element is shown. If the element is not shown, nothing of its componenets must be shown, and in particular the label must not be shown.
Returns:
true iff the associated element is shown.

setShown

public void setShown(boolean shown)
Specifiy if the associated element is shown.
Parameters:
shown - true iff the element must be shown

isLabelShown

public boolean isLabelShown()
Look if the label is shown.
Returns:
true iff the label is shown.

setLabelShown

public void setLabelShown(boolean shown)
Specifiy is the label is shown.
Parameters:
shown - true iff the label must be shown

isInfoShown

public boolean isInfoShown()
Look if the information field is shown.
Returns:
true iff the information field is shown.

setInfoShown

public void setInfoShown(boolean shown)
Specifiy is the information field is shown.
Parameters:
shown - true iff the information field must be shown

getColor

public java.awt.Color getColor()
Get the color.
Returns:
the color.

setColor

public void setColor(java.awt.Color color)
Set the color.
Parameters:
color - the color

toString

public abstract java.lang.String toString(CoopnEnv env,
                                          int indent)
String conversion method. Must be defined in the inherited classes. This routine converts an element into a string representing it.
Parameters:
env - the environment deciding the form of the display
indent - the identation factor
Returns:
a String image of the element.

internalToString

protected java.lang.String internalToString(CoopnEnv env,
                                            int indent)

toString

public java.lang.String toString(CoopnEnv env)
String conversion method. Use an identation of 0. This routine converts an element into a string representing it.
Parameters:
env - the environment deciding the form of the display
Returns:
a String image of the element.

toString

public java.lang.String toString()
String conversion method. Use no environment and an identation of 0. This * routine converts an element into a string representing it.
Overrides:
toString in class java.lang.Object
Returns:
a String image of the element.

equals

public abstract boolean equals(java.lang.Object obj)
Equality method. Must be defined in the inherited classes.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare
Returns:
true iff this object and the parameter are equals.

internalEquals

protected boolean internalEquals(java.lang.Object obj)

hashCode

public int hashCode()
Hashcode method.
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code.

setAspect

public void setAspect(Aspect aspect)
Copy an aspect.
Parameters:
aspect - the aspect to copy.

clone

public abstract java.lang.Object clone()
Cloning method. Must be defined in the inherited classes.
Overrides:
clone in class java.lang.Object
Returns:
a clone object.

internalClone

protected Aspect internalClone()