X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fmenu%2FTMenuSeparator.java;h=0528e5d73207cd8d8cd5abcca72c167b6c757149;hb=505be508ae7d3fb48122be548b310a238cfb91eb;hp=9a9fcfc81a0e39143d64481aeba57b3c0d9cc009;hpb=a2018e9964f6c58742cd1e6dd0a0c63e244a89d6;p=nikiroo-utils.git diff --git a/src/jexer/menu/TMenuSeparator.java b/src/jexer/menu/TMenuSeparator.java index 9a9fcfc..0528e5d 100644 --- a/src/jexer/menu/TMenuSeparator.java +++ b/src/jexer/menu/TMenuSeparator.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"), @@ -34,7 +34,11 @@ import jexer.bits.GraphicsChars; /** * TMenuSeparator is a special case menu item. */ -public final class TMenuSeparator extends TMenuItem { +public class TMenuSeparator extends TMenuItem { + + // ------------------------------------------------------------------------ + // Constructors ----------------------------------------------------------- + // ------------------------------------------------------------------------ /** * Package private constructor. @@ -50,6 +54,10 @@ public final class TMenuSeparator extends TMenuItem { setWidth(parent.getWidth() - 2); } + // ------------------------------------------------------------------------ + // TMenuItem -------------------------------------------------------------- + // ------------------------------------------------------------------------ + /** * Draw a menu separator. */ @@ -57,11 +65,9 @@ public final class TMenuSeparator extends TMenuItem { public void draw() { CellAttributes background = getTheme().getColor("tmenu"); - getScreen().putCharXY(0, 0, GraphicsChars.CP437[0xC3], background); - getScreen().putCharXY(getWidth() - 1, 0, GraphicsChars.CP437[0xB4], - background); - getScreen().hLineXY(1, 0, getWidth() - 2, GraphicsChars.SINGLE_BAR, - background); + putCharXY(0, 0, GraphicsChars.CP437[0xC3], background); + putCharXY(getWidth() - 1, 0, GraphicsChars.CP437[0xB4], background); + hLineXY(1, 0, getWidth() - 2, GraphicsChars.SINGLE_BAR, background); } }