Search in sources :

Example 16 with PaletteRoot

use of org.eclipse.gef.palette.PaletteRoot in project tdi-studio-se by Talend.

the class TalendEditorPaletteFactory method createPalette.

/**
     * Creates the PaletteRoot and adds all palette elements. Use this factory method to create a new palette for your
     * graphical editor.
     * 
     * @return a new PaletteRoot
     */
public static PaletteRoot createPalette(final IComponentsFactory compFac) {
    PaletteRoot pr = new PaletteRoot();
    pr.add(createToolsGroup());
    return createPalette(compFac, pr);
}
Also used : PaletteRoot(org.eclipse.gef.palette.PaletteRoot)

Example 17 with PaletteRoot

use of org.eclipse.gef.palette.PaletteRoot in project dbeaver by dbeaver.

the class ERDGraphicalViewer method acquireContainer.

private void acquireContainer(DBPDataSourceContainer container) {
    container.acquire(editor);
    container.getRegistry().addDataSourceListener(this);
    PaletteRoot paletteRoot = editor.getPaletteRoot();
    PaletteDrawer dsDrawer = new PaletteDrawer(container.getName(), DBeaverIcons.getImageDescriptor(container.getDriver().getIcon()));
    dsDrawer.setDescription(container.getDescription());
    dsDrawer.setId(container.getId());
    paletteRoot.add(dsDrawer);
}
Also used : PaletteRoot(org.eclipse.gef.palette.PaletteRoot) PaletteDrawer(org.eclipse.gef.palette.PaletteDrawer)

Example 18 with PaletteRoot

use of org.eclipse.gef.palette.PaletteRoot in project dbeaver by serge-rider.

the class ERDEditorPart method createPaletteRoot.

public PaletteRoot createPaletteRoot() {
    // create root
    PaletteRoot paletteRoot = new PaletteRoot();
    paletteRoot.setLabel("Entity Diagram");
    getDecorator().fillPalette(paletteRoot, isReadOnly());
    return paletteRoot;
}
Also used : PaletteRoot(org.eclipse.gef.palette.PaletteRoot)

Aggregations

PaletteRoot (org.eclipse.gef.palette.PaletteRoot)18 PaletteDrawer (org.eclipse.gef.palette.PaletteDrawer)6 ArrayList (java.util.ArrayList)3 SelectionToolEntry (org.eclipse.gef.palette.SelectionToolEntry)3 List (java.util.List)2 TreeMap (java.util.TreeMap)2 CombinedTemplateCreationEntry (org.eclipse.gef.palette.CombinedTemplateCreationEntry)2 PaletteEntry (org.eclipse.gef.palette.PaletteEntry)2 IConfigurationElement (org.eclipse.core.runtime.IConfigurationElement)1 IExtensionPoint (org.eclipse.core.runtime.IExtensionPoint)1 RootEditPart (org.eclipse.gef.RootEditPart)1 ScalableFreeformRootEditPart (org.eclipse.gef.editparts.ScalableFreeformRootEditPart)1 ConnectionCreationToolEntry (org.eclipse.gef.palette.ConnectionCreationToolEntry)1 CreationToolEntry (org.eclipse.gef.palette.CreationToolEntry)1 MarqueeToolEntry (org.eclipse.gef.palette.MarqueeToolEntry)1 PaletteContainer (org.eclipse.gef.palette.PaletteContainer)1 PaletteGroup (org.eclipse.gef.palette.PaletteGroup)1 ToolEntry (org.eclipse.gef.palette.ToolEntry)1 PaletteViewer (org.eclipse.gef.ui.palette.PaletteViewer)1 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)1