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 / ITextSymbol.java @ 47790
History | View | Annotate | Download (3.15 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.symbols; |
25 | |||
26 | import java.awt.Color; |
||
27 | import java.awt.Font; |
||
28 | import java.awt.Rectangle; |
||
29 | |||
30 | import org.gvsig.fmap.geom.Geometry; |
||
31 | import org.gvsig.fmap.geom.primitive.Point; |
||
32 | |||
33 | |||
34 | /**
|
||
35 | *
|
||
36 | * ITextSymbol.java<br>
|
||
37 | * Represents an ISymbol that draws a text.
|
||
38 | *
|
||
39 | * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 11, 2007
|
||
40 | *
|
||
41 | */
|
||
42 | public interface ITextSymbol extends ISymbol { |
||
43 | |||
44 | public static final String SYMBOL_NAME = "text"; |
||
45 | |||
46 | public final static int SYMBOL_STYLE_ALIGNMENT_LEFT = 94; |
||
47 | public final static int SYMBOL_STYLE_ALIGNMENT_RIGHT = 95; |
||
48 | public final static int SYMBOL_STYLE_ALIGNMENT_CENTERED = 96; |
||
49 | public final static int SYMBOL_STYLE_ALIGNMENT_JUSTIFY = 97; |
||
50 | /**
|
||
51 | * Establishes the font that will be used to render this ITextSymbol.
|
||
52 | * @param font
|
||
53 | */
|
||
54 | public abstract void setFont(Font font); |
||
55 | |||
56 | /**
|
||
57 | * Returns the currently set font.
|
||
58 | * @return Font
|
||
59 | */
|
||
60 | public abstract Font getFont(); |
||
61 | |||
62 | /**
|
||
63 | * Returns the currently color set to be applied to the text
|
||
64 | * @return Color
|
||
65 | */
|
||
66 | public abstract Color getTextColor(); |
||
67 | |||
68 | /**
|
||
69 | * Sets the color of the text
|
||
70 | * @param color
|
||
71 | */
|
||
72 | public abstract void setTextColor(Color color); |
||
73 | |||
74 | /**
|
||
75 | * Returns the text contained by this symbol
|
||
76 | * @return
|
||
77 | * @deprecated ?do i need it?
|
||
78 | */
|
||
79 | public abstract String getText(); |
||
80 | |||
81 | /**
|
||
82 | * Sets the text to be rendered by this symbol
|
||
83 | * @param text, a String
|
||
84 | */
|
||
85 | public abstract void setText(String text); |
||
86 | |||
87 | /**
|
||
88 | * Sets the font size currently set to this symbol
|
||
89 | * @param d
|
||
90 | */
|
||
91 | public abstract void setFontSize(double d); |
||
92 | |||
93 | /**
|
||
94 | * Computes a Geometry wrapping the text to be applied
|
||
95 | * @param p target location
|
||
96 | * @return
|
||
97 | */
|
||
98 | public abstract Geometry getTextWrappingShape(Point p); |
||
99 | |||
100 | public abstract Rectangle getBounds(); |
||
101 | |||
102 | public abstract void setAutoresizeEnabled(boolean autoresizeFlag); |
||
103 | |||
104 | public abstract boolean isAutoresizeEnabled(); |
||
105 | 40679 | jldominguez | |
106 | // halo API
|
||
107 | public Color getHaloColor(); |
||
108 | public void setHaloColor(Color haloColor); |
||
109 | |||
110 | public float getHaloWidth(); |
||
111 | public void setHaloWidth(float haloWidth); |
||
112 | |||
113 | public boolean isDrawWithHalo(); |
||
114 | public void setDrawWithHalo(boolean drawWithHalo); |
||
115 | |||
116 | 40435 | jjdelcerro | } |