Author: dazarov
Date: 2007-07-02 08:47:49 -0400 (Mon, 02 Jul 2007)
New Revision: 2235
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java
Log:
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-02
11:33:48 UTC (rev 2234)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-02
12:47:49 UTC (rev 2235)
@@ -43,11 +43,15 @@
public void propertyChange(PropertyChangeEvent evt) {
String prop = evt.getPropertyName();
if (Shape.SHOW_SELECTION.equals(prop)) {
- ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getSelectionColor());
- ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(255,255,255)));
+ if(getFigure().getChildren().size() > 0){
+ ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getSelectionColor());
+ ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(255,255,255)));
+ }
} else if (Shape.HIDE_SELECTION.equals(prop)) {
- ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getColor());
- ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(0,0,0)));
+ if(getFigure().getChildren().size() > 0){
+ ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getColor());
+ ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(0,0,0)));
+ }
}else if (ExpandeableShape.SHOW_REFERENCES.equals(prop)) {
// ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getSelectionColor());
// ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new
RGB(255,255,255)));
Show replies by date