root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / core / symbols / ITextSymbol.java @ 10977
History | View | Annotate | Download (1.31 KB)
1 |
package com.iver.cit.gvsig.fmap.core.symbols; |
---|---|
2 |
|
3 |
import java.awt.Color; |
4 |
import java.awt.Font; |
5 |
import java.awt.Graphics2D; |
6 |
|
7 |
import com.iver.cit.gvsig.fmap.core.FShape; |
8 |
/**
|
9 |
* Represents a ISymbol that draws a text.
|
10 |
* @author jaume
|
11 |
*
|
12 |
*/
|
13 |
public interface ITextSymbol extends ISymbol { |
14 |
/**
|
15 |
* Establishes the font that will be used to render this ITextSymbol.
|
16 |
* @param font
|
17 |
*/
|
18 |
public abstract void setFont(Font font); |
19 |
|
20 |
/**
|
21 |
* Returns the currently set font.
|
22 |
* @return Font
|
23 |
*/
|
24 |
public abstract Font getFont(); |
25 |
|
26 |
/**
|
27 |
* Returns the currently color set to be applied to the text
|
28 |
* @return Color
|
29 |
*/
|
30 |
public abstract Color getTextColor(); |
31 |
|
32 |
/**
|
33 |
* Sets the color of the text
|
34 |
* @param color
|
35 |
*/
|
36 |
public abstract void setTextColor(Color color); |
37 |
|
38 |
/**
|
39 |
* Returns the text contained by this symbol
|
40 |
* @return
|
41 |
* @deprecated ?do i need it?
|
42 |
*/
|
43 |
public abstract String getText(); |
44 |
|
45 |
/**
|
46 |
* Sets the text to be rendered by this symbol
|
47 |
* @param text, a String
|
48 |
*/
|
49 |
public abstract void setText(String text); |
50 |
|
51 |
/**
|
52 |
* Sets the font size currently set to this symbol
|
53 |
* @param d
|
54 |
*/
|
55 |
public abstract void setFontSize(double d); |
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 |
|
65 |
} |