svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.mapcontext / org.gvsig.fmap.mapcontext.api / src / main / java / org / gvsig / fmap / mapcontext / rendering / legend / styling / ILabelClass.java @ 40559
History | View | Annotate | Download (4.54 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | *
|
||
4 | * Copyright (C) 2007-2013 gvSIG Association.
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 3
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | * For any additional information, do not hesitate to contact us
|
||
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | */
|
||
24 | 40435 | jjdelcerro | package org.gvsig.fmap.mapcontext.rendering.legend.styling; |
25 | |||
26 | import java.awt.Graphics2D; |
||
27 | import java.awt.Rectangle; |
||
28 | |||
29 | import org.gvsig.fmap.geom.Geometry; |
||
30 | import org.gvsig.fmap.geom.exception.CreateGeometryException; |
||
31 | import org.gvsig.fmap.mapcontext.ViewPort; |
||
32 | import org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport; |
||
33 | import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol; |
||
34 | import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolDrawingException; |
||
35 | import org.gvsig.fmap.mapcontext.rendering.symbols.styles.ILabelStyle; |
||
36 | import org.gvsig.tools.persistence.Persistent; |
||
37 | |||
38 | public interface ILabelClass extends Persistent, CartographicSupport{ |
||
39 | |||
40 | /**
|
||
41 | * Returns true if the label will be showed in the map
|
||
42 | *
|
||
43 | * @return isVisible boolean
|
||
44 | */
|
||
45 | boolean isVisible();
|
||
46 | |||
47 | /**
|
||
48 | * Sets the visibility of the label in the map.
|
||
49 | *
|
||
50 | * @param isVisible boolean
|
||
51 | */
|
||
52 | void setVisible(boolean isVisible); |
||
53 | |||
54 | /**
|
||
55 | * Returns the expression that defines the text which will be showed in
|
||
56 | * the label
|
||
57 | *
|
||
58 | * @return labelExpression String
|
||
59 | */
|
||
60 | String getLabelExpression();
|
||
61 | |||
62 | /**
|
||
63 | * Stablishes the expresion that, when it is evaluated, returns the text
|
||
64 | * which will be showed by the label.
|
||
65 | *
|
||
66 | * @param labelExpression String
|
||
67 | */
|
||
68 | void setLabelExpression(String labelExpression); |
||
69 | |||
70 | /**
|
||
71 | * Returns the text symbol that is being used for the text(the font,
|
||
72 | * size,style,aligment)
|
||
73 | *
|
||
74 | * @return label ITextSymbol
|
||
75 | */
|
||
76 | ITextSymbol getTextSymbol(); |
||
77 | |||
78 | /**
|
||
79 | * Stablishes the text symbol that is going to be used for the text(the
|
||
80 | * font,size,style,aligment)
|
||
81 | *
|
||
82 | * @param textSymbol ITextSymbol
|
||
83 | */
|
||
84 | void setTextSymbol(ITextSymbol textSymbol);
|
||
85 | |||
86 | /**
|
||
87 | * Stablishes the style for the label.
|
||
88 | *
|
||
89 | * @param labelStyle ILabelStyle
|
||
90 | */
|
||
91 | void setLabelStyle(ILabelStyle labelStyle);
|
||
92 | |||
93 | /**
|
||
94 | * Returns the style of the label
|
||
95 | *
|
||
96 | */
|
||
97 | ILabelStyle getLabelStyle(); |
||
98 | |||
99 | /**
|
||
100 | * Returns the name of the label
|
||
101 | *
|
||
102 | */
|
||
103 | String getName();
|
||
104 | |||
105 | /**
|
||
106 | * Stablishes the name of the label
|
||
107 | * @param name
|
||
108 | */
|
||
109 | void setName(String name); |
||
110 | |||
111 | String toString();
|
||
112 | |||
113 | /**
|
||
114 | * Sets the text for the label
|
||
115 | *
|
||
116 | * @param texts String[]
|
||
117 | */
|
||
118 | void setTexts(String[] texts); |
||
119 | |||
120 | /**
|
||
121 | * Return the text for the label
|
||
122 | *
|
||
123 | * @param texts String[]
|
||
124 | */
|
||
125 | String[] getTexts(); |
||
126 | |||
127 | /**
|
||
128 | * <p>
|
||
129 | * LabelLocationMetrics, contains the anchor point, rotation, and some
|
||
130 | * other geometric calculations computed by the PlacementManager.
|
||
131 | * </p>
|
||
132 | *
|
||
133 | * <p>
|
||
134 | * The shp argument is passed as an accessory for subclasses of this
|
||
135 | * class in case they need futher geometric calculations
|
||
136 | * </p>
|
||
137 | * @param graphics, graphics to use to paint the label.
|
||
138 | * @param llm, concrete settings of the placement of this layer
|
||
139 | * @param shp, the Shape over whose the label is painted
|
||
140 | */
|
||
141 | void draw(Graphics2D graphics, ILabelLocationMetrics llm, Geometry geom); |
||
142 | |||
143 | /**
|
||
144 | * Useful to render a Label with size inside little rectangles.
|
||
145 | *
|
||
146 | * @param graphics Graphics2D
|
||
147 | * @param bounds Rectangle
|
||
148 | * @throws SymbolDrawingException
|
||
149 | */
|
||
150 | void drawInsideRectangle(Graphics2D graphics, Rectangle bounds) |
||
151 | throws SymbolDrawingException;
|
||
152 | |||
153 | int getPriority();
|
||
154 | |||
155 | void setPriority(int priority); |
||
156 | |||
157 | Geometry getShape(ILabelLocationMetrics llm) throws CreateGeometryException;
|
||
158 | |||
159 | String getClassName();
|
||
160 | |||
161 | double getCartographicSize(ViewPort viewPort, double dpi, Geometry geom); |
||
162 | |||
163 | int getReferenceSystem();
|
||
164 | |||
165 | int getUnit();
|
||
166 | |||
167 | void setCartographicSize(double cartographicSize, Geometry geom); |
||
168 | |||
169 | void setReferenceSystem(int referenceSystem); |
||
170 | |||
171 | void setUnit(int unitIndex); |
||
172 | |||
173 | double toCartographicSize(ViewPort viewPort, double dpi, Geometry geom); |
||
174 | |||
175 | Rectangle getBounds();
|
||
176 | |||
177 | String getSQLQuery();
|
||
178 | |||
179 | void setSQLQuery(String sqlQuery); |
||
180 | |||
181 | } |