X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTLabel.java;h=2eeea915793e0568db485f82cccc89efb9f2ae8a;hb=d6ee0801333ff93dffd851f4c1a44519c96c371d;hp=d6b817a845b651e1fcccef01f5e863d0bb6b86eb;hpb=2ce6dab2bbd951e6d0f09f94759efda5ee4b65ac;p=fanfix.git diff --git a/src/jexer/TLabel.java b/src/jexer/TLabel.java index d6b817a..2eeea91 100644 --- a/src/jexer/TLabel.java +++ b/src/jexer/TLabel.java @@ -3,7 +3,7 @@ * * 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"), @@ -35,34 +35,24 @@ import jexer.bits.CellAttributes; */ 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. * @@ -96,6 +86,10 @@ public final class TLabel extends TWidget { this.colorKey = colorKey; } + // ------------------------------------------------------------------------ + // TWidget ---------------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * Draw a static label. */ @@ -110,4 +104,26 @@ public final class TLabel extends TWidget { 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; + } + }