Interface ILabelClass
- All Superinterfaces:
CartographicSupport,Cloneable,org.gvsig.tools.lang.Cloneable,org.gvsig.tools.persistence.Persistent
public interface ILabelClass
extends org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent, CartographicSupport
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
CartographicSupport.CartographicContext -
Field Summary
Fields inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
PAPER, WORLD -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D graphics, ILabelLocationMetrics llm, org.gvsig.fmap.geom.Geometry geom) LabelLocationMetrics, contains the anchor point, rotation, and some other geometric calculations computed by the PlacementManager.voiddrawInsideRectangle(Graphics2D graphics, Rectangle bounds) Useful to render a Label with size inside little rectangles.Returns a rectangle in Cartographics unitsString[]Returns the expression that defines the text which will be showed in the labelReturns the style of the labelgetName()Returns the name of the labelintorg.gvsig.fmap.geom.GeometryReturns the expression that defines the text which will be showed in the label ready to be used for the label parserString[]getTexts()Return the text for the labelReturns the text symbol that is being used for the text(the font, size,style,aligment)booleanbooleanReturns true if the label will be showed in the mapbooleanisVisible(double scale) Returns true if the label will be showed in the mapvoidsetLabelExpressions(String[] lbl_exps) Sets the expression that defines the text which will be showed in the labelvoidsetLabelStyle(ILabelStyle labelStyle) Stablishes the style for the label.voidStablishes the name of the labelvoidsetPriority(int priority) voidsetSQLQuery(String sqlQuery) voidSets the text for the labelvoidsetTextSymbol(ITextSymbol textSymbol) Stablishes the text symbol that is going to be used for the text(the font,size,style,aligment)voidsetUseSqlQuery(boolean use_sql) voidsetVisible(boolean isVisible) Sets the visibility of the label in the map.toString()Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsMethods inherited from interface org.gvsig.tools.lang.Cloneable
cloneMethods inherited from interface org.gvsig.tools.persistence.Persistent
loadFromState, saveToState
-
Method Details
-
isVisible
boolean isVisible()Returns true if the label will be showed in the map- Returns:
- isVisible boolean
-
isVisible
boolean isVisible(double scale) Returns true if the label will be showed in the map- Returns:
- isVisible boolean
-
setVisible
void setVisible(boolean isVisible) Sets the visibility of the label in the map.- Parameters:
isVisible- boolean
-
getTextSymbol
ITextSymbol getTextSymbol()Returns the text symbol that is being used for the text(the font, size,style,aligment)- Returns:
- label ITextSymbol
-
setTextSymbol
Stablishes the text symbol that is going to be used for the text(the font,size,style,aligment)- Parameters:
textSymbol- ITextSymbol
-
setLabelStyle
Stablishes the style for the label.- Parameters:
labelStyle- ILabelStyle
-
getLabelStyle
ILabelStyle getLabelStyle()Returns the style of the label -
getName
String getName()Returns the name of the label -
setName
Stablishes the name of the label- Parameters:
name-
-
toString
String toString() -
setTexts
Sets the text for the label- Parameters:
texts- String[]
-
getTexts
String[] getTexts()Return the text for the label- Parameters:
texts- String[]
-
draw
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
- Parameters:
graphics- , graphics to use to paint the label.llm- , concrete settings of the placement of this layershp- , the Shape over whose the label is painted
-
drawInsideRectangle
Useful to render a Label with size inside little rectangles.- Parameters:
graphics- Graphics2Dbounds- Rectangle- Throws:
SymbolDrawingException
-
getPriority
int getPriority() -
setPriority
void setPriority(int priority) -
getShape
org.gvsig.fmap.geom.Geometry getShape(ILabelLocationMetrics llm) throws org.gvsig.fmap.geom.exception.CreateGeometryException - Throws:
org.gvsig.fmap.geom.exception.CreateGeometryException
-
getClassName
String getClassName() -
getBounds
Rectangle getBounds()Returns a rectangle in Cartographics units- Returns:
-
getSQLQuery
String getSQLQuery() -
setSQLQuery
-
getLabelExpressions
String[] getLabelExpressions()Returns the expression that defines the text which will be showed in the label- Returns:
- labelExpressions String[]
-
setLabelExpressions
Sets the expression that defines the text which will be showed in the label -
setUseSqlQuery
void setUseSqlQuery(boolean use_sql) -
isUseSqlQuery
boolean isUseSqlQuery() -
getStringLabelExpression
String getStringLabelExpression()Returns the expression that defines the text which will be showed in the label ready to be used for the label parser- Returns:
- labelExpression String
-