X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTPasswordField.java;h=6b00f4a6653d3ba5bef763b1b66b10ba6c56d265;hb=382bc294dd88b71639fdd6c73216d2519635a080;hp=696598b94339ac77935b6ff5a51f018244ca6c25;hpb=615a0d99fd0aa4437116dd083147f9150d5e6527;p=fanfix.git diff --git a/src/jexer/TPasswordField.java b/src/jexer/TPasswordField.java index 696598b..6b00f4a 100644 --- a/src/jexer/TPasswordField.java +++ b/src/jexer/TPasswordField.java @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (C) 2017 Kevin Lamonte + * Copyright (C) 2019 Kevin Lamonte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,7 +32,8 @@ import jexer.bits.CellAttributes; import jexer.bits.GraphicsChars; /** - * TField implements an editable text field. + * TPasswordField implements an editable text field that displays + * stars/asterisks when it is not active. */ public class TPasswordField extends TField { @@ -115,13 +116,11 @@ public class TPasswordField extends TField { end = text.length(); } - getScreen().hLineXY(0, 0, getWidth(), GraphicsChars.HATCH, fieldColor); + hLineXY(0, 0, getWidth(), backgroundChar, fieldColor); if (showStars) { - getScreen().hLineXY(0, 0, getWidth() - 2, '*', - fieldColor); + hLineXY(0, 0, getWidth() - 2, '*', fieldColor); } else { - getScreen().putStringXY(0, 0, text.substring(windowStart, end), - fieldColor); + putStringXY(0, 0, text.substring(windowStart, end), fieldColor); } // Fix the cursor, it will be rendered by TApplication.drawAll().