1.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/design/decoration/GlowDescriptor.java Fri Apr 22 15:05:11 2011 -0400
1.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/design/decoration/GlowDescriptor.java Wed Sep 28 14:01:59 2011 +0400
1.3 @@ -25,25 +25,20 @@
1.4 import java.awt.geom.Area;
1.5 import org.netbeans.modules.bpel.design.GUtils;
1.6
1.7 -
1.8 public class GlowDescriptor implements Descriptor {
1.9
1.10 private Color color;
1.11 -
1.12 private double width;
1.13
1.14 -
1.15 public GlowDescriptor(Color color) {
1.16 this(color, 8);
1.17 }
1.18
1.19 -
1.20 public GlowDescriptor(Color color, double width) {
1.21 this.color = color;
1.22 this.width = width;
1.23 }
1.24
1.25 -
1.26 public void paint(Graphics2D g2, Shape shape) {
1.27 Area area = (shape instanceof Area) ? (Area) shape : new Area(shape);
1.28 GUtils.drawGlow(g2, area, width, color);
2.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/search/Decorator.java Fri Apr 22 15:05:11 2011 -0400
2.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/search/Decorator.java Wed Sep 28 14:01:59 2011 +0400
2.3 @@ -28,6 +28,7 @@
2.4 import org.netbeans.modules.bpel.design.decoration.Decoration;
2.5 import org.netbeans.modules.bpel.design.decoration.DecorationProvider;
2.6 import org.netbeans.modules.bpel.design.decoration.DecorationProviderFactory;
2.7 +import org.netbeans.modules.bpel.design.decoration.GlowDescriptor;
2.8 import org.netbeans.modules.bpel.design.decoration.LabelStyleDescriptor;
2.9 import org.netbeans.modules.bpel.design.model.elements.VisualElement;
2.10
2.11 @@ -37,8 +38,7 @@
2.12 */
2.13 public final class Decorator extends DecorationProvider implements DecorationProviderFactory {
2.14
2.15 - public Decorator() {
2.16 - }
2.17 + public Decorator() {}
2.18
2.19 public DecorationProvider createInstance(DesignView view) {
2.20 return new Decorator(view);
2.21 @@ -51,15 +51,11 @@
2.22
2.23 @Override
2.24 public Decoration getDecoration(BpelEntity entity) {
2.25 -// if ( !myIsClearSelection && mySelectedEntity == entity) {
2.26 -// return GREEN_DECORATION; // glow
2.27 -// }
2.28 -// if ( !myIsClearHighlighting && myHighlightedEntities.contains(entity)) {
2.29 -// return YELLOW_DECORATION; // highlight
2.30 -// }
2.31 - if (!myIsClearSelection && mySelectedEntity == entity) {
2.32 - return new Decoration(new LabelStyleDescriptor(new Color(0x339900),
2.33 - new Color(0x339900), element, Font.BOLD));
2.34 + if ( !myIsClearSelection && mySelectedEntity == entity) {
2.35 + return new Decoration(new LabelStyleDescriptor(new Color(0x339900), element, Font.BOLD)); // glow
2.36 + }
2.37 + if ( !myIsClearHighlighting && myHighlightedEntities.contains(entity)) {
2.38 + return new Decoration(new GlowDescriptor(new Color(255, 255, 0), 20.0)); // highlight
2.39 }
2.40 return null;
2.41 }
2.42 @@ -110,14 +106,11 @@
2.43 }
2.44 }
2.45 return null;
2.46 - }
2.47 + }
2.48
2.49 -
2.50 + private VisualElement element;
2.51 private boolean myIsClearSelection;
2.52 private boolean myIsClearHighlighting;
2.53 - private VisualElement element;
2.54 private BpelEntity mySelectedEntity;
2.55 private List<BpelEntity> myHighlightedEntities;
2.56 -// private static final Decoration GREEN_DECORATION = new Decoration(new GlowDescriptor(new Color(56, 216, 120), 20));
2.57 -// private static final Decoration YELLOW_DECORATION = new Decoration(new GlowDescriptor(new Color(255, 255, 0), 20));
2.58 }