|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgistoolkit.display.labeler.SimpleLabeler
Simple Labeler to be extended by more advanced renderers.
Field Summary | |
static int |
CENTER
The orientation of the label. |
static int |
EAST
|
static int |
NORTH
|
static int |
SOUTH
|
static int |
WEST
|
Constructor Summary | |
SimpleLabeler()
Creates new BasicLabeler |
Method Summary | |
void |
beginLabel()
Called before the layer is initially labeled to allow the labeler to prepare for labeling. |
protected abstract boolean |
drawLabel(Record inRecord,
java.awt.Graphics inGraphics,
Converter inConverter)
Draw the record after checking for not null. |
boolean |
drawLabel(Record inRecord,
java.awt.Graphics inGraphics,
Converter inConverter,
Shader inShader)
Draw the label for the record on the graphics context |
boolean |
drawLabelHighlight(Record inRecord,
java.awt.Graphics inGraphics,
Converter inConverter,
Shader inShader)
Highlight the Label when the shape is highlighted. |
static void |
drawString(java.lang.String inString,
java.awt.Graphics2D inGraphics,
float inX,
float inY,
float inWidth,
float inHeight)
Draw the string even if it contains carrage returns. |
void |
endLabel()
Called after the layer has completed labeling. |
boolean |
getAllowDuplicates()
Returns true if duplicates are allowed, false otherwise. |
boolean |
getAllowOverlaps()
Get the allow overlaps flag. |
static java.awt.geom.Rectangle2D |
getBounds(java.lang.String inString,
java.awt.Graphics2D inGraphics)
Method to get the length and width of the string even if it contains carage returns. |
int |
getLabelColumn()
Retrive the label by column. |
abstract java.lang.String |
getLabelerName()
A name for this labeler, returns "Simple Labeler". |
int |
getLabelOffset()
Get the distance from the label point that the label will be placed. |
int |
getLabelOrientation()
Get the orientation of the labels relative to their anchor. |
java.awt.Point |
getLabelPosition(int inX,
int inY,
int inWidth,
int inHeight)
Convenience method for subclasses, given the anchor position, calculate the label position. |
Node |
getNode()
get the configuration information for this labeler |
OverlapManager |
getOverlapManager()
Return the OverlapManager for this labeler. |
static java.lang.String[] |
getStrings(java.lang.String inString)
Get the individual Strings. |
boolean |
isDuplicate(java.lang.Object inValue)
Checks if this is a duplicate value. |
boolean |
isOverLaps(int inLocX,
int inLocY,
int inWidth,
int inHeight)
Checks if this is an overlaping value. |
boolean |
isOverLaps(java.awt.Shape inShape)
Checks if this is an overlaping value. |
void |
removeDuplicate(java.lang.Object inValue)
Removes this entry from the list of duplicates. |
void |
setAllowDuplicates(boolean inDuplicates)
Indicates that duplicates are allowed. |
void |
setAllowOverlaps(boolean inOverlaps)
Set the allow overlaps flag. |
void |
setLabelColumn(int inLabelColumn)
Set the number of the column to label by. |
void |
setLabelOffset(int inOffset)
Set the distance from the label point that the label will be placed. |
void |
setLabelOrientation(int inOrientation)
Set the orientation of the labels relative to their anchor. |
void |
setNode(Node inNode)
Set the configuration information for this labeler |
java.lang.String |
toString()
Return the name of the labeler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CENTER
public static final int NORTH
public static final int EAST
public static final int SOUTH
public static final int WEST
Constructor Detail |
public SimpleLabeler()
Method Detail |
public abstract java.lang.String getLabelerName()
getLabelerName
in interface Labeler
public void setLabelColumn(int inLabelColumn)
public int getLabelColumn()
public void setLabelOffset(int inOffset)
public int getLabelOffset()
public void setLabelOrientation(int inOrientation)
public int getLabelOrientation()
public void setAllowDuplicates(boolean inDuplicates)
public boolean getAllowDuplicates()
public boolean isDuplicate(java.lang.Object inValue)
public void removeDuplicate(java.lang.Object inValue)
public void setAllowOverlaps(boolean inOverlaps)
public boolean getAllowOverlaps()
public OverlapManager getOverlapManager()
public boolean isOverLaps(int inLocX, int inLocY, int inWidth, int inHeight)
public boolean isOverLaps(java.awt.Shape inShape)
public java.awt.Point getLabelPosition(int inX, int inY, int inWidth, int inHeight)
public boolean drawLabel(Record inRecord, java.awt.Graphics inGraphics, Converter inConverter, Shader inShader)
drawLabel
in interface Labeler
protected abstract boolean drawLabel(Record inRecord, java.awt.Graphics inGraphics, Converter inConverter)
public boolean drawLabelHighlight(Record inRecord, java.awt.Graphics inGraphics, Converter inConverter, Shader inShader)
drawLabelHighlight
in interface Labeler
public java.lang.String toString()
public Node getNode()
getNode
in interface Labeler
public void setNode(Node inNode) throws java.lang.Exception
setNode
in interface Labeler
java.lang.Exception
public void beginLabel()
beginLabel
in interface Labeler
public void endLabel()
endLabel
in interface Labeler
public static void drawString(java.lang.String inString, java.awt.Graphics2D inGraphics, float inX, float inY, float inWidth, float inHeight)
public static java.awt.geom.Rectangle2D getBounds(java.lang.String inString, java.awt.Graphics2D inGraphics)
public static java.lang.String[] getStrings(java.lang.String inString)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |