Ejemplo n.º 1
0
 public NumberAction(IRichTextEditViewer viewer) {
   this(
       viewer,
       "&Number",
       ToolkitImages.get(ToolkitImages.NUMBER), // $NON-NLS-1$
       "Number"); //$NON-NLS-1$
 }
Ejemplo n.º 2
0
 protected IFigure createBlockFigure() {
   final BlockFigure figure = new BlockFigure();
   ImageDescriptor descriptor = ToolkitImages.get(ToolkitImages.SLIDER_HANDLE);
   final Image image = descriptor == null ? null : descriptor.createImage(control.getDisplay());
   figure.setImage(image);
   figure.setSize(figure.getPreferredSize());
   control.addDisposeListener(
       new DisposeListener() {
         public void widgetDisposed(DisposeEvent e) {
           if (image != null) {
             image.dispose();
           }
           figure.setImage(null);
         }
       });
   return figure;
 }