From: Kevin Lamonte Date: Thu, 21 Feb 2019 20:40:56 +0000 (-0600) Subject: misc cleanup X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=c88c4ced6e9392a53030a1c680fe114931a1a928;p=fanfix-jexer.git misc cleanup --- diff --git a/src/jexer/TEditorWindow.java b/src/jexer/TEditorWindow.java index 4951311..b64f0c7 100644 --- a/src/jexer/TEditorWindow.java +++ b/src/jexer/TEditorWindow.java @@ -386,7 +386,7 @@ public class TEditorWindow extends TScrollableWindow { * @param mouse a mouse-based event * @return whether or not the mouse is on the editor */ - private final boolean mouseOnEditor(final TMouseEvent mouse) { + private boolean mouseOnEditor(final TMouseEvent mouse) { if ((mouse.getAbsoluteX() >= getAbsoluteX() + 1) && (mouse.getAbsoluteX() < getAbsoluteX() + getWidth() - 1) && (mouse.getAbsoluteY() >= getAbsoluteY() + 1) diff --git a/src/jexer/TList.java b/src/jexer/TList.java index 0ed7a07..3aed01e 100644 --- a/src/jexer/TList.java +++ b/src/jexer/TList.java @@ -29,7 +29,6 @@ package jexer; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import jexer.bits.CellAttributes; diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index a243a43..897dca7 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -854,7 +854,7 @@ public class TTerminalWindow extends TScrollableWindow * @param mouse a mouse-based event * @return whether or not the mouse is on the emulator */ - private final boolean mouseOnEmulator(final TMouseEvent mouse) { + private boolean mouseOnEmulator(final TMouseEvent mouse) { synchronized (emulator) { if (!emulator.isReading()) { diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index 1694549..3f860d6 100644 --- a/src/jexer/TWindow.java +++ b/src/jexer/TWindow.java @@ -32,7 +32,6 @@ import java.util.HashSet; import java.util.Set; import jexer.backend.Screen; -import jexer.bits.Cell; import jexer.bits.CellAttributes; import jexer.bits.GraphicsChars; import jexer.event.TCommandEvent; @@ -1195,6 +1194,7 @@ public class TWindow extends TWidget { * Close window. Note that windows without a close box can still be * closed by calling the close() method. */ + @Override public void close() { application.closeWindow(this); } diff --git a/src/jexer/backend/ECMA48Terminal.java b/src/jexer/backend/ECMA48Terminal.java index 0cbd4f0..518024c 100644 --- a/src/jexer/backend/ECMA48Terminal.java +++ b/src/jexer/backend/ECMA48Terminal.java @@ -45,7 +45,6 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.LinkedList; -import java.util.Map; import jexer.TImage; import jexer.bits.Cell; diff --git a/src/jexer/backend/TWindowBackend.java b/src/jexer/backend/TWindowBackend.java index a34ba78..ed701ad 100644 --- a/src/jexer/backend/TWindowBackend.java +++ b/src/jexer/backend/TWindowBackend.java @@ -31,7 +31,6 @@ package jexer.backend; import java.util.LinkedList; import java.util.List; -import jexer.bits.CellAttributes; import jexer.event.TInputEvent; import jexer.event.TKeypressEvent; import jexer.event.TMouseEvent; diff --git a/src/jexer/tterminal/ECMA48.java b/src/jexer/tterminal/ECMA48.java index 00aa05b..a4197fb 100644 --- a/src/jexer/tterminal/ECMA48.java +++ b/src/jexer/tterminal/ECMA48.java @@ -4095,12 +4095,12 @@ public class ECMA48 implements Runnable { if (collectBuffer.charAt(0) == '>') { extendedFlag = 1; if (collectBuffer.length() >= 2) { - i = Integer.parseInt(args.toString()); + i = Integer.parseInt(args); } } else if (collectBuffer.charAt(0) == '=') { extendedFlag = 2; if (collectBuffer.length() >= 2) { - i = Integer.parseInt(args.toString()); + i = Integer.parseInt(args); } } else { // Unknown code, bail out @@ -4542,7 +4542,7 @@ public class ECMA48 implements Runnable { args = collectBuffer.substring(0, collectBuffer.length() - 2); } - String [] p = args.toString().split(";"); + String [] p = args.split(";"); if (p.length > 0) { if ((p[0].equals("0")) || (p[0].equals("2"))) { if (p.length > 1) { diff --git a/src/jexer/ttree/TDirectoryTreeItem.java b/src/jexer/ttree/TDirectoryTreeItem.java index 5f265ee..9bdec01 100644 --- a/src/jexer/ttree/TDirectoryTreeItem.java +++ b/src/jexer/ttree/TDirectoryTreeItem.java @@ -35,7 +35,6 @@ import java.util.List; import java.util.LinkedList; import jexer.TWidget; -import jexer.ttree.TTreeViewWidget; /** * TDirectoryTreeItem is a single item in a disk directory tree view.