Revision 10977 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/ITextSymbol.java
ITextSymbol.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.awt.Color; |
4 | 4 |
import java.awt.Font; |
5 |
import java.awt.Graphics2D; |
|
5 | 6 |
|
7 |
import com.iver.cit.gvsig.fmap.core.FShape; |
|
8 |
/** |
|
9 |
* Represents a ISymbol that draws a text. |
|
10 |
* @author jaume |
|
11 |
* |
|
12 |
*/ |
|
6 | 13 |
public interface ITextSymbol extends ISymbol { |
7 |
|
|
14 |
/** |
|
15 |
* Establishes the font that will be used to render this ITextSymbol. |
|
16 |
* @param font |
|
17 |
*/ |
|
8 | 18 |
public abstract void setFont(Font font); |
9 | 19 |
|
20 |
/** |
|
21 |
* Returns the currently set font. |
|
22 |
* @return Font |
|
23 |
*/ |
|
10 | 24 |
public abstract Font getFont(); |
11 | 25 |
|
26 |
/** |
|
27 |
* Returns the currently color set to be applied to the text |
|
28 |
* @return Color |
|
29 |
*/ |
|
12 | 30 |
public abstract Color getTextColor(); |
13 | 31 |
|
32 |
/** |
|
33 |
* Sets the color of the text |
|
34 |
* @param color |
|
35 |
*/ |
|
14 | 36 |
public abstract void setTextColor(Color color); |
15 | 37 |
|
38 |
/** |
|
39 |
* Returns the text contained by this symbol |
|
40 |
* @return |
|
41 |
* @deprecated ?do i need it? |
|
42 |
*/ |
|
16 | 43 |
public abstract String getText(); |
17 | 44 |
|
45 |
/** |
|
46 |
* Sets the text to be rendered by this symbol |
|
47 |
* @param text, a String |
|
48 |
*/ |
|
18 | 49 |
public abstract void setText(String text); |
19 | 50 |
|
51 |
/** |
|
52 |
* Sets the font size currently set to this symbol |
|
53 |
* @param d |
|
54 |
*/ |
|
20 | 55 |
public abstract void setFontSize(double d); |
21 | 56 |
|
57 |
/** |
|
58 |
* Computes a FShape wrapping the text to be applied |
|
59 |
* @param g |
|
60 |
* @param targetSymbolShape |
|
61 |
* @return |
|
62 |
*/ |
|
63 |
public abstract FShape getTextShape(Graphics2D g, FShape targetSymbolShape); |
|
64 |
|
|
22 | 65 |
} |
Also available in: Unified diff