public static PaletteRoot getPaletteRoot(Graph graph) {
if (graph == null) {
return null;
}
PaletteRoot paletteModel = new PaletteRoot();
PaletteGroup toolGroup = new PaletteGroup("Tools");
paletteModel.add(toolGroup);
// Add a selection tool to the group
ToolEntry tool = new SelectionToolEntry();
toolGroup.add(tool);
paletteModel.setDefaultEntry(tool);
// Add a marquee tool to the group
toolGroup.add(new MarqueeToolEntry());
addVertexTypes(graph, paletteModel);