root / tags / v2_0_0_Build_2058 / libraries / libFMap_mapcontext / src / org / gvsig / fmap / mapcontext / rendering / symbols / ITextSymbol.java @ 39247
History | View | Annotate | Download (1.93 KB)
1 | 21200 | vcaballero | package org.gvsig.fmap.mapcontext.rendering.symbols; |
---|---|---|---|
2 | |||
3 | import java.awt.Color; |
||
4 | import java.awt.Font; |
||
5 | import java.awt.Rectangle; |
||
6 | |||
7 | import org.gvsig.fmap.geom.Geometry; |
||
8 | 27024 | jpiera | import org.gvsig.fmap.geom.primitive.Point; |
9 | 21200 | vcaballero | |
10 | |||
11 | /**
|
||
12 | *
|
||
13 | * ITextSymbol.java<br>
|
||
14 | * Represents an ISymbol that draws a text.
|
||
15 | *
|
||
16 | * @author jaume dominguez faus - jaume.dominguez@iver.es Dec 11, 2007
|
||
17 | *
|
||
18 | */
|
||
19 | public interface ITextSymbol extends ISymbol { |
||
20 | 30011 | cordinyana | |
21 | public static final String SYMBOL_NAME = "text"; |
||
22 | |||
23 | 21298 | vcaballero | public final static int SYMBOL_STYLE_ALIGNMENT_LEFT = 94; |
24 | public final static int SYMBOL_STYLE_ALIGNMENT_RIGHT = 95; |
||
25 | public final static int SYMBOL_STYLE_ALIGNMENT_CENTERED = 96; |
||
26 | public final static int SYMBOL_STYLE_ALIGNMENT_JUSTIFY = 97; |
||
27 | 21200 | vcaballero | /**
|
28 | * Establishes the font that will be used to render this ITextSymbol.
|
||
29 | * @param font
|
||
30 | */
|
||
31 | public abstract void setFont(Font font); |
||
32 | |||
33 | /**
|
||
34 | * Returns the currently set font.
|
||
35 | * @return Font
|
||
36 | */
|
||
37 | public abstract Font getFont(); |
||
38 | |||
39 | /**
|
||
40 | * Returns the currently color set to be applied to the text
|
||
41 | * @return Color
|
||
42 | */
|
||
43 | public abstract Color getTextColor(); |
||
44 | |||
45 | /**
|
||
46 | * Sets the color of the text
|
||
47 | * @param color
|
||
48 | */
|
||
49 | public abstract void setTextColor(Color color); |
||
50 | |||
51 | /**
|
||
52 | * Returns the text contained by this symbol
|
||
53 | * @return
|
||
54 | * @deprecated ?do i need it?
|
||
55 | */
|
||
56 | public abstract String getText(); |
||
57 | |||
58 | /**
|
||
59 | * Sets the text to be rendered by this symbol
|
||
60 | * @param text, a String
|
||
61 | */
|
||
62 | public abstract void setText(String text); |
||
63 | |||
64 | /**
|
||
65 | * Sets the font size currently set to this symbol
|
||
66 | * @param d
|
||
67 | */
|
||
68 | public abstract void setFontSize(double d); |
||
69 | |||
70 | /**
|
||
71 | 22782 | vcaballero | * Computes a Geometry wrapping the text to be applied
|
72 | 21200 | vcaballero | * @param p target location
|
73 | * @return
|
||
74 | */
|
||
75 | 27024 | jpiera | public abstract Geometry getTextWrappingShape(Point p); |
76 | 21200 | vcaballero | |
77 | public abstract Rectangle getBounds(); |
||
78 | 22751 | vcaballero | |
79 | public abstract void setAutoresizeEnabled(boolean autoresizeFlag); |
||
80 | |||
81 | public abstract boolean isAutoresizeEnabled(); |
||
82 | 21200 | vcaballero | } |