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;
}
Aggregations