Search in sources :

Example 1 with PanningSelectionToolEntry

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

the class OPIEditorPaletteFactory method createToolsGroup.

private static void createToolsGroup(PaletteRoot palette) {
    var 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) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry) ToolEntry(org.eclipse.gef.palette.ToolEntry) PanningSelectionToolEntry(org.eclipse.gef.palette.PanningSelectionToolEntry)

Example 2 with PanningSelectionToolEntry

use of org.eclipse.gef.palette.PanningSelectionToolEntry 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) ExtConnectionCreationToolEntry(com.archimatetool.editor.diagram.tools.ExtConnectionCreationToolEntry) 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 PanningSelectionToolEntry

use of org.eclipse.gef.palette.PanningSelectionToolEntry 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) ExtConnectionCreationToolEntry(com.archimatetool.editor.diagram.tools.ExtConnectionCreationToolEntry) 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 4 with PanningSelectionToolEntry

use of org.eclipse.gef.palette.PanningSelectionToolEntry 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) ExtConnectionCreationToolEntry(com.archimatetool.editor.diagram.tools.ExtConnectionCreationToolEntry) 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

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