*
* The MIT License (MIT)
*
- * Copyright (C) 2016 Kevin Lamonte
+ * Copyright (C) 2017 Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*/
public final class TLabel extends TWidget {
+ // ------------------------------------------------------------------------
+ // Variables --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Label text.
*/
private String label = "";
- /**
- * Get label text.
- *
- * @return label text
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Set label text.
- *
- * @param label new label text
- */
- public void setLabel(final String label) {
- this.label = label;
- }
-
/**
* Label color.
*/
private String colorKey;
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Public constructor, using the default "tlabel" for colorKey.
*
this.colorKey = colorKey;
}
+ // ------------------------------------------------------------------------
+ // TWidget ----------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Draw a static label.
*/
getScreen().putStringXY(0, 0, label, color);
}
+ // ------------------------------------------------------------------------
+ // TLabel -----------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Get label text.
+ *
+ * @return label text
+ */
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * Set label text.
+ *
+ * @param label new label text
+ */
+ public void setLabel(final String label) {
+ this.label = label;
+ }
+
}