Search in sources :

Example 6 with ToolEntry

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

the class BusinessPaletteFactory method createList7CreationTool.

/**
     * @generated NOT
     */
private ToolEntry createList7CreationTool() {
    ImageDescriptor smallImage;
    ImageDescriptor largeImage;
    smallImage = BusinessElementTypes.getImageDescriptor(BusinessElementTypes.ListBusinessItem_1005);
    largeImage = smallImage;
    final List elementTypes = new ArrayList();
    elementTypes.add(BusinessElementTypes.ListBusinessItem_1005);
    ToolEntry result = new NodeToolEntry(Messages.getString("BusinessPaletteFactory.List"), Messages.getString("BusinessPaletteFactory.ListComment"), smallImage, largeImage, //$NON-NLS-1$ //$NON-NLS-2$
    elementTypes);
    return result;
}
Also used : ArrayList(java.util.ArrayList) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor) ArrayList(java.util.ArrayList) List(java.util.List) ToolEntry(org.eclipse.gef.palette.ToolEntry)

Example 7 with ToolEntry

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

the class BusinessPaletteFactory method createTerminal3CreationTool.

/**
     * @generated NOT
     */
private ToolEntry createTerminal3CreationTool() {
    ImageDescriptor smallImage;
    ImageDescriptor largeImage;
    smallImage = BusinessElementTypes.getImageDescriptor(BusinessElementTypes.TerminalBusinessItem_1002);
    largeImage = smallImage;
    final List elementTypes = new ArrayList();
    elementTypes.add(BusinessElementTypes.TerminalBusinessItem_1002);
    ToolEntry result = new NodeToolEntry(Messages.getString("BusinessPaletteFactory.Terminal"), Messages.getString("BusinessPaletteFactory.TerminalComment"), smallImage, largeImage, //$NON-NLS-1$ //$NON-NLS-2$
    elementTypes);
    return result;
}
Also used : ArrayList(java.util.ArrayList) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor) ArrayList(java.util.ArrayList) List(java.util.List) ToolEntry(org.eclipse.gef.palette.ToolEntry)

Example 8 with ToolEntry

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

the class BusinessPaletteFactory method createBidirectionalRelationship15CreationTool.

/**
     * @generated NOT
     */
private ToolEntry createBidirectionalRelationship15CreationTool() {
    ImageDescriptor smallImage;
    ImageDescriptor largeImage;
    smallImage = BusinessElementTypes.getImageDescriptor(BusinessElementTypes.BidirectionalBusinessItemRelationship_3003);
    largeImage = smallImage;
    final List relationshipTypes = new ArrayList();
    relationshipTypes.add(BusinessElementTypes.BidirectionalBusinessItemRelationship_3003);
    ToolEntry result = new LinkToolEntry(//$NON-NLS-1$ //$NON-NLS-2$
    Messages.getString("BusinessPaletteFactory.BidirectionalRelationShip"), //$NON-NLS-1$ //$NON-NLS-2$
    Messages.getString("BusinessPaletteFactory.CreateBidirectionalRelationShip"), smallImage, largeImage, relationshipTypes);
    return result;
}
Also used : ArrayList(java.util.ArrayList) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor) ArrayList(java.util.ArrayList) List(java.util.List) ToolEntry(org.eclipse.gef.palette.ToolEntry)

Example 9 with ToolEntry

use of org.eclipse.gef.palette.ToolEntry in project cubrid-manager by CUBRID.

the class PaletteFactory method createComponentsDrawer.

/**
	 * create components drawer
	 * 
	 * @return drawer
	 */
private static PaletteContainer createComponentsDrawer() {
    PaletteDrawer drawer = new PaletteDrawer(Messages.lblReplComponent);
    drawer.setLargeIcon(CubridManagerUIPlugin.getImageDescriptor("icons/replication/replication.gif"));
    drawer.setSmallIcon(CubridManagerUIPlugin.getImageDescriptor("icons/replication/replication.gif"));
    List<ToolEntry> toolEntries = new ArrayList<ToolEntry>();
    ToolEntry toolEntry = new CombinedTemplateCreationEntry(Messages.lblHostTool, Messages.descHostTool, HostNode.class, new SimpleFactory(HostNode.class), CubridManagerUIPlugin.getImageDescriptor("icons/navigator/host.png"), CubridManagerUIPlugin.getImageDescriptor("icons/navigator/host.png"));
    toolEntries.add(toolEntry);
    toolEntry = new CombinedTemplateCreationEntry(Messages.lblMasterTool, Messages.descMasterTool, MasterNode.class, new SimpleFactory(MasterNode.class), CubridManagerUIPlugin.getImageDescriptor("icons/replication/master.png"), CubridManagerUIPlugin.getImageDescriptor("icons/replication/master.png"));
    toolEntries.add(toolEntry);
    toolEntry = new CombinedTemplateCreationEntry(Messages.lblDistributorTool, Messages.descDistributorTool, DistributorNode.class, new SimpleFactory(DistributorNode.class), CubridManagerUIPlugin.getImageDescriptor("icons/replication/distributor.gif"), CubridManagerUIPlugin.getImageDescriptor("icons/replication/distributor.gif"));
    toolEntries.add(toolEntry);
    toolEntry = new CombinedTemplateCreationEntry(Messages.lblSlaveTool, Messages.descSlaveTool, SlaveNode.class, new SimpleFactory(SlaveNode.class), CubridManagerUIPlugin.getImageDescriptor("icons/replication/slave.png"), CubridManagerUIPlugin.getImageDescriptor("icons/replication/slave.png"));
    toolEntries.add(toolEntry);
    drawer.addAll(toolEntries);
    return drawer;
}
Also used : MasterNode(com.cubrid.cubridmanager.ui.replication.editor.model.MasterNode) SlaveNode(com.cubrid.cubridmanager.ui.replication.editor.model.SlaveNode) HostNode(com.cubrid.cubridmanager.ui.replication.editor.model.HostNode) PaletteDrawer(org.eclipse.gef.palette.PaletteDrawer) ArrayList(java.util.ArrayList) SimpleFactory(org.eclipse.gef.requests.SimpleFactory) ToolEntry(org.eclipse.gef.palette.ToolEntry) SelectionToolEntry(org.eclipse.gef.palette.SelectionToolEntry) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) CombinedTemplateCreationEntry(org.eclipse.gef.palette.CombinedTemplateCreationEntry) DistributorNode(com.cubrid.cubridmanager.ui.replication.editor.model.DistributorNode)

Example 10 with ToolEntry

use of org.eclipse.gef.palette.ToolEntry 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;
}
Also used : SelectionToolEntry(org.eclipse.gef.palette.SelectionToolEntry) ArrayList(java.util.ArrayList) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) ToolEntry(org.eclipse.gef.palette.ToolEntry) SelectionToolEntry(org.eclipse.gef.palette.SelectionToolEntry) ConnectionCreationToolEntry(org.eclipse.gef.palette.ConnectionCreationToolEntry) PaletteGroup(org.eclipse.gef.palette.PaletteGroup)

Aggregations

ToolEntry (org.eclipse.gef.palette.ToolEntry)19 ArrayList (java.util.ArrayList)17 List (java.util.List)15 ImageDescriptor (org.eclipse.jface.resource.ImageDescriptor)14 ConnectionCreationToolEntry (org.eclipse.gef.palette.ConnectionCreationToolEntry)4 SelectionToolEntry (org.eclipse.gef.palette.SelectionToolEntry)3 CombinedTemplateCreationEntry (org.eclipse.gef.palette.CombinedTemplateCreationEntry)2 PaletteDrawer (org.eclipse.gef.palette.PaletteDrawer)2 PaletteGroup (org.eclipse.gef.palette.PaletteGroup)2 DistributorNode (com.cubrid.cubridmanager.ui.replication.editor.model.DistributorNode)1 HostNode (com.cubrid.cubridmanager.ui.replication.editor.model.HostNode)1 MasterNode (com.cubrid.cubridmanager.ui.replication.editor.model.MasterNode)1 SlaveNode (com.cubrid.cubridmanager.ui.replication.editor.model.SlaveNode)1 EventObject (java.util.EventObject)1 EditPart (org.eclipse.gef.EditPart)1 RootEditPart (org.eclipse.gef.RootEditPart)1 AbstractEditPart (org.eclipse.gef.editparts.AbstractEditPart)1 ScalableFreeformRootEditPart (org.eclipse.gef.editparts.ScalableFreeformRootEditPart)1 MarqueeToolEntry (org.eclipse.gef.palette.MarqueeToolEntry)1 PaletteContainer (org.eclipse.gef.palette.PaletteContainer)1