git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge
[fanfix.git]
/
src
/
jexer
/
TLabel.java
diff --git
a/src/jexer/TLabel.java
b/src/jexer/TLabel.java
index 15d6376d5313adff2010b8e5fd559f8a2b15fdd0..e57ad9b1de1dbe9e94844ca3e2a6ff85dd5de618 100644
(file)
--- a/
src/jexer/TLabel.java
+++ b/
src/jexer/TLabel.java
@@
-42,6
+42,24
@@
public final class TLabel extends TWidget {
*/
private String text = "";
*/
private String text = "";
+ /**
+ * Get label text.
+ *
+ * @return label text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * Set label text.
+ *
+ * @param text new label text
+ */
+ public void setText(final String text) {
+ this.text = text;
+ }
+
/**
* Label color.
*/
/**
* Label color.
*/
@@
-74,13
+92,9
@@
public final class TLabel extends TWidget {
final int y, final String colorKey) {
// Set parent and window
final int y, final String colorKey) {
// Set parent and window
- super(parent, false);
+ super(parent, false
, x, y, text.length(), 1
);
this.text = text;
this.text = text;
- setX(x);
- setY(y);
- setHeight(1);
- setWidth(text.length());
this.colorKey = colorKey;
}
this.colorKey = colorKey;
}