Search in sources :

Example 1 with PaletteToolbar

use of org.eclipse.gef.palette.PaletteToolbar in project archi by archimatetool.

the class CanvasEditorPalette method createControlsGroup.

/**
 * Create a Group of Controls
 */
private PaletteContainer createControlsGroup() {
    PaletteContainer group = new PaletteToolbar(Messages.CanvasEditorPalette_0);
    add(group);
    // The selection tool
    ToolEntry tool = new PanningSelectionToolEntry();
    tool.setToolClass(PanningSelectionExtendedTool.class);
    group.add(tool);
    // Use selection tool as default entry
    setDefaultEntry(tool);
    PaletteStack stack = createMarqueeSelectionStack();
    group.add(stack);
    // Format Painter
    formatPainterEntry = new FormatPainterToolEntry();
    group.add(formatPainterEntry);
    return group;
}
Also used : PaletteToolbar(org.eclipse.gef.palette.PaletteToolbar) FormatPainterToolEntry(com.archimatetool.editor.diagram.tools.FormatPainterToolEntry) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry) ToolEntry(org.eclipse.gef.palette.ToolEntry) FormatPainterToolEntry(com.archimatetool.editor.diagram.tools.FormatPainterToolEntry) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry) PaletteContainer(org.eclipse.gef.palette.PaletteContainer) PaletteStack(org.eclipse.gef.palette.PaletteStack)

Example 2 with PaletteToolbar

use of org.eclipse.gef.palette.PaletteToolbar in project archi by archimatetool.

the class ArchimateDiagramEditorPalette method createControlsGroup.

/**
 * Create a Group of Controls
 */
private void createControlsGroup() {
    PaletteContainer group = new PaletteToolbar(Messages.ArchimateDiagramEditorPalette_0);
    // The selection tool
    ToolEntry tool = new PanningSelectionToolEntry();
    tool.setToolClass(PanningSelectionExtendedTool.class);
    group.add(tool);
    // Use selection tool as default entry
    setDefaultEntry(tool);
    PaletteStack stack = createMarqueeSelectionStack();
    group.add(stack);
    // Format Painter
    formatPainterEntry = new FormatPainterToolEntry();
    group.add(formatPainterEntry);
    add(group);
    // Relations group will be inserted before this
    // $NON-NLS-1$
    add(new PaletteSeparator("relations"));
}
Also used : PaletteToolbar(org.eclipse.gef.palette.PaletteToolbar) PaletteSeparator(org.eclipse.gef.palette.PaletteSeparator) FormatPainterToolEntry(com.archimatetool.editor.diagram.tools.FormatPainterToolEntry) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry) ToolEntry(org.eclipse.gef.palette.ToolEntry) FormatPainterToolEntry(com.archimatetool.editor.diagram.tools.FormatPainterToolEntry) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry) PaletteContainer(org.eclipse.gef.palette.PaletteContainer) PaletteStack(org.eclipse.gef.palette.PaletteStack)

Example 3 with PaletteToolbar

use of org.eclipse.gef.palette.PaletteToolbar in project yamcs-studio by yamcs.

the class OPIEditorPaletteFactory method createToolsGroup.

private static void createToolsGroup(PaletteRoot palette) {
    PaletteToolbar toolbar = new PaletteToolbar("Tools");
    // Add a selection tool to the group
    ToolEntry tool = new PanningSelectionToolEntry();
    toolbar.add(tool);
    palette.setDefaultEntry(tool);
    tool = new ConnectionCreationToolEntry("Connection", "Create a connection between widgets", new CreationFactory() {

        @Override
        public Object getObjectType() {
            return null;
        }

        @Override
        public Object getNewObject() {
            return null;
        }
    }, CustomMediaFactory.getInstance().getImageDescriptorFromPlugin(OPIBuilderPlugin.PLUGIN_ID, "icons/connection_s16.gif"), CustomMediaFactory.getInstance().getImageDescriptorFromPlugin(OPIBuilderPlugin.PLUGIN_ID, "icons/connection_s24.gif"));
    toolbar.add(tool);
    palette.add(toolbar);
}
Also used : PaletteToolbar(org.eclipse.gef.palette.PaletteToolbar) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) CreationFactory(org.eclipse.gef.requests.CreationFactory) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry) ToolEntry(org.eclipse.gef.palette.ToolEntry) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry)

Example 4 with PaletteToolbar

use of org.eclipse.gef.palette.PaletteToolbar in project archi by archimatetool.

the class CanvasEditorPalette method createStickiesGroup.

private PaletteContainer createStickiesGroup() {
    PaletteContainer group = new PaletteToolbar(Messages.CanvasEditorPalette_8);
    add(group);
    // Sticky Notes
    group.add(createStickyEntry(ColorConstants.white));
    group.add(createStickyEntry(ColorFactory.get(255, 255, 149)));
    group.add(createStickyEntry(ColorFactory.get(213, 255, 149)));
    group.add(createStickyEntry(ColorFactory.get(198, 249, 198)));
    group.add(createStickyEntry(ColorFactory.get(198, 249, 247)));
    group.add(createStickyEntry(ColorFactory.get(198, 216, 250)));
    group.add(createStickyEntry(ColorFactory.get(196, 196, 248)));
    group.add(createStickyEntry(ColorFactory.get(238, 200, 251)));
    group.add(createStickyEntry(ColorFactory.get(247, 196, 196)));
    group.add(createStickyEntry(ColorFactory.get(248, 196, 145)));
    group.add(createStickyEntry(ColorFactory.get(255, 160, 147)));
    return group;
}
Also used : PaletteToolbar(org.eclipse.gef.palette.PaletteToolbar) PaletteContainer(org.eclipse.gef.palette.PaletteContainer)

Example 5 with PaletteToolbar

use of org.eclipse.gef.palette.PaletteToolbar in project archi by archimatetool.

the class SketchEditorPalette method createControlsGroup.

/**
 * Create a Group of Controls
 */
private PaletteContainer createControlsGroup() {
    PaletteContainer group = new PaletteToolbar(Messages.SketchEditorPalette_0);
    add(group);
    // The selection tool
    ToolEntry tool = new PanningSelectionToolEntry();
    tool.setToolClass(PanningSelectionExtendedTool.class);
    group.add(tool);
    // Use selection tool as default entry
    setDefaultEntry(tool);
    PaletteStack stack = createMarqueeSelectionStack();
    group.add(stack);
    // Format Painter
    formatPainterEntry = new FormatPainterToolEntry();
    group.add(formatPainterEntry);
    return group;
}
Also used : PaletteToolbar(org.eclipse.gef.palette.PaletteToolbar) FormatPainterToolEntry(com.archimatetool.editor.diagram.tools.FormatPainterToolEntry) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry) ToolEntry(org.eclipse.gef.palette.ToolEntry) FormatPainterToolEntry(com.archimatetool.editor.diagram.tools.FormatPainterToolEntry) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry) PaletteContainer(org.eclipse.gef.palette.PaletteContainer) PaletteStack(org.eclipse.gef.palette.PaletteStack)

Aggregations

PaletteToolbar (org.eclipse.gef.palette.PaletteToolbar)6 PaletteContainer (org.eclipse.gef.palette.PaletteContainer)5 ConnectionCreationToolEntry (org.eclipse.gef.palette.ConnectionCreationToolEntry)4 PanningSelectionToolEntry (org.eclipse.gef.palette.PanningSelectionToolEntry)4 ToolEntry (org.eclipse.gef.palette.ToolEntry)4 FormatPainterToolEntry (com.archimatetool.editor.diagram.tools.FormatPainterToolEntry)3 PaletteStack (org.eclipse.gef.palette.PaletteStack)3 PaletteSeparator (org.eclipse.gef.palette.PaletteSeparator)1 CreationFactory (org.eclipse.gef.requests.CreationFactory)1