private Rectangle myLastVisibleRec;
private Dimension myHoldSize;
- private MySelectionModel mySelectionModel = new MySelectionModel();
+ private final MySelectionModel mySelectionModel = new MySelectionModel();
public Tree() {
initTree_();
@Override
public void paint(Graphics g) {
- Rectangle clip = g.getClipBounds();
final Rectangle visible = getVisibleRect();
if (!AbstractTreeBuilder.isToPaintSelection(this)) {
if (myBusy) {
myBusyIcon.resume();
myBusyIcon.setToolTipText("Update is in progress. Click to cancel");
- } else {
+ }
+ else {
myBusyIcon.suspend();
myBusyIcon.setToolTipText(null);
SwingUtilities.invokeLater(new Runnable() {
if (paths == null) return (T[])Array.newInstance(nodeType, 0);
ArrayList<T> nodes = new ArrayList<T>();
- for (int i = 0; i < paths.length; i++) {
- Object last = paths[i].getLastPathComponent();
+ for (TreePath path : paths) {
+ Object last = path.getLastPathComponent();
if (nodeType.isAssignableFrom(last.getClass())) {
if (filter != null && !filter.accept((T)last)) continue;
nodes.add((T)last);
}
}
- @Override
- public void reshape(int x, int y, int w, int h) {
- super.reshape(x, y, w, h);
- }
-
public void setHoldSize(boolean hold) {
if (hold && myHoldSize == null) {
myHoldSize = getPreferredSize();