Author: thomasobrien95
Date: Tue Jan 13 12:06:34 2009
New Revision: 2916

Modified:
   trunk/src/ca/sqlpower/architect/swingui/dbtree/DBTreeCellRenderer.java

Log:
Minor icon fix. Nodes that have an exception and a null icon will
have an error badge beside them to alert users of exceptions on the node.

Modified: trunk/src/ca/sqlpower/architect/swingui/dbtree/DBTreeCellRenderer.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/dbtree/DBTreeCellRenderer.java (original) +++ trunk/src/ca/sqlpower/architect/swingui/dbtree/DBTreeCellRenderer.java Tue Jan 13 12:06:34 2009
@@ -150,9 +150,13 @@
                        setIcon(null);
                }

- if (getIcon() != null && value instanceof SQLObject && ((SQLObject) value).getChildrenInaccessibleReason() != null) { + if (value instanceof SQLObject && ((SQLObject) value).getChildrenInaccessibleReason() != null) { logger.debug("Children are not accessible from the node " + ((SQLObject) value).getName()); - setIcon(new ComposedIcon(Arrays.asList(getIcon(), ERROR_BADGE)));
+            if (getIcon() == null) {
+                setIcon(ERROR_BADGE);
+            } else {
+ setIcon(new ComposedIcon(Arrays.asList(getIcon(), ERROR_BADGE)));
+            }
setToolTipText("Inaccessible: " + ((SQLObject) value).getChildrenInaccessibleReason());
         }

Reply via email to