mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
disable tree icons icon at errors
This commit is contained in:
parent
83a1819992
commit
106bcc3c66
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ProjectDirectoriesDialog.java,v 1.14 2010/05/19 17:38:46 fros4943 Exp $
|
||||
* $Id: ProjectDirectoriesDialog.java,v 1.15 2010/05/19 17:52:23 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.dialogs;
|
||||
@ -465,12 +465,17 @@ class DirectoryTreePanel extends JPanel {
|
||||
}
|
||||
public void paintIcon(Component c, Graphics g, int x, int y) {
|
||||
if (icon != null) {
|
||||
icon.paintIcon(c, g, x, y);
|
||||
} else {
|
||||
try {
|
||||
icon.paintIcon(c, g, x, y);
|
||||
} catch (Exception e) {
|
||||
icon = null;
|
||||
}
|
||||
}
|
||||
if (icon == null) {
|
||||
g.setColor(Color.WHITE);
|
||||
g.fillRect(x, y, 18, 18);
|
||||
g.fillRect(x+1, y+1, 16, 16);
|
||||
g.setColor(Color.BLACK);
|
||||
g.drawRect(x, y, 18, 18);
|
||||
g.drawRect(x+1, y+1, 16, 16);
|
||||
}
|
||||
if (color != null) {
|
||||
g.setColor(color);
|
||||
|
Loading…
Reference in New Issue
Block a user