76 |
* If false, the text will be comfortably within the box. |
* If false, the text will be comfortably within the box. |
77 |
*/ |
*/ |
78 |
public TextVob(TextStyle style, String text, boolean baselined) { |
public TextVob(TextStyle style, String text, boolean baselined) { |
79 |
this(style, text, baselined, (String)null); |
this(style, text, baselined, (Color)null); |
80 |
} |
} |
81 |
|
|
82 |
/** Same as another constructor but in GL side you can give the color |
/** Same as another constructor but in GL side you can give the color |
83 |
* with string like "Color 1 0.5 0.5" |
* with string like "Color 1 0.5 0.5" |
84 |
* @param color OpenGL Color used to draw the text. |
* @param color OpenGL Color used to draw the text. |
87 |
super(); |
super(); |
88 |
this.style = style; |
this.style = style; |
89 |
this.baselined = baselined; |
this.baselined = baselined; |
90 |
this.text = text; |
this.text = (text != null ? text: ""); |
|
|
|
91 |
this.color = color; |
this.color = color; |
92 |
if (color != null) |
if (color != null) |
93 |
this.colorString ="Color "+ ColorUtil.colorGLString(color); |
this.colorString ="Color "+ ColorUtil.colorGLString(color); |
94 |
} |
} |
95 |
|
|
96 |
public TextVob(TextStyle style, String text, boolean baselined, String color) { |
|
|
super(); |
|
|
this.style = style; |
|
|
this.baselined = baselined; |
|
|
this.text = text; |
|
|
|
|
|
this.colorString = color; |
|
|
} |
|
|
|
|
|
|
|
97 |
/** Create a non-baselined text vob. |
/** Create a non-baselined text vob. |
98 |
*/ |
*/ |
99 |
public TextVob(TextStyle style, String text) { |
public TextVob(TextStyle style, String text) { |
101 |
} |
} |
102 |
|
|
103 |
public TextVob(TextStyle style, String text, boolean baselined, Object key) { |
public TextVob(TextStyle style, String text, boolean baselined, Object key) { |
104 |
this(style, text, baselined, (String)null); |
this(style, text, baselined, (Color)null); |
105 |
this.key = key; |
this.key = key; |
106 |
} |
} |
107 |
public TextVob(TextStyle style, String text, boolean baselined, Object key, Color color) { |
public TextVob(TextStyle style, String text, boolean baselined, Object key, Color color) { |
109 |
this.color = color; |
this.color = color; |
110 |
this.key = key; |
this.key = key; |
111 |
} |
} |
|
public TextVob(TextStyle style, String text, boolean baselined, Object key, String color) { |
|
|
this(style, text, baselined, color); |
|
|
this.key = key; |
|
|
} |
|
112 |
|
|
113 |
public TextStyle getTextStyle() { return style; } |
public TextStyle getTextStyle() { return style; } |
114 |
|
|