Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.ColorDialog.open()


   * @since 3.2
   */
  public void open() {
    ColorDialog colorDialog = new ColorDialog(fButton.getShell());
    colorDialog.setRGB(fColorValue);
    RGB newColor = colorDialog.open();
    if (newColor != null) {
        RGB oldValue = fColorValue;
        fColorValue = newColor;
        final Object[] finalListeners = getListeners();
        if (finalListeners.length > 0) {
View Full Code Here


        ColorDialog dialog = new ColorDialog(cellEditorWindow.getShell());
        Object value = getValue();
        if (value != null) {
      dialog.setRGB((RGB) value);
    }
        value = dialog.open();
        return dialog.getRGB();
    }

    /* (non-Javadoc)
     * Method declared on DialogCellEditor.
View Full Code Here

      Shell shell = getShell();
      ColorDialog colorDialog = new ColorDialog(shell);
      colorDialog.setText("Choose Color");
      colorDialog.setRGB(new RGB(color.getRed(), color.getGreen(), color.getBlue()));

      RGB retRgb = colorDialog.open();
      if (retRgb == null) {
        return null;
      }

      Diagram diagram = (Diagram) color.eContainer();
View Full Code Here

                //Choose color
                ColorDialog colorDialog1 = new ColorDialog(colorLabel.getShell());
                colorDialog1.setText("Choose Color for Client");
                colorDialog1.setRGB(colorLabel.getBackground().getRGB());
                RGB selectedColor = colorDialog1.open();

                if(selectedColor != null){
                    Color color = new Color(Plugin.getDisplay(),
                            selectedColor.red,
                            selectedColor.green,
View Full Code Here

                //Choose color
                ColorDialog colorDialog1 = new ColorDialog(colorLabel_bad.getShell());
                colorDialog1.setText("Choose Color for Client");
                colorDialog1.setRGB(colorLabel_bad.getBackground().getRGB());
                RGB selectedColor = colorDialog1.open();

                if(selectedColor != null){
                    Color color = new Color(Plugin.getDisplay(),
                            selectedColor.red,
                            selectedColor.green,
View Full Code Here

              public void handleEvent(Event e) {
                //Choose color
                ColorDialog colorDialog1 = new ColorDialog(shell);
                colorDialog1.setText("Choose Color for Client");
                colorDialog1.setRGB(new RGB(0,0,0));
                RGB selectedColor = colorDialog1.open();

                if(selectedColor != null){
                  Color color = new Color(Plugin.getDisplay(),
                      selectedColor.red,
                      selectedColor.green,
View Full Code Here

             //Choose color
             Plugin.getTab2().getClientTable().setSelection(item_number);
             ColorDialog colorDialog1 = new ColorDialog(colorLabel.getShell());
             colorDialog1.setText("Choose Color for Client");
             colorDialog1.setRGB(colorLabel.getBackground().getRGB());
             RGB selectedColor = colorDialog1.open();

             if(selectedColor != null){
               String position = item.getText(0);
               position = stringNumberDownOne(position);
               String clientName = item.getText(1);
View Full Code Here

  }

  @Override
  public boolean show() {
    ColorDialog dialog = new ColorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
    RGB rgb = dialog.open();
    if (rgb != null) {
      proposal = "rgb("+rgb.red+","+rgb.green+","+rgb.blue+")";
      return true;
    }
    else {
View Full Code Here

    proposals.add(new DialogProposal(601, "Pick color ...") {

      @Override
      public String openProposal() {
        ColorDialog dialog = new ColorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
        RGB rgb = dialog.open();
        if (rgb != null) {
          String r = Integer.toHexString(rgb.red);
          r = r.length() == 1 ? "0"+r : r;
         
          String g = Integer.toHexString(rgb.green);
View Full Code Here

      }
     
      @Override
      public String openDialogValue() {
        ColorDialog dialog = new ColorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
        RGB rgb = dialog.open();
        if( rgb != null ) {
          return "rgb("+rgb.red+","+rgb.green+","+rgb.blue+")";
        }
        return null;
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.