use of org.eclipse.gef.palette.PaletteGroup 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);
}
}
}
}
use of org.eclipse.gef.palette.PaletteGroup in project cubrid-manager by CUBRID.
the class PaletteFactory method createControlGroup.
/**
* create control group
*
* @param root PaletteRoot
* @return componentGroup
*/
private static PaletteContainer createControlGroup(PaletteRoot root) {
PaletteGroup componentGroup = new PaletteGroup(Messages.lblComponentGrp);
List<ToolEntry> toolEntries = new ArrayList<ToolEntry>();
ToolEntry toolEntry = new SelectionToolEntry();
toolEntry.setLabel(Messages.lblSelectTool);
toolEntry.setDescription(Messages.descSelectTool);
toolEntries.add(toolEntry);
root.setDefaultEntry(toolEntry);
toolEntry = new ConnectionCreationToolEntry(Messages.lblConnectionTool, Messages.descConnectionTool, null, CubridManagerUIPlugin.getImageDescriptor("icons/replication/arrow.gif"), CubridManagerUIPlugin.getImageDescriptor("icons/replication/arrow.gif"));
toolEntries.add(toolEntry);
componentGroup.addAll(toolEntries);
return componentGroup;
}
use of org.eclipse.gef.palette.PaletteGroup in project cubrid-manager by CUBRID.
the class PaletteViewerCreator method createPaletteRoot.
/**
* Create palette for ER canvas
*
* @return
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public PaletteRoot createPaletteRoot(ERSchema erSchema) {
paletteRoot = new PaletteRoot();
paletteRoot.setLabel("");
paletteRoot.setSmallIcon(null);
paletteRoot.setLargeIcon(null);
PaletteGroup controls = new PaletteGroup("Controls");
paletteRoot.add(controls);
ToolEntry tool = new SelectionToolEntry();
controls.add(tool);
paletteRoot.setDefaultEntry(tool);
controls.add(new MarqueeToolEntry());
PaletteDrawer drawer = new PaletteDrawer("New Component", null);
List entries = new ArrayList();
ConnectionCreationToolEntry connection = getConnectionEntry();
CombinedTemplateCreationEntry tableEntry = getTableEntry(erSchema);
entries.add(connection);
entries.add(tableEntry);
drawer.addAll(entries);
paletteRoot.add(drawer);
return paletteRoot;
}
Aggregations