X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTLabel.java;h=f34a533eb8ffb44c1d2aa9ebefc2a2e925a89a66;hb=9ad2ce4f566e1d811ac0fd205efe8865a77ae1de;hp=1d65976bba16f3947a3c47498cf552dcdda4f849;hpb=9f613a0c54cb97e9305fd87ce8eb2f76ac82804e;p=fanfix.git diff --git a/src/jexer/TLabel.java b/src/jexer/TLabel.java index 1d65976..f34a533 100644 --- a/src/jexer/TLabel.java +++ b/src/jexer/TLabel.java @@ -170,6 +170,17 @@ public class TLabel extends TWidget { // TWidget ---------------------------------------------------------------- // ------------------------------------------------------------------------ + /** + * Override TWidget's height: we can only set height at construction + * time. + * + * @param height new widget height (ignored) + */ + @Override + public void setHeight(final int height) { + // Do nothing + } + /** * Draw a static label. */ @@ -186,8 +197,8 @@ public class TLabel extends TWidget { mnemonicColor.setBackColor(background.getBackColor()); } putStringXY(0, 0, mnemonic.getRawLabel(), color); - if (mnemonic.getShortcutIdx() >= 0) { - putCharXY(mnemonic.getShortcutIdx(), 0, + if (mnemonic.getScreenShortcutIdx() >= 0) { + putCharXY(mnemonic.getScreenShortcutIdx(), 0, mnemonic.getShortcut(), mnemonicColor); } } @@ -246,7 +257,7 @@ public class TLabel extends TWidget { */ public void dispatch() { if (action != null) { - action.DO(); + action.DO(this); } }