Examples of PaletteGroup


Examples of org.eclipse.gef.palette.PaletteGroup

    stackPalette.add(new MarqueeToolEntry());
    if (logger.isLoggable(Level.FINE)) {
      //$ANALYSIS-IGNORE
      logger.fine("Root palette created");
    }
    PaletteGroup group = new PaletteGroup("creation tools");
    group.add(stackPalette);
    PaletteRoot rootPalette = new PaletteRoot();
    rootPalette.add(group);
    return rootPalette;
  }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteGroup

    private static final String PALETTE_STATE = PREFIX+"State"; //$NON-NLS-1$
    private static final String PALETTE_SIZE = PREFIX+"Size"; //$NON-NLS-1$
    private static final int DEFAULT_PALETTE_SIZE = 125;

    private static PaletteContainer createControlGroup(PaletteRoot root) {
        PaletteGroup controlGroup = new PaletteGroup(Messages.PageEditorPaletteFactory_controlGroup_title);

        List<ToolEntry> entries = new ArrayList<ToolEntry>();
        ToolEntry tool = new SelectionToolEntry();
        tool.setToolClass(SelectionToolWithDoubleClick.class);
        entries.add(tool);
        root.setDefaultEntry(tool);
       

        controlGroup.addAll(entries);
        return controlGroup;
     }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteGroup

     *
     * @param root
     * @return container of the usual GEF suspects
     */
    private static PaletteContainer createControlGroup( PaletteRoot root ) {
        PaletteGroup controlGroup = new PaletteGroup("Actions");

        List<ToolEntry> entries = new ArrayList<ToolEntry>();

        ToolEntry tool = new SelectionToolEntry();
        tool.setToolClass(SelectionToolWithDoubleClick.class);
        entries.add(tool);
        root.setDefaultEntry(tool);

        controlGroup.addAll(entries);

        return controlGroup;
    }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteGroup

        }
        addAll(categories);
    }

    private PaletteGroup createCategory(String categoryName) {
        PaletteGroup controls = new PaletteGroup(categoryName);
        controls.setId(categoryName);
        for (ElementTypeDefinition type : JpdlVersionRegistry.getPaletteEntriesFor(jpdlVersion, categoryName).values()) {
            PaletteEntry entry = createEntry(type);
            if (entry != null) {
                controls.add(entry);
            }
        }
        return controls;
    }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteGroup

            }
        }
    }

    private PaletteGroup createDefaultControls() {
        PaletteGroup controls = new PaletteGroup("Default Tools");
        controls.setId("org.jbpm.palette.DefaultTools");
        addSelectionTool(controls);
        return controls;
    }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteGroup

  @Override
  protected PaletteRoot getPaletteRoot() {
    PaletteRoot root = new PaletteRoot();

    PaletteGroup manipGroup = new PaletteGroup("Manipulate elements");
    root.add(manipGroup);

    PanningSelectionToolEntry selectionToolEntry = new PanningSelectionToolEntry();
    manipGroup.add(selectionToolEntry);

    MarqueeToolEntry marqueeToolEntry = new MarqueeToolEntry();
    manipGroup.add(marqueeToolEntry);

    PanningToolEntry panningToolEntry = new PanningToolEntry();
    manipGroup.add(panningToolEntry);

    PaletteSeparator sep2 = new PaletteSeparator();
    root.add(sep2);

    PaletteGroup instGroup = new PaletteGroup("Create elements");
    root.add(instGroup);

    instGroup.add(createPolylineToolEntry());
    instGroup.add(createRectangleToolEntry());
    instGroup.add(createEllipseToolEntry());

    root.setDefaultEntry(selectionToolEntry);

    return root;
  }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteGroup

    // Preferences prefs = PDPlugin.getDefault().getPluginPreferences();
    // _showAll = prefs.getBoolean(IJMTConstants.PREF_PALETTE_SHOW_ALL);

    // a group of default control tools
    // JSFPalette.DefaultGroup.LabelJSFPallete=Controls
    PaletteGroup controls = new PaletteGroup(PageDesignerResources
        .getInstance().getString(
            "JSFPalette.DefaultGroup.LabelJSFPallete")); //$NON-NLS-1$
    add(controls);
    // the selection tool
    ToolEntry tool = new SelectionToolEntry() {
      public Tool createTool() {
        return new RangeSelectionTool();
      }
    };
    controls.add(tool);

    // use selection tool as default entry
    setDefaultEntry(tool);

    // the marquee selection tool
    controls.add(new MarqueeToolEntry());
  }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteGroup

    if (null == _paletteRoot) {
      // create root
      _paletteRoot = new PaletteRoot();
      final List<PaletteContainer> categories = new ArrayList<PaletteContainer>();
      // a group of default control tools
      final PaletteGroup controls = new PaletteGroup(Messages.MapPalette_Controls);
      // the selection tool
      final ToolEntry tool = new SelectionToolEntry();
      controls.add(tool);
      // use selection tool as default entry
      _paletteRoot.setDefaultEntry(tool);
      // the marquee selection tool
      controls.add(new MarqueeToolEntry());
      // a separator
      final PaletteSeparator separator = new PaletteSeparator(EditUIPlugin.PLUGIN_ID
        + ".palette.seperator"); //$NON-NLS-1$
      separator.setUserModificationPermission(PaletteEntry.PERMISSION_NO_MODIFICATION);
      controls.add(separator);
      // a tool for creating connection
      // controls.add(new ConnectionCreationToolEntry("Connections", "Create Connections",
      // null, ImageDescriptor.createFromFile(getClass(), "/icons/connection16.gif"),
      // ImageDescriptor.createFromFile(getClass(), "/icons/connection24.gif")));
      final NodeCreationFactory fac = new NodeCreationFactory();
      final ImageDescriptor ico = EditUIPlugin.getImageDescriptor("/icons/village.png"); //$NON-NLS-1$
      final CombinedTemplateCreationEntry addNode = new CombinedTemplateCreationEntry(
        Messages.MapPalette_Nodes, "Node", fac, fac, ico, ico) { //$NON-NLS-2$
      };
      addNode.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINISHED, false);
      controls.add(addNode);
      // add all categroies to root
      categories.add(controls);

      // create all object templates in groups an add them to the categories
      final List<PaletteDrawer> drawers = createObjectTemplates();
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteGroup

    drawer.addAll(entries);
    return drawer;
  }

  static private PaletteContainer createControlGroup(PaletteRoot root) {
    PaletteGroup controlGroup = new PaletteGroup(
        MusicMessages.MusicPlugin_Category_ControlGroup_Label);

    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();
    ToolEntry tool = new SelectionToolEntry();
    entries.add(tool);
    root.setDefaultEntry(tool);
    controlGroup.addAll(entries);
    return controlGroup;
  }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteGroup

    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);
    addEdgeTypes(graph, paletteModel);

    return paletteModel;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.