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 / symbols / styles / ILabelStyle.java @ 40559
History | View | Annotate | Download (4.07 KB)
1 |
/**
|
---|---|
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 |
/* CVS MESSAGES:
|
25 |
*
|
26 |
* $Id: ILabelStyle.java 20989 2008-05-28 11:05:57Z jmvivo $
|
27 |
* $Log$
|
28 |
* Revision 1.10 2007-08-16 06:55:30 jvidal
|
29 |
* javadoc updated
|
30 |
*
|
31 |
* Revision 1.9 2007/08/13 11:36:30 jvidal
|
32 |
* javadoc
|
33 |
*
|
34 |
* Revision 1.8 2007/05/08 08:47:39 jaume
|
35 |
* *** empty log message ***
|
36 |
*
|
37 |
* Revision 1.7 2007/04/05 16:07:14 jaume
|
38 |
* Styled labeling stuff
|
39 |
*
|
40 |
* Revision 1.6 2007/04/04 15:42:03 jaume
|
41 |
* *** empty log message ***
|
42 |
*
|
43 |
* Revision 1.5 2007/04/04 15:41:05 jaume
|
44 |
* *** empty log message ***
|
45 |
*
|
46 |
* Revision 1.4 2007/04/02 16:34:56 jaume
|
47 |
* Styled labeling (start commiting)
|
48 |
*
|
49 |
* Revision 1.3 2007/03/29 16:02:01 jaume
|
50 |
* *** empty log message ***
|
51 |
*
|
52 |
* Revision 1.2 2007/03/09 11:20:56 jaume
|
53 |
* Advanced symbology (start committing)
|
54 |
*
|
55 |
* Revision 1.1.2.1 2007/02/15 16:23:44 jaume
|
56 |
* *** empty log message ***
|
57 |
*
|
58 |
* Revision 1.1.2.1 2007/02/09 07:47:05 jaume
|
59 |
* Isymbol moved
|
60 |
*
|
61 |
*
|
62 |
*/
|
63 |
package org.gvsig.fmap.mapcontext.rendering.symbols.styles; |
64 |
|
65 |
import java.awt.Dimension; |
66 |
import java.awt.geom.Point2D; |
67 |
import java.awt.geom.Rectangle2D; |
68 |
|
69 |
|
70 |
/**
|
71 |
* Defines the style that a Label symbol can contain which typically define
|
72 |
* a background of the label as an Image, the texts that the label holds
|
73 |
* and their position within the label in rendering time.
|
74 |
*
|
75 |
* @author jaume dominguez faus - jaume.dominguez@iver.es
|
76 |
*
|
77 |
*/
|
78 |
public interface ILabelStyle extends IStyle { |
79 |
/**
|
80 |
* @return int, the amount of fields this style allows
|
81 |
*/
|
82 |
public int getFieldCount(); |
83 |
|
84 |
/**
|
85 |
* Sets the texts that will appear in the label.
|
86 |
* @param texts
|
87 |
*/
|
88 |
public void setTextFields(String[] texts); |
89 |
|
90 |
|
91 |
/**
|
92 |
* Returns an array of rectangles defining the text boxes where text is
|
93 |
* placed.
|
94 |
* @return
|
95 |
*/
|
96 |
public Rectangle2D[] getTextBounds(); |
97 |
|
98 |
public Dimension getSize(); |
99 |
|
100 |
/**
|
101 |
* Returns the position of the point labeled by this label in percent units relative
|
102 |
* to the label bounds. It determines the offset to be applied to the label to be
|
103 |
* placed and allows the user to use custom styles.
|
104 |
*/
|
105 |
public Point2D getMarkerPoint(); |
106 |
|
107 |
/**
|
108 |
* Sets the position of the point labeled by this in percent units relative to the
|
109 |
* label bounds
|
110 |
* @param p
|
111 |
* @throws IllegalArgumentException if the point coordinates are >0.0 or <1.0
|
112 |
*/
|
113 |
public void setMarkerPoint(Point2D p) throws IllegalArgumentException; |
114 |
|
115 |
/**
|
116 |
* Sets a TextFieldArea using its index. With this method the user can
|
117 |
* modify the size of the rectangle for the TextFieldArea
|
118 |
* @param index
|
119 |
* @param rect
|
120 |
*/
|
121 |
public void setTextFieldArea(int index, Rectangle2D rect); |
122 |
|
123 |
/**
|
124 |
* Adds a new TextFieldArea with an specific size which is defined as a rectangle.
|
125 |
* @param index,int
|
126 |
* @param rect,Rectangle2D
|
127 |
*/
|
128 |
public void addTextFieldArea(Rectangle2D rect); |
129 |
|
130 |
/**
|
131 |
* Delete the TextFieldArea specified by its index.
|
132 |
* @param index,int
|
133 |
*/
|
134 |
public void deleteTextFieldArea(int index); |
135 |
|
136 |
/**
|
137 |
* Sets the size for a laber and stablishes an unit scale factor to not change
|
138 |
* too much its content
|
139 |
* @param width
|
140 |
* @param height
|
141 |
*/
|
142 |
public void setSize(double width, double height); |
143 |
|
144 |
} |