Search in sources :

Example 1 with ColorChooser

use of com.archimatetool.editor.ui.components.ColorChooser in project archi by archimatetool.

the class FontColorSection method createColorControl.

private void createColorControl(Composite parent) {
    createLabel(parent, Messages.FontColorSection_0, ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);
    fColorChooser = new ColorChooser(parent);
    fColorChooser.setDoShowPreferencesMenuItem(false);
    getWidgetFactory().adapt(fColorChooser.getControl(), true, true);
    fColorChooser.addListener(colorListener);
}
Also used : ColorChooser(com.archimatetool.editor.ui.components.ColorChooser)

Example 2 with ColorChooser

use of com.archimatetool.editor.ui.components.ColorChooser in project archi by archimatetool.

the class FillColorSection method createColorControl.

private void createColorControl(Composite parent) {
    createLabel(parent, Messages.FillColorSection_0, ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);
    fColorChooser = new ColorChooser(parent);
    getWidgetFactory().adapt(fColorChooser.getControl(), true, true);
    fColorChooser.addListener(colorListener);
}
Also used : ColorChooser(com.archimatetool.editor.ui.components.ColorChooser)

Example 3 with ColorChooser

use of com.archimatetool.editor.ui.components.ColorChooser in project archi by archimatetool.

the class BorderColorSection method createColorControl.

private void createColorControl(Composite parent) {
    createLabel(parent, Messages.BorderColorSection_0, ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);
    fColorChooser = new ColorChooser(parent);
    fColorChooser.setDoShowDefaultMenuItem(false);
    fColorChooser.setDoShowPreferencesMenuItem(false);
    // No border action
    fNoBorderAction = new Action(Messages.BorderColorSection_1) {

        @Override
        public void run() {
            CompoundCommand result = new CompoundCommand();
            for (EObject bo : getEObjects()) {
                if (isAlive(bo)) {
                    Command cmd = new BorderColorCommand((IBorderObject) bo, null);
                    if (cmd.canExecute()) {
                        result.add(cmd);
                    }
                }
            }
            executeCommand(result.unwrap());
        }
    };
    fColorChooser.addMenuAction(fNoBorderAction);
    getWidgetFactory().adapt(fColorChooser.getControl(), true, true);
    fColorChooser.addListener(colorListener);
}
Also used : IBorderObject(com.archimatetool.model.IBorderObject) IAction(org.eclipse.jface.action.IAction) Action(org.eclipse.jface.action.Action) CompoundCommand(org.eclipse.gef.commands.CompoundCommand) BorderColorCommand(com.archimatetool.editor.diagram.commands.BorderColorCommand) Command(org.eclipse.gef.commands.Command) ColorChooser(com.archimatetool.editor.ui.components.ColorChooser) EObject(org.eclipse.emf.ecore.EObject) CompoundCommand(org.eclipse.gef.commands.CompoundCommand) BorderColorCommand(com.archimatetool.editor.diagram.commands.BorderColorCommand)

Example 4 with ColorChooser

use of com.archimatetool.editor.ui.components.ColorChooser in project archi by archimatetool.

the class LineColorSection method createColorControl.

private void createColorControl(Composite parent) {
    createLabel(parent, Messages.LineColorSection_0, ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);
    fColorChooser = new ColorChooser(parent);
    getWidgetFactory().adapt(fColorChooser.getControl(), true, true);
    fColorChooser.addListener(colorListener);
}
Also used : ColorChooser(com.archimatetool.editor.ui.components.ColorChooser)

Aggregations

ColorChooser (com.archimatetool.editor.ui.components.ColorChooser)4 BorderColorCommand (com.archimatetool.editor.diagram.commands.BorderColorCommand)1 IBorderObject (com.archimatetool.model.IBorderObject)1 EObject (org.eclipse.emf.ecore.EObject)1 Command (org.eclipse.gef.commands.Command)1 CompoundCommand (org.eclipse.gef.commands.CompoundCommand)1 Action (org.eclipse.jface.action.Action)1 IAction (org.eclipse.jface.action.IAction)1