}
}
});
-
+
this.add(button, BorderLayout.CENTER);
}
- if (!node.getChildren().isEmpty()) {
+ if ((node.isRoot() && node.getChildren().isEmpty())
+ || !node.getChildren().isEmpty()) {
// TODO allow an image or ">", viewer
down = new JToggleButton(">");
final JPopupMenu popup = new JPopupMenu();
}
});
+ setSelectedNode(new DataNode<T>(null, null));
+
new SwingWorker<DataNode<T>, Void>() {
@Override
protected DataNode<T> doInBackground() throws Exception {
@Override
protected void done() {
try {
- node = get();
+ DataNode<T> node = get();
+
+ setSelectedNode(null);
+ BreadCrumbsBar.this.node = node;
addCrumb(node);
// TODO: option?
});
zoomLabel = new JLabel();
- zoomLabel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+ zoomLabel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0));
setIcons(null, null, null, null);
setOrientation(vertical);