git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkstyle sweep
[fanfix.git]
/
src
/
jexer
/
TTreeView.java
diff --git
a/src/jexer/TTreeView.java
b/src/jexer/TTreeView.java
index 7aaee43fa9c08854a7b2057fa1c1d01454834165..aaed4d1351dbddb260064bfc809aeb2d518c6114 100644
(file)
--- a/
src/jexer/TTreeView.java
+++ b/
src/jexer/TTreeView.java
@@
-52,6
+52,8
@@
public class TTreeView extends TWidget {
/**
* Get the horizontal scrollbar. This is used by TTreeItem.draw(), and
* potentially subclasses.
/**
* Get the horizontal scrollbar. This is used by TTreeItem.draw(), and
* potentially subclasses.
+ *
+ * @return the horizontal scrollbar
*/
public final THScroller getHScroller() {
return hScroller;
*/
public final THScroller getHScroller() {
return hScroller;
@@
-94,7
+96,7
@@
public class TTreeView extends TWidget {
* If true, move the window to put the selected item in view. This
* normally only happens once after setting treeRoot.
*/
* If true, move the window to put the selected item in view. This
* normally only happens once after setting treeRoot.
*/
- p
ublic
boolean centerWindow = false;
+ p
rivate
boolean centerWindow = false;
/**
* The action to perform when the user selects an item.
/**
* The action to perform when the user selects an item.
@@
-107,7
+109,9
@@
public class TTreeView extends TWidget {
* @param treeRoot ultimate root of tree
* @param centerWindow if true, move the window to put the root in view
*/
* @param treeRoot ultimate root of tree
* @param centerWindow if true, move the window to put the root in view
*/
- public void setTreeRoot(final TTreeItem treeRoot, final boolean centerWindow) {
+ public void setTreeRoot(final TTreeItem treeRoot,
+ final boolean centerWindow) {
+
this.treeRoot = treeRoot;
this.centerWindow = centerWindow;
}
this.treeRoot = treeRoot;
this.centerWindow = centerWindow;
}
@@
-239,12
+243,12
@@
public class TTreeView extends TWidget {
if (item == selectedItem) {
foundSelectedRow = true;
}
if (item == selectedItem) {
foundSelectedRow = true;
}
- if (
foundSelectedRow == false
) {
+ if (
!foundSelectedRow
) {
selectedRow++;
}
int lineWidth = item.getText().length()
selectedRow++;
}
int lineWidth = item.getText().length()
- + item.getPrefix().length() + 4;
+
+ item.getPrefix().length() + 4;
if (lineWidth > maxLineWidth) {
maxLineWidth = lineWidth;
}
if (lineWidth > maxLineWidth) {
maxLineWidth = lineWidth;
}
@@
-360,7
+364,7
@@
public class TTreeView extends TWidget {
* @param mouse mouse button release event
*/
@Override
* @param mouse mouse button release event
*/
@Override
- public void onMouseUp(TMouseEvent mouse) {
+ public void onMouseUp(
final
TMouseEvent mouse) {
// Pass to children
super.onMouseDown(mouse);
// Pass to children
super.onMouseDown(mouse);