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