metricsOverlay.model.augmentation
Class Augmentation

java.lang.Object
  extended by metricsOverlay.model.augmentation.Augmentation
All Implemented Interfaces:
java.lang.Comparable<Augmentation>, IEditable, INameable, ITyped
Direct Known Subclasses:
BackgroundLineAugmentation, MarginAugmentation, SectionAugmentation

public abstract class Augmentation
extends java.lang.Object
implements java.lang.Comparable<Augmentation>, ITyped, INameable, IEditable

This class provides a representation of a display.

Version:
8/7/2009
Author:
Matthew Harward

Constructor Summary
Augmentation()
           
Augmentation(java.lang.String augName)
          Main constructor
 
Method Summary
 void addColor(org.eclipse.swt.graphics.Color color)
           
 boolean canChangeEditableStatus()
           
 boolean canEdit()
           
 int compareTo(Augmentation o)
           
abstract  void disable()
           
 double getAugMax()
           
 int getAugMin()
           
 IColorManager getCManager()
           
 java.util.List<org.eclipse.swt.graphics.Color> getColors()
           
 int getImportance()
           
 java.lang.String getName()
          The name of this display
 java.lang.String getType()
           
 boolean isAnnotated()
           
 boolean isDiscrete()
           
 void setAnnotations(boolean annotations)
           
 void setColors(java.util.List<org.eclipse.swt.graphics.Color> colors)
           
 void setDiscrete(boolean discrete)
           
 void setEditable(boolean editable)
          If allowed, this sets the new editable status.
 void setImportance(int importance)
           
 void setName(java.lang.String name)
          This method sets the name of a nameable object.
 java.lang.String toString()
          This to string method provides a textual representation of the object.
abstract  void update(MetricFile mf, Mapping mm)
          This method updates the display strategy, given an update in the eclipse java editor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Augmentation

public Augmentation()

Augmentation

public Augmentation(java.lang.String augName)
Main constructor

Parameters:
augName - a name defining an implemented type of display strategy. Existing strategies can be found in AugmentationName.
Method Detail

getName

public java.lang.String getName()
The name of this display

Specified by:
getName in interface INameable
Returns:
the name

getType

public java.lang.String getType()
Specified by:
getType in interface ITyped
Returns:
A succinct String description of the object.

toString

public java.lang.String toString()
This to string method provides a textual representation of the object.

Overrides:
toString in class java.lang.Object

disable

public abstract void disable()

compareTo

public int compareTo(Augmentation o)
Specified by:
compareTo in interface java.lang.Comparable<Augmentation>

addColor

public void addColor(org.eclipse.swt.graphics.Color color)

setName

public void setName(java.lang.String name)
Description copied from interface: INameable
This method sets the name of a nameable object. This name should be unique among objects of this type.

Specified by:
setName in interface INameable
Parameters:
name - the unique name to be set.

getImportance

public int getImportance()

update

public abstract void update(MetricFile mf,
                            Mapping mm)
This method updates the display strategy, given an update in the eclipse java editor.

Parameters:
mf - the updated metric file.
mm - the name of the mapping this display applies to.

isAnnotated

public boolean isAnnotated()

isDiscrete

public boolean isDiscrete()

setImportance

public void setImportance(int importance)

setDiscrete

public void setDiscrete(boolean discrete)

setAnnotations

public void setAnnotations(boolean annotations)

getAugMax

public double getAugMax()

getAugMin

public int getAugMin()

getCManager

public IColorManager getCManager()

getColors

public java.util.List<org.eclipse.swt.graphics.Color> getColors()

setColors

public void setColors(java.util.List<org.eclipse.swt.graphics.Color> colors)

canChangeEditableStatus

public boolean canChangeEditableStatus()
Specified by:
canChangeEditableStatus in interface IEditable
Returns:
A value to determine if the editable status may be changed.

canEdit

public boolean canEdit()
Specified by:
canEdit in interface IEditable
Returns:
A boolean value that determines if you are allowed to edit this class.

setEditable

public void setEditable(boolean editable)
Description copied from interface: IEditable
If allowed, this sets the new editable status.

Specified by:
setEditable in interface IEditable
Parameters:
editable - the new status.