Package org.eclipse.swt.widgets

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


          if (e.button == 1) {
            ColorDialog cd = new ColorDialog(panel.getShell());
            cd.setRGB(blockColors[index].getRGB());
           
            RGB rgb = cd.open();
            if (rgb != null)
              config.setRGBParameter(keys[index], rgb.red, rgb.green, rgb.blue);
          } else {
            config.removeRGBParameter(keys[index]);
          }
View Full Code Here


    colorChooser.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
        ColorDialog cd = new ColorDialog(composite.getShell());
        cd.setRGB(new RGB(r,g,b));
        RGB newColor = cd.open();
        if (newColor == null)
          return;
        newColorChosen();
        COConfigurationManager.setRGBParameter(name, newColor.red, newColor.green, newColor.blue);
        newColorSet();
View Full Code Here

    }

    private void onSelectColor() {
      ColorDialog dialog = new ColorDialog(getShell());
      dialog.setRGB(fSelectedColor);
      RGB color = dialog.open();
      if (color != null) {
        fSelectedColor = color;
        updateColorItem();
      }
    }
View Full Code Here

  }

  private void onSelectOtherColor() {
    ColorDialog dialog = new ColorDialog(fParent.getShell());
    dialog.setRGB(fSelectedColor);
    RGB color = dialog.open();
    if (color != null)
      onColorSelected(color);
  }
}
View Full Code Here

    fButton.setImage(fImage);
    fButton.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        ColorDialog colorDialog= new ColorDialog(fButton.getShell());
        colorDialog.setRGB(fColorValue);
        RGB newColor = colorDialog.open();
        if (newColor != null) {
          fColorValue= newColor;
          updateColorImage();
        }
      }
View Full Code Here

            @Override
            public void widgetSelected(final SelectionEvent event) {
                final ColorDialog colorDialog = new ColorDialog(fButton.getShell());
                colorDialog.setRGB(fColorValue);
                final RGB newColor = colorDialog.open();
                if (newColor != null) {
                    fColorValue = newColor;
                    updateColorImage();
                }
            }
View Full Code Here

   * @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

        fButton.setImage(fImage);
        fButton.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent event) {
                ColorDialog colorDialog= new ColorDialog(fButton.getShell());
                colorDialog.setRGB(fColorValue);
                RGB newColor = colorDialog.open();
                if (newColor != null) {
                    fColorValue= newColor;
                    updateColorImage();
                }
            }
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();
  }

  protected Button createButton(Composite parent) {
    Button button = super.createButton(parent);
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.