Revision 866 org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.swing/org.gvsig.proj.swing.impl/src/main/java/org/gvsig/proj/swing/impl/tree/LoadingNode.java
LoadingNode.java | ||
---|---|---|
22 | 22 |
super(parent); |
23 | 23 |
|
24 | 24 |
// we don't want to reuse the icon for other nodes, since we'll add an observer to the icon |
25 |
this.icon = new ImageIcon(ToolsSwingLocator.getIconThemeManager().getCurrent().get("spinner").getImage()); |
|
25 |
this.icon = new ImageIcon(ToolsSwingLocator.getIconThemeManager().getCurrent().get("crs-loadingnode-spinner").getImage());
|
|
26 | 26 |
this.message = message; |
27 | 27 |
this.tree = container.getTree(); |
28 | 28 |
|
... | ... | |
33 | 33 |
else { |
34 | 34 |
path = null; |
35 | 35 |
} |
36 |
|
|
37 | 36 |
// required for animaged gifs in treenodes |
38 |
this.icon.setImageObserver(new ImageObserver() {
|
|
39 |
@Override
|
|
40 |
public boolean imageUpdate(
|
|
41 |
Image img, int infoflags, int x, int y, int w, int h) {
|
|
42 |
if (path == null || !LoadingNode.this.tree.isShowing()) {
|
|
43 |
return false;
|
|
44 |
}
|
|
45 |
Rectangle cellRect = LoadingNode.this.tree.getPathBounds(path);
|
|
46 |
if ((infoflags & (FRAMEBITS | ALLBITS)) != 0 && Objects.nonNull(cellRect)) {
|
|
47 |
LoadingNode.this.tree.repaint(cellRect);
|
|
48 |
}
|
|
49 |
return (infoflags & (ALLBITS | ABORT)) == 0;
|
|
50 |
}
|
|
51 |
});
|
|
37 |
this.icon.setImageObserver(new ImageObserver() {
|
|
38 |
@Override
|
|
39 |
public boolean imageUpdate(
|
|
40 |
Image img, int infoflags, int x, int y, int w, int h) {
|
|
41 |
if (path == null || !LoadingNode.this.tree.isShowing()) {
|
|
42 |
return false;
|
|
43 |
}
|
|
44 |
Rectangle cellRect = LoadingNode.this.tree.getPathBounds(path);
|
|
45 |
if ((infoflags & (FRAMEBITS | ALLBITS)) != 0 && Objects.nonNull(cellRect)) {
|
|
46 |
LoadingNode.this.tree.repaint(cellRect);
|
|
47 |
}
|
|
48 |
return (infoflags & (ALLBITS | ABORT)) == 0;
|
|
49 |
}
|
|
50 |
});
|
|
52 | 51 |
} |
53 | 52 |
|
54 | 53 |
public void setMessage(String message) { |
Also available in: Unified diff