Search in sources :

Example 1 with SimpleFactory

use of org.eclipse.gef.requests.SimpleFactory 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)

Aggregations

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 ArrayList (java.util.ArrayList)1 CombinedTemplateCreationEntry (org.eclipse.gef.palette.CombinedTemplateCreationEntry)1 ConnectionCreationToolEntry (org.eclipse.gef.palette.ConnectionCreationToolEntry)1 PaletteDrawer (org.eclipse.gef.palette.PaletteDrawer)1 SelectionToolEntry (org.eclipse.gef.palette.SelectionToolEntry)1 ToolEntry (org.eclipse.gef.palette.ToolEntry)1 SimpleFactory (org.eclipse.gef.requests.SimpleFactory)1