package info.limpet.stackedcharts.ui.editor.parts;

import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.swt.graphics.Image;

import info.limpet.stackedcharts.ui.editor.Activator;

public class StylingEditPart extends AbstractGraphicalEditPart
{

  /**
   * Standard Eclipse icon, source: http://eclipse-icons.i24.cc/eclipse-icons-07.html
   */
  private static final Image IMAGE = Activator.imageDescriptorFromPlugin(
      Activator.PLUGIN_ID, "icons/font.gif").createImage();

  @Override
  protected IFigure createFigure()
  {
    Label label = new Label(IMAGE);
    label.setToolTip(new Label("Click to view style properties"));
    return label;
  }

  @Override
  protected void createEditPolicies()
  {
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
        new NonResizableEditPolicy());
  }

}

@@ -45,16 +45,81 @@
 parts;%0A%0A
+import info.limpet.stackedcharts.ui.editor.StackedchartsImages;%0A%0A
 import o
@@ -145,16 +145,16 @@
 Figure;%0A
-
 import o
@@ -377,63 +377,8 @@
 e;%0A%0A
-import info.limpet.stackedcharts.ui.editor.Activator;%0A%0A
 publ
@@ -578,102 +578,67 @@
 E = 
-Activator.imageDescriptorFromPlugin(%0A      Activator.PLUGIN_ID, %22icons/font.gif%22).createImage(
+StackedchartsImages.getImage(StackedchartsImages.DESC_PAINT
 );%0A%0A

use the style icon