use of org.eclipse.gef.palette.ToolEntry 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);
}
use of org.eclipse.gef.palette.ToolEntry 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;
}
use of org.eclipse.gef.palette.ToolEntry in project tdi-studio-se by Talend.
the class BusinessPaletteFactory method createEllipse10CreationTool.
/**
* @generated NOT
*/
private ToolEntry createEllipse10CreationTool() {
ImageDescriptor smallImage;
ImageDescriptor largeImage;
smallImage = BusinessElementTypes.getImageDescriptor(BusinessElementTypes.EllipseBusinessItem_1010);
largeImage = smallImage;
final List elementTypes = new ArrayList();
elementTypes.add(BusinessElementTypes.EllipseBusinessItem_1010);
ToolEntry result = new NodeToolEntry(Messages.getString("BusinessPaletteFactory.Ellipse"), Messages.getString("BusinessPaletteFactory.CreateEllipse"), smallImage, largeImage, //$NON-NLS-1$ //$NON-NLS-2$
elementTypes);
return result;
}
use of org.eclipse.gef.palette.ToolEntry in project tdi-studio-se by Talend.
the class BusinessPaletteFactory method createActor9CreationTool.
/**
* @generated NOT
*/
private ToolEntry createActor9CreationTool() {
ImageDescriptor smallImage;
ImageDescriptor largeImage;
smallImage = BusinessElementTypes.getImageDescriptor(BusinessElementTypes.ActorBusinessItem_1009);
largeImage = smallImage;
final List elementTypes = new ArrayList();
elementTypes.add(BusinessElementTypes.ActorBusinessItem_1009);
ToolEntry result = new NodeToolEntry(Messages.getString("BusinessPaletteFactory.Actor"), Messages.getString("BusinessPaletteFactory.CreateActor"), smallImage, largeImage, //$NON-NLS-1$ //$NON-NLS-2$
elementTypes);
return result;
}
use of org.eclipse.gef.palette.ToolEntry in project tdi-studio-se by Talend.
the class BusinessPaletteFactory method createDirectionalRelationship14CreationTool.
/**
* @generated NOT
*/
private ToolEntry createDirectionalRelationship14CreationTool() {
ImageDescriptor smallImage;
ImageDescriptor largeImage;
smallImage = BusinessElementTypes.getImageDescriptor(BusinessElementTypes.DirectionalBusinessItemRelationship_3002);
largeImage = smallImage;
final List relationshipTypes = new ArrayList();
relationshipTypes.add(BusinessElementTypes.DirectionalBusinessItemRelationship_3002);
ToolEntry result = new LinkToolEntry(//$NON-NLS-1$ //$NON-NLS-2$
Messages.getString("BusinessPaletteFactory.DirectionalRelationShip"), //$NON-NLS-1$ //$NON-NLS-2$
Messages.getString("BusinessPaletteFactory.CreateDirectionalRelationShip"), smallImage, largeImage, relationshipTypes);
return result;
}
Aggregations