Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.ArrowButton


  }
 
  protected Clickable createButton() {
    final Color foreground = CommonUIPlugin.getDefault().getColorRegistry().get(IDetailsColors.COLOR_DARK_SHADOW);
    final Color background = CommonUIPlugin.getDefault().getColorRegistry().get(IDetailsColors.COLOR_TRAY_BACKGROUND);
    Button result = new ArrowButton() {
      protected void paintBorder(Graphics graphics) {
        graphics.setForegroundColor(foreground);
        Rectangle r = getBounds().getCopy();
        r.shrink(0, 2);
        r.width -= 1;
        graphics.drawRectangle(r);
      }
    };
    result.setBackgroundColor(background);
    // sets the triangle color
    ((Triangle)result.getChildren().get(0)).setBackgroundColor(foreground);
    return result;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.ArrowButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.