Interface ILabelStyle
- All Superinterfaces:
Cloneable,org.gvsig.tools.lang.Cloneable,IStyle,org.gvsig.tools.persistence.Persistent
Defines the style that a Label symbol can contain which typically define
a background of the label as an Image, the texts that the label holds
and their position within the label in rendering time.
- Author:
- jaume dominguez faus - jaume.dominguez@iver.es
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTextFieldArea(Rectangle2D rect) Adds a new TextFieldArea with an specific size which is defined as a rectangle.voiddeleteTextFieldArea(int index) Delete the TextFieldArea specified by its index.intReturns the position of the point labeled by this label in percent units relative to the label bounds.getSize()Returns an array of rectangles defining the text boxes where text is placed.voidsetBackgroundFileStyle(IBackgroundFileStyle background) voidSets the position of the point labeled by this in percent units relative to the label boundsvoidsetSize(double width, double height) Sets the size for a laber and stablishes an unit scale factor to not change too much its contentvoidsetTextFieldArea(int index, Rectangle2D rect) Sets a TextFieldArea using its index.voidsetTextFields(String[] texts) Sets the texts that will appear in the label.Methods inherited from interface org.gvsig.tools.lang.Cloneable
cloneMethods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
drawInsideRectangle, drawOutline, getDescription, isSuitableFor, setDescriptionMethods inherited from interface org.gvsig.tools.persistence.Persistent
loadFromState, saveToState
-
Method Details
-
getFieldCount
int getFieldCount()- Returns:
- int, the amount of fields this style allows
-
setTextFields
Sets the texts that will appear in the label.- Parameters:
texts-
-
getTextBounds
Rectangle2D[] getTextBounds()Returns an array of rectangles defining the text boxes where text is placed.- Returns:
-
getSize
Dimension getSize() -
getMarkerPoint
Point2D getMarkerPoint()Returns the position of the point labeled by this label in percent units relative to the label bounds. It determines the offset to be applied to the label to be placed and allows the user to use custom styles. -
setMarkerPoint
Sets the position of the point labeled by this in percent units relative to the label bounds- Parameters:
p-- Throws:
IllegalArgumentException- if the point coordinates are >0.0 or invalid input: '<'1.0
-
setTextFieldArea
Sets a TextFieldArea using its index. With this method the user can modify the size of the rectangle for the TextFieldArea- Parameters:
index-rect-
-
addTextFieldArea
Adds a new TextFieldArea with an specific size which is defined as a rectangle.- Parameters:
rect- ,Rectangle2Dindex- ,int
-
deleteTextFieldArea
void deleteTextFieldArea(int index) Delete the TextFieldArea specified by its index.- Parameters:
index- ,int
-
setSize
void setSize(double width, double height) Sets the size for a laber and stablishes an unit scale factor to not change too much its content- Parameters:
width-height-
-
getBackgroundFileStyle
IBackgroundFileStyle getBackgroundFileStyle() -
setBackgroundFileStyle
-