pl.edu.agh.cast.model.visual.backward
Class Legend

java.lang.Object
  extended by pl.edu.agh.cast.model.visual.backward.ModelElement
      extended by pl.edu.agh.cast.model.visual.backward.Legend
All Implemented Interfaces:
PropertyChangeListener, Serializable, EventListener, IPropertyChangeProvider, AttributeValueContainer, IMoveable

public class Legend
extends ModelElement
implements IMoveable

Diagram legend.

Author:
AGH CAST Team
See Also:
Serialized Form

Field Summary
protected  org.eclipse.draw2d.geometry.Point location
          Location of the legend.
static String LOCATION
          Name of the Location changed event.
 
Fields inherited from class pl.edu.agh.cast.model.visual.backward.ModelElement
ATTRIBUTE_CHANGE, attributeValues
 
Constructor Summary
Legend(String diagramName)
          Creates new Legend for given diagram.
 
Method Summary
 AttributeManager getAttributeManager()
          Returns attribute manager for this container.
 String getDiagramName()
           
 String getImageLabel(String imageId)
          Returns label for the given image.
 String getLabel()
          Returns label of movable element.
 String getLineColorLabel(HexColor color)
          Returns label for the given line color.
 org.eclipse.draw2d.geometry.Point getLocation()
          Returns current location of movable element.
 void setDiagramName(String diagramName)
          Sets the name of the IDiagram this legend is for.
 void setLocation(org.eclipse.draw2d.geometry.Point newLocation)
          Sets new location of movable element.
 
Methods inherited from class pl.edu.agh.cast.model.visual.backward.ModelElement
addPropertyChangeListener, bindToAttributeManager, copyAttributes, copyAttributeValues, firePropertyChange, getAllValues, getAttributeValue, getMid, isAttributeEditable, isAttributeSettable, isSaved, propertyChange, readResolve, removePropertyChangeListener, removePropertyValue, setAttributeValue, setAttributeValue, setMid, setSaved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCATION

public static final String LOCATION
Name of the Location changed event.

See Also:
Constant Field Values

location

protected org.eclipse.draw2d.geometry.Point location
Location of the legend.

Constructor Detail

Legend

public Legend(String diagramName)
Creates new Legend for given diagram.

Parameters:
diagramName - the name of the diagram.
Method Detail

getDiagramName

public String getDiagramName()

getLocation

public org.eclipse.draw2d.geometry.Point getLocation()
Description copied from interface: IMoveable
Returns current location of movable element.

Specified by:
getLocation in interface IMoveable
Returns:
current element location

getImageLabel

public String getImageLabel(String imageId)
Returns label for the given image.

Parameters:
imageId - id of the image
Returns:
label for the image

getLineColorLabel

public String getLineColorLabel(HexColor color)
Returns label for the given line color.

Parameters:
color - line color
Returns:
label for the line color

setLocation

public void setLocation(org.eclipse.draw2d.geometry.Point newLocation)
Sets new location of movable element.

Specified by:
setLocation in interface IMoveable
Parameters:
newLocation - new location point
See Also:
IMoveable.setLocation(org.eclipse.draw2d.geometry.Point)

getLabel

public String getLabel()
Description copied from interface: IMoveable
Returns label of movable element.

Specified by:
getLabel in interface IMoveable
Returns:
element label

setDiagramName

public void setDiagramName(String diagramName)
Sets the name of the IDiagram this legend is for.

Parameters:
diagramName - name of the diagram

getAttributeManager

public AttributeManager getAttributeManager()
Returns attribute manager for this container.

Specified by:
getAttributeManager in interface AttributeValueContainer
Specified by:
getAttributeManager in class ModelElement
Returns:
attribute manager for this container
See Also:
ModelElement.getAttributeManager()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.