public class LabelClass extends AbstractCartographicSupport implements ILabelClass
| Modifier and Type | Class and Description |
|---|---|
static class |
LabelClass.RegisterPersistence |
CartographicSupport.CartographicContextPAPER, WORLD| Constructor and Description |
|---|
LabelClass() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a copy of the object.
|
void |
draw(java.awt.Graphics2D graphics,
ILabelLocationMetrics llm,
Geometry geom)
LabelLocationMetrics, contains the anchor point, rotation, and some
other geometric calculations computed by the PlacementManager.
|
void |
drawInsideRectangle(java.awt.Graphics2D graphics,
java.awt.Rectangle bounds)
Useful to render a Label with size inside little rectangles.
|
java.awt.Rectangle |
getBounds() |
double |
getCartographicSize(ViewPort viewPort,
double dpi,
Geometry geom) |
java.lang.String |
getClassName() |
java.lang.String[] |
getLabelExpressions()
Returns the expression that defines the text which will be showed in
the label
|
ILabelStyle |
getLabelStyle()
Returns the style of the label
|
java.lang.String |
getName()
Returns the name of the label
|
int |
getPriority() |
Geometry |
getShape(ILabelLocationMetrics llm) |
java.lang.String |
getSQLQuery() |
java.lang.String |
getStringLabelExpression()
Returns the expression that defines the text which will be showed in
the label ready to be used for the label parser
|
java.lang.String[] |
getTexts()
Return the text for the label
|
ITextSymbol |
getTextSymbol()
Returns the text symbol that is being used for the text(the font,
size,style,aligment)
|
boolean |
isUseSqlQuery() |
boolean |
isVisible()
Returns true if the label will be showed in the map
|
boolean |
isVisible(double scale)
Returns true if the label will be showed in the map
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setLabelExpressions(java.lang.String[] lbl_exps)
Stablishes the expresion that, when it is evaluated, returns the text
which will be showed by the label.
|
void |
setLabelStyle(ILabelStyle labelStyle)
Stablishes the style for the label.
|
void |
setName(java.lang.String name)
Stablishes the name of the label
|
void |
setPriority(int priority) |
void |
setReferenceSystem(int referenceSystem)
Sets the Reference System that defines how this units have to be
handled.
|
void |
setSQLQuery(java.lang.String sqlQuery) |
void |
setTexts(java.lang.String[] texts)
Sets the text for the label
|
void |
setTextSymbol(ITextSymbol textSymbol)
Stablishes the text symbol that is going to be used for the text(the
font,size,style,aligment)
|
void |
setUnit(int unitIndex)
Defines the unit used to express measures.
|
void |
setUseSqlQuery(boolean use_sql) |
void |
setVisible(boolean isVisible)
Sets the visibility of the label in the map.
|
java.lang.String |
toString() |
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, toCartographicUnitsequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloneQuietly, cloneQuietlycopyCartographicContext, copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, toCartographicUnitspublic boolean isVisible()
isVisible in interface ILabelClasspublic boolean isVisible(double scale)
isVisible in interface ILabelClasspublic void setVisible(boolean isVisible)
setVisible in interface ILabelClassisVisible - booleanpublic java.lang.String[] getLabelExpressions()
getLabelExpressions in interface ILabelClasspublic void setLabelExpressions(java.lang.String[] lbl_exps)
setLabelExpressions in interface ILabelClasslabelExpression - Stringpublic ITextSymbol getTextSymbol()
getTextSymbol in interface ILabelClasspublic void setTextSymbol(ITextSymbol textSymbol)
setTextSymbol in interface ILabelClasstextSymbol - ITextSymbolpublic void setLabelStyle(ILabelStyle labelStyle)
setLabelStyle in interface ILabelClasslabelStyle - ILabelStylepublic ILabelStyle getLabelStyle()
getLabelStyle in interface ILabelClasspublic java.lang.String getName()
getName in interface ILabelClasspublic void setName(java.lang.String name)
setName in interface ILabelClassname - public java.lang.String toString()
toString in interface ILabelClasstoString in class java.lang.Objectpublic void setTexts(java.lang.String[] texts)
setTexts in interface ILabelClasstexts - String[]public java.lang.String[] getTexts()
getTexts in interface ILabelClasstexts - String[]public void draw(java.awt.Graphics2D graphics,
ILabelLocationMetrics llm,
Geometry geom)
LabelLocationMetrics, contains the anchor point, rotation, and some other geometric calculations computed by the PlacementManager.
The shp argument is passed as an accessory for subclasses of this class in case they need futher geometric calculations
draw in interface ILabelClassgraphics, - graphics to use to paint the label.llm, - concrete settings of the placement of this layershp, - the Shape over whose the label is paintedpublic void drawInsideRectangle(java.awt.Graphics2D graphics,
java.awt.Rectangle bounds)
throws SymbolDrawingException
drawInsideRectangle in interface ILabelClassgraphics - Graphics2Dbounds - RectangleSymbolDrawingExceptionpublic int getPriority()
getPriority in interface ILabelClasspublic void setPriority(int priority)
setPriority in interface ILabelClasspublic Geometry getShape(ILabelLocationMetrics llm) throws CreateGeometryException
getShape in interface ILabelClassCreateGeometryExceptionpublic java.lang.String getClassName()
getClassName in interface ILabelClasspublic void setReferenceSystem(int referenceSystem)
CartographicSupportsetReferenceSystem in interface CartographicSupportsetReferenceSystem in class AbstractCartographicSupportpublic void setUnit(int unitIndex)
CartographicSupportsetUnit in interface CartographicSupportsetUnit in class AbstractCartographicSupportpublic java.awt.Rectangle getBounds()
getBounds in interface ILabelClasspublic java.lang.String getSQLQuery()
getSQLQuery in interface ILabelClasspublic void setSQLQuery(java.lang.String sqlQuery)
setSQLQuery in interface ILabelClasspublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void setUseSqlQuery(boolean use_sql)
setUseSqlQuery in interface ILabelClasspublic boolean isUseSqlQuery()
isUseSqlQuery in interface ILabelClasspublic java.lang.String getStringLabelExpression()
ILabelClassgetStringLabelExpression in interface ILabelClasspublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if the instance of the object cannot
be cloned. As this is extending Cloneable so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.