2 * Jexer - Java Text User Interface
4 * License: LGPLv3 or later
6 * This module is licensed under the GNU Lesser General Public License
7 * Version 3. Please see the file "COPYING" in this directory for more
8 * information about the GNU Lesser General Public License Version 3.
10 * Copyright (C) 2015 Kevin Lamonte
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 3 of
15 * the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this program; if not, see
24 * http://www.gnu.org/licenses/, or write to the Free Software
25 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
28 * @author Kevin Lamonte [kevin.lamonte@gmail.com]
33 import jexer
.bits
.CellAttributes
;
34 import jexer
.bits
.GraphicsChars
;
37 * TMenuSeparator is a special case menu item.
39 public class TMenuSeparator
extends TMenuItem
{
42 * Package private constructor.
44 * @param parent parent widget
45 * @param x column relative to parent
46 * @param y row relative to parent
48 TMenuSeparator(final TMenu parent
, final int x
, final int y
) {
49 super(parent
, TMenu
.MID_UNUSED
, x
, y
, "");
52 setWidth(parent
.getWidth() - 2);
56 * Draw a menu separator.
60 CellAttributes background
= getTheme().getColor("tmenu");
62 getScreen().putCharXY(0, 0, GraphicsChars
.CP437
[0xC3], background
);
63 getScreen().putCharXY(getWidth() - 1, 0, GraphicsChars
.CP437
[0xB4],
65 getScreen().hLineXY(1, 0, getWidth() - 2, GraphicsChars
.SINGLE_BAR
,