Example usage for org.eclipse.jface.preference ColorSelector setEnabled

List of usage examples for org.eclipse.jface.preference ColorSelector setEnabled

Introduction

In this page you can find the example usage for org.eclipse.jface.preference ColorSelector setEnabled.

Prototype

public void setEnabled(boolean state) 

Source Link

Document

Set whether or not the button is enabled.

Usage

From source file:org.fusesource.ide.jvmmonitor.internal.ui.properties.timeline.AttributeSelectionDialog.java

License:Open Source License

/**
 * Creates the color selector./*  www .j  av  a  2  s  .  co m*/
 * 
 * @param parent
 *            The parent composite
 * @return The color selector
 */
private ColorSelector createColorSelector(Composite parent) {
    final ColorSelector selector = new ColorSelector(parent);
    selector.addListener(new IPropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent event) {
            IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
            AttributeNode attribute = (AttributeNode) selection.getFirstElement();
            if (attribute != null) {
                attribute.setRgb(selector.getColorValue());
            }
        }
    });
    selector.setEnabled(false);
    return selector;
}

From source file:org.fusesource.ide.jvmmonitor.internal.ui.properties.timeline.ConfigureChartDialog.java

License:Open Source License

/**
 * Creates the color selector./*from   ww w  . ja v a 2s. c o  m*/
 * 
 * @param parent
 *            The parent composite
 * @return The color selector
 */
private ColorSelector createColorSelector(Composite parent) {
    final ColorSelector selector = new ColorSelector(parent);
    selector.addListener(new IPropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent event) {
            IStructuredSelection selection = (IStructuredSelection) attributesViewer.getSelection();
            MBeanAttribute attribute = (MBeanAttribute) selection.getFirstElement();
            if (attribute != null) {
                attribute.setRgb(selector.getColorValue());
            }
        }
    });
    selector.setEnabled(false);
    return selector;
}

From source file:org.talend.designer.runtime.visualization.internal.ui.properties.timeline.AttributeSelectionDialog.java

License:Open Source License

/**
 * Creates the color selector.//www  . j a v a2  s .c om
 * 
 * @param parent The parent composite
 * @return The color selector
 */
private ColorSelector createColorSelector(Composite parent) {
    final ColorSelector selector = new ColorSelector(parent);
    selector.addListener(new IPropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent event) {
            IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
            AttributeNode attribute = (AttributeNode) selection.getFirstElement();
            if (attribute != null) {
                attribute.setRgb(selector.getColorValue());
            }
        }
    });
    selector.setEnabled(false);
    return selector;
}

From source file:org.talend.designer.runtime.visualization.internal.ui.properties.timeline.ConfigureChartDialog.java

License:Open Source License

/**
 * Creates the color selector./*from w ww  . j a v  a2 s . co m*/
 * 
 * @param parent The parent composite
 * @return The color selector
 */
private ColorSelector createColorSelector(Composite parent) {
    final ColorSelector selector = new ColorSelector(parent);
    selector.addListener(new IPropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent event) {
            IStructuredSelection selection = (IStructuredSelection) attributesViewer.getSelection();
            MBeanAttribute attribute = (MBeanAttribute) selection.getFirstElement();
            if (attribute != null) {
                attribute.setRgb(selector.getColorValue());
            }
        }
    });
    selector.setEnabled(false);
    return selector;
}