Examples of ToolEntry


Examples of org.eclipse.gef.palette.ToolEntry

    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);
View Full Code Here

Examples of org.eclipse.gef.palette.ToolEntry

        List<ToolEntry> entries = new ArrayList<ToolEntry>();
       
        List<BoxFactory> boxFactories = PrintingPlugin.getDefault().getVisibleBoxes();
       
        for (BoxFactory factory : boxFactories) {
          ToolEntry tool = new CombinedTemplateCreationEntry(
              factory.getName(),
              factory.getDescription(),
              null,
              new BoxCreationFactory(factory),
              factory.getSmallImage(),
View Full Code Here

Examples of org.eclipse.gef.palette.ToolEntry

    public void setActiveTool( String id ) {
        PaletteViewer paletteViewer = getPaletteViewer();
        if( id != null && id.equals( paletteViewer.getActiveTool().getId() ) ){
            return; // no change
        }
        ToolEntry entry = findToolEntry( paletteViewer.getPaletteRoot(), id );
        if( entry != null ){
            paletteViewer.setActiveTool( entry );
        }
    }
View Full Code Here

Examples of org.eclipse.gef.palette.ToolEntry

                if( id.equals( entry.getId() )){
                    return (ToolEntry) entry;
                }
            }
            else if( entry instanceof PaletteContainer){
                ToolEntry find = findToolEntry((PaletteContainer) entry, id);
                if( find != null){
                    return find;
                }
            }
        }
View Full Code Here

Examples of org.eclipse.gef.palette.ToolEntry

            }
            category.container( container ); // hook up so container can cycle tools on keypress
            for( ModalItem modalItem : category ) {
                String label = fixLabel(modalItem.getName());
                String keypress = shortcut(modalItem.getName());
                ToolEntry tool = new MapToolEntry(label, modalItem, keypress, category.getId());
               
                //set the default tool
                if(modalItem.getId().equals(DEFAULT_ID)){
                    root.setDefaultEntry(tool);
                }        
View Full Code Here

Examples of org.eclipse.gef.palette.ToolEntry

    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);
View Full Code Here

Examples of org.eclipse.gef.palette.ToolEntry

        addSelectionTool(controls);
        return controls;
    }

    private void addSelectionTool(PaletteGroup controls) {
        ToolEntry tool = new SelectionToolEntry();
        tool.setId("org.jbpm.ui.palette.Selection");
        controls.add(tool);
        setDefaultEntry(tool);
    }
View Full Code Here

Examples of org.eclipse.gef.palette.ToolEntry

    return command;
  }

  private void resetPalette() {
    if (_domain.getPaletteViewer() != null) {
      ToolEntry tool = _domain.getPaletteViewer().getPaletteRoot()
          .getDefaultEntry();
      if (tool != null) {
        _domain.getPaletteViewer().setActiveTool(tool);
      }
    }
View Full Code Here

Examples of org.eclipse.gef.palette.ToolEntry

    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);
View Full Code Here

Examples of org.eclipse.gef.palette.ToolEntry

      _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());
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.