Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_mapcontext / src / org / gvsig / fmap / mapcontext / rendering / symbols / ITextSymbol.java @ 21298

History | View | Annotate | Download (1.76 KB)

1
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
import org.gvsig.fmap.geom.primitive.Point2D;
9

    
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
        public final static int SYMBOL_STYLE_ALIGNMENT_LEFT = 94;
21
        public final static int SYMBOL_STYLE_ALIGNMENT_RIGHT = 95;
22
        public final static int SYMBOL_STYLE_ALIGNMENT_CENTERED = 96;
23
        public final static int SYMBOL_STYLE_ALIGNMENT_JUSTIFY = 97;
24
        /**
25
         * Establishes the font that will be used to render this ITextSymbol.
26
         * @param font
27
         */
28
        public abstract void setFont(Font font);
29

    
30
        /**
31
         * Returns the currently set font.
32
         * @return Font
33
         */
34
        public abstract Font getFont();
35

    
36
        /**
37
         * Returns the currently color set to be applied to the text
38
         * @return Color
39
         */
40
        public abstract Color getTextColor();
41

    
42
        /**
43
         * Sets the color of the text
44
         * @param color
45
         */
46
        public abstract void setTextColor(Color color);
47

    
48
        /**
49
         * Returns the text contained by this symbol
50
         * @return
51
         * @deprecated ?do i need it?
52
         */
53
        public abstract String getText();
54

    
55
        /**
56
         * Sets the text to be rendered by this symbol
57
         * @param text, a String
58
         */
59
        public abstract void setText(String text);
60

    
61
        /**
62
         * Sets the font size currently set to this symbol
63
         * @param d
64
         */
65
        public abstract void setFontSize(double d);
66

    
67
        /**
68
         * Computes a FShape wrapping the text to be applied
69
         * @param p target location
70
         * @return
71
         */
72
        public abstract Geometry getTextWrappingShape(Point2D p);
73

    
74
        public abstract Rectangle getBounds();
75
}