Package com.extjs.gxt.ui.client.widget.toolbar

Examples of com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem


        Dispatcher.get().dispatch(WPaloEvent.ADD_ACCOUNT_ITEM);
      }
    });
    toolbar.add(addAcc);
   
    toolbar.add(new SeparatorToolItem());
    del = new TextToolItem("", "icon-delete");
    del.setToolTip(constants.delete());
    del.setEnabled(false);
    del.addSelectionListener(new SelectionListener<ComponentEvent>() {
      public final void componentSelected(ComponentEvent ce) {
View Full Code Here


    TextToolItem addView = new TextToolItem("", "icon-create-view");
    addView.setToolTip(WPalo.i18n.reportNavigatorView_addAdhocViewTemplateToolTip());
//        "Create new AdHoc View Template");
    toolbar.add(addView);

    toolbar.add(new SeparatorToolItem());
    TextToolItem delItems = new TextToolItem("", "icon-delete");
    delItems.setToolTip(WPalo.i18n.reportNavigatorView_deleteItemsToolTip());
//        "Delete items");
    toolbar.add(delItems);
    delItems.addSelectionListener(new SelectionListener<ComponentEvent>(){
View Full Code Here

    //da toolbar
    ToolBar toolbar = new ToolBar();
    TextToolItem save = new TextToolItem("Save", "icon-save");
    toolbar.add(save);
    toolbar.add(new SeparatorToolItem());
    content.setTopComponent(toolbar);

    tabFolder = new TabPanel();
    tabFolder.setTabScroll(true);
View Full Code Here

    toolbar.add(addUser);
    addGroup = createToolItem(constants.addGroup(), "icon-group-add", WPaloEvent.ADD_GROUP_ITEM);
    toolbar.add(addGroup);
    addRole = createToolItem(constants.addRole(), "icon-role2-add", WPaloEvent.ADD_ROLE_ITEM);
    toolbar.add(addRole);
    toolbar.add(new SeparatorToolItem());
    del = new TextToolItem("", "icon-delete");
    del.setToolTip(constants.delete());
    del.setEnabled(false);
    del.addSelectionListener(new SelectionListener<ComponentEvent>() {
      public final void componentSelected(ComponentEvent ce) {
View Full Code Here

    //da toolbar
    ToolBar toolbar = new ToolBar();
    TextToolItem save = new TextToolItem("Save", "icon-save");
    toolbar.add(save);
    toolbar.add(new SeparatorToolItem());
    content.setTopComponent(toolbar);

    tabFolder = new TabPanel();
    tabFolder.setTabScroll(true);
View Full Code Here

    toolbar.add(addDatabase);
    TextToolItem addCube = new TextToolItem("", "icon-cube");
    toolbar.add(addCube);
    TextToolItem addDimension = new TextToolItem("", "icon-dim");
    toolbar.add(addDimension);
    toolbar.add(new SeparatorToolItem());
    TextToolItem del = new TextToolItem("", "icon-delete");
    toolbar.add(del);
    navigator.setTopComponent(toolbar);
   
    //create the tree which displays the data:
View Full Code Here

      public final void handleEvent(ComponentEvent be) {
        doSave(null);
      }
    });
    toolbar.add(saveBtn);
    toolbar.add(new SeparatorToolItem());
    content.setTopComponent(toolbar);

    tabFolder = new TabPanel();
    tabFolder.setTabScroll(true);
View Full Code Here

        }
      });
      ComponentHelper.setParent(this, tb);
      if (sourceEditMode) {
        tb.add(sourceEdit = createToggleButton(g.getSource(), m.getSourceEditTipText(), m.getSourceEditTipTitle()));
        tb.add(new SeparatorToolItem());
      }

      if (getBasicFormatter() != null) {
        if (enableFont) {
          final ListBox fonts = new ListBox();
          fonts.addItem("");
          fonts.addItem("Arial");
          fonts.addItem("Times New Roman");
          fonts.addItem("Verdana");
          fonts.setItemSelected(0, true);
          fonts.addChangeHandler(new ChangeHandler() {

            public void onChange(ChangeEvent event) {
              int index = fonts.getSelectedIndex();
              if (index != 0) {
                getBasicFormatter().setFontName(fonts.getItemText(index));
              }
              fonts.setItemSelected(0, true);
            }
          });

          tb.add(new WidgetComponent(fonts));
          tb.add(new SeparatorToolItem());
        }
        if (enableFontSize) {
          tb.add(increasefontsize = createButton(g.getFontIncrease(), m.getIncreaseFontSizeTipText(),
              m.getIncreaseFontSizeTipTitle()));
          tb.add(decreasefontsize = createButton(g.getFontDecrease(), m.getDecreaseFontSizeTipText(),
              m.getDecreaseFontSizeTipTitle()));

          tb.add(new SeparatorToolItem());
        }
        if (enableFormat) {
          tb.add(bold = createToggleButton(g.getBold(), m.getBoldTipText(), m.getBoldTipTitle()));
          tb.add(italic = createToggleButton(g.getItalic(), m.getItalicTipText(), m.getItalicTipTitle()));
          tb.add(underline = createToggleButton(g.getUnderline(), m.getUnderlineTipText(), m.getUnderlineTipTitle()));
          tb.add(new SeparatorToolItem());
        }
        if (enableAlignments) {
          tb.add(justifyLeft = createButton(g.getJustifyLeft(), m.getJustifyLeftTipText(), m.getJustifyLeftTipTitle()));
          tb.add(justifyCenter = createButton(g.getJustifyCenter(), m.getJustifyCenterTipText(),
              m.getJustifyCenterTipTitle()));
          tb.add(justifyRight = createButton(g.getJustifyRight(), m.getJustifyRightTipText(),
              m.getJustifyRightTipTitle()));
          tb.add(new SeparatorToolItem());
        }
      }

      if (getExtendedFormatter() != null) {
        if (enableLists) {
          tb.add(ol = createButton(g.getOl(), m.getOlTipText(), m.getOlTipTitle()));
          tb.add(ul = createButton(g.getUl(), m.getUlTipText(), m.getUlTipTitle()));
          tb.add(new SeparatorToolItem());
        }
        if (enableLinks) {
          tb.add(link = createButton(g.getLink(), m.getLinkTipText(), m.getLinkTipTitle()));
          tb.add(new SeparatorToolItem());
        }
        if (enableColors) {
          tb.add(forecolor = createColorButton(g.getFontColor(), m.getForeColorTipText(), m.getForColorTipTitle(),
              new Listener<ComponentEvent>() {
                public void handleEvent(ComponentEvent be) {
View Full Code Here

      });
      matchMenu.add(deleteLink);
     
     
      // separator
      mb.add(new SeparatorToolItem());
     
      // Highlighting
      Button highlightingMenuHead = new Button("Highlighting");
      highlightingMenuHead.setIconStyle("icon-menu-highlightMenu");
      Menu highlightingMenu = new Menu();
     
      highlightingMenuHead.setMenu(highlightingMenu);
      mb.add(highlightingMenuHead)
     
      final MenuItem toggleHighlighting = new MenuItem();
      if(ClientState.showHighlighting){
        toggleHighlighting.setText("Deactivate Highlighting");
        toggleHighlighting.setIconStyle("icon-menu-highlightingActivated");
      } else {
        toggleHighlighting.setText("Activate Highlighting");
        toggleHighlighting.setIconStyle("icon-menu-highlightingDeactivated");
      }
     
      toggleHighlighting.addSelectionListener(new SelectionListener<MenuEvent>(){
        @Override
        public void componentSelected(MenuEvent ce) {
          ClientState.showHighlighting = !ClientState.showHighlighting;

          if(ClientState.showHighlighting)
            tabPanel.addStyleName("showHighlighting");
          else
            tabPanel.removeStyleName("showHighlighting");   
         
          // switch state
          if(ClientState.showHighlighting){
            toggleHighlighting.setText("Deactivate Highlighting");
            toggleHighlighting.setIconStyle("icon-menu-highlightingActivated");
          } else {
            toggleHighlighting.setText("Activate Highlighting");
            toggleHighlighting.setIconStyle("icon-menu-highlightingDeactivated");
          }
        }
      });
      highlightingMenu.add(toggleHighlighting);
     
      highlightingMenu.add(new SeparatorMenuItem());
     
      MenuItem highlightInSource = new MenuItem("Highlight in Source");
      highlightInSource.addSelectionListener(new SelectionListener<MenuEvent>(){
        @Override
        public void componentSelected(MenuEvent ce) {
          // find out which tab was selected
          TCLink link = tabLookup.get(tabPanel.getSelectedItem());
          Commands.getInstance().highlightSource(selectedPartsID, link.getCurrentDerivedId());
        }
      });
      highlightingMenu.add(highlightInSource);
     
      // separator
      mb.add(new SeparatorToolItem());
     
     
      // add more matches
      createFindMatchesMenu(mb, "Find Additional Matches", selectedPartsID);
     
View Full Code Here

    // cancel
    createCancelToolbarButton(mb, "Cancel", selectedPartsID);
   
    // separator
    mb.add(new SeparatorToolItem());
   
    // Proposal
    Button proposalMenuHead = new Button("Proposal");
    Menu proposalMenu = new Menu();
   
    proposalMenuHead.setMenu(proposalMenu);
    mb.add(proposalMenuHead);   
   
    MenuItem entireProposal = new MenuItem("Show Proposal");
    entireProposal.addSelectionListener(new SelectionListener<MenuEvent>(){
      @Override
      public void componentSelected(MenuEvent ce) {
        matchProp.showProposal();
      }
    });
    proposalMenu.add(entireProposal);

    MenuItem moreInformation = new MenuItem("More Information");
    moreInformation.setIconStyle("icon-menu-information");
    moreInformation.addSelectionListener(new SelectionListener<MenuEvent>(){
      @Override
      public void componentSelected(MenuEvent ce) {
        matchProp.displayInformation();       
      }
    });
    proposalMenu.add(moreInformation);
   
    MenuItem gotoStaticDisplay = new MenuItem("Goto static display");
    gotoStaticDisplay.setIconStyle("icon-menu-gotoStatic");
    gotoStaticDisplay.addSelectionListener(new SelectionListener<MenuEvent>(){
      @Override
      public void componentSelected(MenuEvent ce) {
        MatchProposal selectedProposal = matchProp.getSelectedMatchProposal();
        if(null == selectedProposal)
          Window.alert("Please select proposal");
        else
          Commands.getInstance().gotoStaticDisplay(selectedProposal.getId(), ClientUtils.DERIVED);
      }
    });
    proposalMenu.add(gotoStaticDisplay);

    proposalMenu.add(new SeparatorMenuItem());
   
    MenuItem addNote = new MenuItem("Add Note to Paragraph");
    addNote.setIconStyle("icon-menu-addNote");
    addNote.addSelectionListener(new SelectionListener<MenuEvent>(){

      @Override
      public void componentSelected(MenuEvent ce) {
        //
        MatchProposal selectedProposal = matchProp.getSelectedMatchProposal();
        if(null == selectedProposal)
          Window.alert("Please select proposal.");
        else {
          String id = selectedProposal.getId();
          new NotesPanel(id, TCNote.TYPE_PARAGRAPH, new NotePanelCallback<TCNote, Integer>(){
            public void callback(TCNote note, Integer type) {
              if(type == NotesPanel.NOTE_ADDED)
                matchProp.addNote(note);
            }
           });
        }
      }
    });
    proposalMenu.add(addNote);
   
    proposalMenu.add(new SeparatorMenuItem());
   
    MenuItem createLink = new MenuItem("Create Link");
    createLink.setIconStyle("icon-menu-createLink");
    createLink.addSelectionListener(new SelectionListener<MenuEvent>(){
      @Override
      public void componentSelected(MenuEvent ce) {
        MatchProposal selectedProposal = matchProp.getSelectedMatchProposal();
        if(null == selectedProposal)
          Window.alert("Please select proposal.");
        else if(selectedProposal.isMatched())
          Window.alert("The match has has already been established.");
        else
          Commands.getInstance().createLink(selectedPartsID, selectedProposal);
      }
    });
    proposalMenu.add(createLink);
   
    // sepearator
    mb.add(new SeparatorToolItem());
   
    // Highlighting
    Button highlightingMenuHead = new Button("Highlighting");
    highlightingMenuHead.setIconStyle("icon-menu-highlightMenu");
    Menu highlightingMenu = new Menu();
   
    highlightingMenuHead.setMenu(highlightingMenu);
    mb.add(highlightingMenuHead)
   
    final MenuItem toggleHighlighting = new MenuItem();
    if(ClientState.showHighlighting){
      toggleHighlighting.setText("Deactivate Highlighting");
      toggleHighlighting.setIconStyle("icon-menu-highlightingDeactivated");
    } else {
      toggleHighlighting.setText("Activate Highlighting");
      toggleHighlighting.setIconStyle("icon-menu-highlightingActivated");
    }
   
    toggleHighlighting.addSelectionListener(new SelectionListener<MenuEvent>(){
      @Override
      public void componentSelected(MenuEvent ce) {
        matchProp.toggleHighlighting();   
       
        // switch state
        if(ClientState.showHighlighting){
          toggleHighlighting.setText("Deactivate Highlighting");
          toggleHighlighting.setIconStyle("icon-menu-highlightingActivated");
        } else {
          toggleHighlighting.setText("Activate Highlighting");
          toggleHighlighting.setIconStyle("icon-menu-highlightingDeactivated");
        }
      }
    });
    highlightingMenu.add(toggleHighlighting);
   
    highlightingMenu.add(new SeparatorMenuItem());
   
    MenuItem highlightInSource = new MenuItem("Highlight Proposal in Source");
    highlightInSource.addSelectionListener(new SelectionListener<MenuEvent>(){
      @Override
      public void componentSelected(MenuEvent ce) {
        MatchProposal selectedProposal = matchProp.getSelectedMatchProposal();
        if(null == selectedProposal)
          Window.alert("Please select proposal");
        else
          Commands.getInstance().highlightSource(selectedPartsID, selectedProposal.getId());
      }
    });
    highlightingMenu.add(highlightInSource);

   
    // separator
    mb.add(new SeparatorToolItem());
   
    // more matches
    if(results.getType() == SearchResults.TYPE_PROPOSED){
      // propose matches
      final Button proposeMatch = new Button("Propose More Matches");
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem

Copyright © 2018 www.massapicom. 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.