com.rolemodelsoft.drawlet
Interface LineFigure

All Known Implementing Classes:
LinearShape

public interface LineFigure
extends Figure

This interface defines protocols for Figures that are essentially a line or series of line segments.


Fields inherited from interface com.rolemodelsoft.drawlet.Figure
FILL_COLOR_PROPERTY, LINE_COLOR_PROPERTY, LOCATION_PROPERTY, RELATION_PROPERTY, SHAPE_PROPERTY, SIZE_PROPERTY, STRING_PROPERTY, STYLE_PROPERTY, TEXT_COLOR_PROPERTY
 
Method Summary
 void addLocator(int index, Locator locator)
          Add the locator at the specified position.
 void addLocator(Locator locator)
          Add the locator at the end.
 Locator getLocator(int index)
          Answer the indexth locator.
 int getNumberOfPoints()
          Answer the number of points which define the receiver.
 void removeLocator(int index)
          Remove the locator at the specified position.
 void setLocator(int index, Locator locator)
          Set the locator at the specifed position.
 
Methods inherited from interface com.rolemodelsoft.drawlet.Figure
addPropertyChangeListener, addRelatedLocationListener, contains, contains, contains, disconnect, editTool, getHandles, getLocator, getStyle, intersects, intersects, isObsolete, isWithin, isWithin, locatorAt, move, move, relatedLocationListeners, removePropertyChangeListener, removeRelatedLocationListener, requestConnection, setBounds, setSize, setSize, setStyle, translate
 
Methods inherited from interface com.rolemodelsoft.drawlet.Paintable
getBottom, getBounds, getHeight, getLeft, getRight, getSize, getTop, getWidth, paint
 
Methods inherited from interface com.rolemodelsoft.drawlet.util.Duplicatable
duplicate, duplicateIn, postDuplicate
 

Method Detail

addLocator

public void addLocator(int index,
                       Locator locator)
Add the locator at the specified position.
Parameters:
locator - the new Locator to add.
index - the index of the locator desired.

addLocator

public void addLocator(Locator locator)
Add the locator at the end.
Parameters:
locator - the new Locator to add.

getLocator

public Locator getLocator(int index)
Answer the indexth locator.
Parameters:
index - the index of the locator desired.
Returns:
the Locator at the desired index

getNumberOfPoints

public int getNumberOfPoints()
Answer the number of points which define the receiver.
Returns:
an integer representing the number of points which define the receiver

removeLocator

public void removeLocator(int index)
Remove the locator at the specified position.
Parameters:
index - the index of the locator desired.

setLocator

public void setLocator(int index,
                       Locator locator)
Set the locator at the specifed position.
Parameters:
locator - the new Locator.
index - the index of the locator desired.