Search in sources :

Example 1 with TalendPaletteGroup

use of org.talend.core.ui.component.TalendPaletteGroup in project tdi-studio-se by Talend.

the class TalendEditorPaletteFactory method clearGroup.

public static void clearGroup() {
    paGroup.getChildren().clear();
    List list = palette.getChildren();
    if (list.size() > 0) {
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i) instanceof PaletteGroup) {
                PaletteGroup entry = (PaletteGroup) list.get(i);
                if (entry instanceof TalendPaletteGroup) {
                    continue;
                }
                palette.remove(entry);
            }
        }
    }
}
Also used : List(java.util.List) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) TalendPaletteGroup(org.talend.core.ui.component.TalendPaletteGroup) PaletteGroup(org.eclipse.gef.palette.PaletteGroup) TalendPaletteGroup(org.talend.core.ui.component.TalendPaletteGroup)

Example 2 with TalendPaletteGroup

use of org.talend.core.ui.component.TalendPaletteGroup in project tdi-studio-se by Talend.

the class TalendEditorPaletteFactory method createToolsGroup.

/** Create the "Tools" group. */
private static PaletteContainer createToolsGroup() {
    //$NON-NLS-1$
    TalendPaletteGroup toolGroup = new TalendPaletteGroup(Messages.getString("TalendEditorPaletteFactory.Tools"));
    // Add a selection tool to the group
    // ToolEntry tool = new PanningSelectionToolEntry();
    // toolGroup.add(tool);
    // palette.setDefaultEntry(tool);
    // Add a marquee tool to the group
    // toolGroup.add(new MarqueeToolEntry());
    //        CreationToolEntry noteCreationToolEntry = new CreationToolEntry(Messages.getString("TalendEditorPaletteFactory.Note"), //$NON-NLS-1$
    //                Messages.getString("TalendEditorPaletteFactory.CreateNote"), //$NON-NLS-1$
    // new NoteCreationFactory(), ImageProvider.getImageDesc(ECoreImage.CODE_ICON), ImageProvider
    // .getImageDesc(ECoreImage.CODE_ICON));
    // toolGroup.add(noteCreationToolEntry);
    // Add a (unnamed) separator to the group
    toolGroup.add(new PaletteSeparator());
    return toolGroup;
}
Also used : PaletteSeparator(org.eclipse.gef.palette.PaletteSeparator) TalendPaletteGroup(org.talend.core.ui.component.TalendPaletteGroup)

Aggregations

TalendPaletteGroup (org.talend.core.ui.component.TalendPaletteGroup)2 ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 PaletteGroup (org.eclipse.gef.palette.PaletteGroup)1 PaletteSeparator (org.eclipse.gef.palette.PaletteSeparator)1