Class SmartTextSymbolLabelClass
- All Implemented Interfaces:
Cloneable,org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass,org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport,org.gvsig.tools.lang.Cloneable,org.gvsig.tools.persistence.Persistent
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.
- Author:
- jldominguez
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext -
Field Summary
FieldsFields inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
PAPER, WORLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()voiddraw(Graphics2D graphics, org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelLocationMetrics llm, org.gvsig.fmap.geom.Geometry geo) voiddrawInsideRectangle(Graphics2D graphics, Rectangle bounds) String[]org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStylegetName()intorg.gvsig.fmap.geom.GeometrygetShape(org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelLocationMetrics llm) String[]getTexts()org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbolbooleanbooleanbooleanisVisible(double scale) voidloadFromState(org.gvsig.tools.persistence.PersistentState state) static voidvoidsaveToState(org.gvsig.tools.persistence.PersistentState state) voidsetCartographicContext(org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext ctx) voidsetLabelExpressions(String[] lbl_exps) voidsetLabelStyle(org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle labelStyle) voidvoidsetPriority(int priority) voidsetSQLQuery(String sqlQuery) voidvoidsetTextSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol textSymbol) voidsetUseSqlQuery(boolean use_sql) voidsetVisible(boolean isVisible) Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsMethods inherited from interface org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
toString
-
Field Details
-
SMART_LABEL_CLASS_PERSISTENCE_DEFINITION_NAME
- See Also:
-
-
Constructor Details
-
SmartTextSymbolLabelClass
public SmartTextSymbolLabelClass()
-
-
Method Details
-
draw
public void draw(Graphics2D graphics, org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelLocationMetrics llm, org.gvsig.fmap.geom.Geometry geo) - Specified by:
drawin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
drawInsideRectangle
public void drawInsideRectangle(Graphics2D graphics, Rectangle bounds) throws org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException - Specified by:
drawInsideRectanglein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass- Throws:
org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException
-
getClassName
- Specified by:
getClassNamein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
getLabelStyle
public org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle getLabelStyle()- Specified by:
getLabelStylein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
getTextSymbol
public org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol getTextSymbol()- Specified by:
getTextSymbolin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
setLabelStyle
public void setLabelStyle(org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle labelStyle) - Specified by:
setLabelStylein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
setTextSymbol
public void setTextSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol textSymbol) - Specified by:
setTextSymbolin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
loadFromState
public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
loadFromStatein interfaceorg.gvsig.tools.persistence.Persistent- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
saveToState
public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
saveToStatein interfaceorg.gvsig.tools.persistence.Persistent- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
registerPersistent
public static void registerPersistent() -
isVisible
public boolean isVisible()- Specified by:
isVisiblein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
isVisible
public boolean isVisible(double scale) - Specified by:
isVisiblein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
setVisible
public void setVisible(boolean isVisible) - Specified by:
setVisiblein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
getName
- Specified by:
getNamein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
setName
- Specified by:
setNamein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
setTexts
- Specified by:
setTextsin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
getTexts
- Specified by:
getTextsin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
setPriority
public void setPriority(int priority) - Specified by:
setPriorityin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
getShape
public org.gvsig.fmap.geom.Geometry getShape(org.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelLocationMetrics llm) throws org.gvsig.fmap.geom.exception.CreateGeometryException - Specified by:
getShapein interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass- Throws:
org.gvsig.fmap.geom.exception.CreateGeometryException
-
setCartographicContext
public void setCartographicContext(org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext ctx) - Specified by:
setCartographicContextin interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport- Overrides:
setCartographicContextin classorg.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
-
getBounds
- Specified by:
getBoundsin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
getSQLQuery
- Specified by:
getSQLQueryin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
setSQLQuery
- Specified by:
setSQLQueryin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
getLabelExpressions
- Specified by:
getLabelExpressionsin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
setLabelExpressions
- Specified by:
setLabelExpressionsin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
setUseSqlQuery
public void setUseSqlQuery(boolean use_sql) - Specified by:
setUseSqlQueryin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
isUseSqlQuery
public boolean isUseSqlQuery()- Specified by:
isUseSqlQueryin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
getStringLabelExpression
- Specified by:
getStringLabelExpressionin interfaceorg.gvsig.fmap.mapcontext.rendering.legend.styling.ILabelClass
-
clone
- Specified by:
clonein interfaceorg.gvsig.tools.lang.Cloneable- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-