public class SmartTextSymbolLabelClass
extends org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
implements org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
SmartTextSymbolLabelClass.java
This is a wrapper to be able to use a SmartTextSymbol as a
LabelClass. A SmartTextSymbol uses a line instead of a point.
Being in fact a Line and not a Marker, it does not make any sense
to have label styles since the label styles are well-defined rectangle
areas where texts are placed in fields backgrounded by an image. In this
contexts, the area is defined dinamically for each line, and there is no
sense to have texts fields. They will be rendered as a single string
along a line.
The label itself is the SmartTextSymbol,
the geometry (the line), the label expression,
and the text applied to the symbol.
Most of the operations performed by this LabelClass are in fact
delegated to the symbol.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SMART_LABEL_CLASS_PERSISTENCE_DEFINITION_NAME |
| Constructor and Description |
|---|
SmartTextSymbolLabelClass() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
void |
draw(java.awt.Graphics2D graphics,
org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelLocationMetrics llm,
org.gvsig.fmap.geom.Geometry geo) |
void |
drawInsideRectangle(java.awt.Graphics2D graphics,
java.awt.Rectangle bounds) |
java.awt.Rectangle |
getBounds() |
java.lang.String |
getClassName() |
java.lang.String[] |
getLabelExpressions() |
org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle |
getLabelStyle() |
java.lang.String |
getName() |
int |
getPriority() |
org.gvsig.fmap.geom.Geometry |
getShape(org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelLocationMetrics llm) |
java.lang.String |
getSQLQuery() |
java.lang.String |
getStringLabelExpression() |
java.lang.String[] |
getTexts() |
org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol |
getTextSymbol() |
boolean |
isUseSqlQuery() |
boolean |
isVisible() |
boolean |
isVisible(double scale) |
void |
loadFromState(org.gvsig.tools.persistence.PersistentState state) |
static void |
registerPersistent() |
void |
saveToState(org.gvsig.tools.persistence.PersistentState state) |
void |
setCartographicContext(org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext ctx) |
void |
setLabelExpressions(java.lang.String[] lbl_exps) |
void |
setLabelStyle(org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle labelStyle) |
void |
setName(java.lang.String name) |
void |
setPriority(int priority) |
void |
setSQLQuery(java.lang.String sqlQuery) |
void |
setTexts(java.lang.String[] texts) |
void |
setTextSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol textSymbol) |
void |
setUseSqlQuery(boolean use_sql) |
void |
setVisible(boolean isVisible) |
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoStringcopyCartographicContext, copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitspublic static final java.lang.String SMART_LABEL_CLASS_PERSISTENCE_DEFINITION_NAME
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic void draw(java.awt.Graphics2D graphics,
org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelLocationMetrics llm,
org.gvsig.fmap.geom.Geometry geo)
draw in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void drawInsideRectangle(java.awt.Graphics2D graphics,
java.awt.Rectangle bounds)
throws org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException
drawInsideRectangle in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClassorg.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingExceptionpublic java.awt.Rectangle getBounds()
getBounds in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic java.lang.String getClassName()
getClassName in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic java.lang.String[] getLabelExpressions()
getLabelExpressions in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle getLabelStyle()
getLabelStyle in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic java.lang.String getName()
getName in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic int getPriority()
getPriority in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic org.gvsig.fmap.geom.Geometry getShape(org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelLocationMetrics llm)
throws org.gvsig.fmap.geom.exception.CreateGeometryException
getShape in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClassorg.gvsig.fmap.geom.exception.CreateGeometryExceptionpublic java.lang.String getSQLQuery()
getSQLQuery in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic java.lang.String getStringLabelExpression()
getStringLabelExpression in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic java.lang.String[] getTexts()
getTexts in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol getTextSymbol()
getTextSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic boolean isUseSqlQuery()
isUseSqlQuery in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic boolean isVisible()
isVisible in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic boolean isVisible(double scale)
isVisible in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void loadFromState(org.gvsig.tools.persistence.PersistentState state)
throws org.gvsig.tools.persistence.exception.PersistenceException
loadFromState in interface org.gvsig.tools.persistence.Persistentorg.gvsig.tools.persistence.exception.PersistenceExceptionpublic static void registerPersistent()
public void saveToState(org.gvsig.tools.persistence.PersistentState state)
throws org.gvsig.tools.persistence.exception.PersistenceException
saveToState in interface org.gvsig.tools.persistence.Persistentorg.gvsig.tools.persistence.exception.PersistenceExceptionpublic void setCartographicContext(org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext ctx)
setCartographicContext in interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupportsetCartographicContext in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupportpublic void setLabelExpressions(java.lang.String[] lbl_exps)
setLabelExpressions in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void setLabelStyle(org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle labelStyle)
setLabelStyle in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void setName(java.lang.String name)
setName in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void setPriority(int priority)
setPriority in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void setSQLQuery(java.lang.String sqlQuery)
setSQLQuery in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void setTexts(java.lang.String[] texts)
setTexts in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void setTextSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol textSymbol)
setTextSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void setUseSqlQuery(boolean use_sql)
setUseSqlQuery in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClasspublic void setVisible(boolean isVisible)
setVisible in interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClassCopyright © 2024 gvSIG Association. All rights reserved.