Package com.sencha.gxt.widget.core.client.toolbar

Examples of com.sencha.gxt.widget.core.client.toolbar.SeparatorToolItem


          }
        }
      });

      toolBar.add(fonts);
      toolBar.add(new SeparatorToolItem());
    }

    if (enableFontSize) {
      fontIncrease = new TextButton();
      configureButton(fontIncrease, appearance.fontIncrease(), m.increaseFontSizeTipTitle(),
          m.increaseFontSizeTipText());
      fontIncrease.addSelectHandler(buttonHandler);
      toolBar.add(fontIncrease);

      fontDecrease = new TextButton();
      configureButton(fontDecrease, appearance.fontDecrease(), m.decreaseFontSizeTipTitle(),
          m.decreaseFontSizeTipText());
      fontDecrease.addSelectHandler(buttonHandler);
      toolBar.add(fontDecrease);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableFormat) {
      bold = new ToggleButton();
      configureButton(bold, appearance.bold(), m.boldTipTitle(), m.boldTipText());
      bold.addSelectHandler(buttonHandler);
      toolBar.add(bold);

      italic = new ToggleButton();
      configureButton(italic, appearance.italic(), m.italicTipTitle(), m.italicTipText());
      italic.addSelectHandler(buttonHandler);
      toolBar.add(italic);

      underline = new ToggleButton();
      configureButton(underline, appearance.underline(), m.underlineTipTitle(), m.underlineTipText());
      underline.addSelectHandler(buttonHandler);
      toolBar.add(underline);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableAlignments) {
      justifyLeft = new TextButton();
      configureButton(justifyLeft, appearance.justifyLeft(), m.justifyLeftTipTitle(), m.justifyLeftTipText());
      justifyLeft.addSelectHandler(buttonHandler);
      toolBar.add(justifyLeft);

      justifyCenter = new TextButton();
      configureButton(justifyCenter, appearance.justifyCenter(), m.justifyCenterTipTitle(), m.justifyCenterTipText());
      justifyCenter.addSelectHandler(buttonHandler);
      toolBar.add(justifyCenter);

      justifyRight = new TextButton();
      configureButton(justifyRight, appearance.justifyRight(), m.justifyRightTipTitle(), m.justifyRightTipText());
      justifyRight.addSelectHandler(buttonHandler);
      toolBar.add(justifyRight);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableLists) {
      ol = new TextButton();
      configureButton(ol, appearance.ol(), m.olTipTitle(), m.olTipText());
      ol.addSelectHandler(buttonHandler);
      toolBar.add(ol);

      ul = new TextButton();
      configureButton(ul, appearance.ul(), m.ulTipTitle(), m.ulTipText());
      ul.addSelectHandler(buttonHandler);
      toolBar.add(ul);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableLinks) {
      link = new TextButton();
      configureButton(link, appearance.link(), m.linkTipTitle(), m.linkTipText());
      link.addSelectHandler(buttonHandler);
      toolBar.add(link);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableColors) {
      fontColor = new TextButton();
      configureButton(fontColor, appearance.fontColor(), m.foreColorTipTitle(), m.foreColorTipText());
      ColorMenu menu = new ColorMenu();
      menu.getPalette().addValueChangeHandler(new ValueChangeHandler<String>() {

        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
          textArea.getFormatter().setForeColor(event.getValue());
        }
      });
      fontColor.setMenu(menu);

      toolBar.add(fontColor);

      fontHighlight = new TextButton();
      configureButton(fontHighlight, appearance.fontHighlight(), m.backColorTipTitle(), m.backColorTipText());

      menu = new ColorMenu();
      menu.getPalette().addValueChangeHandler(new ValueChangeHandler<String>() {
        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
          textArea.getFormatter().setBackColor(event.getValue());
        }
      });
      fontHighlight.setMenu(menu);

      toolBar.add(fontHighlight);
    }

    if (sourceEditMode) {
      toolBar.add(new SeparatorToolItem());
      sourceEdit = new ToggleButton();
      configureButton(sourceEdit, appearance.source(), m.sourceEditTipTitle(), m.sourceEditTipText());

      sourceEdit.addSelectHandler(new SelectHandler() {
        @Override
View Full Code Here


          }
        }
      });

      toolBar.add(fonts);
      toolBar.add(new SeparatorToolItem());
    }

    if (enableFontSize) {
      fontIncrease = new TextButton();
      configureButton(fontIncrease, appearance.fontIncrease(), m.increaseFontSizeTipTitle(),
          m.increaseFontSizeTipText());
      fontIncrease.addSelectHandler(buttonHandler);
      toolBar.add(fontIncrease);

      fontDecrease = new TextButton();
      configureButton(fontDecrease, appearance.fontDecrease(), m.decreaseFontSizeTipTitle(),
          m.decreaseFontSizeTipText());
      fontDecrease.addSelectHandler(buttonHandler);
      toolBar.add(fontDecrease);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableFormat) {
      bold = new ToggleButton();
      configureButton(bold, appearance.bold(), m.boldTipTitle(), m.boldTipText());
      bold.addSelectHandler(buttonHandler);
      toolBar.add(bold);

      italic = new ToggleButton();
      configureButton(italic, appearance.italic(), m.italicTipTitle(), m.italicTipText());
      italic.addSelectHandler(buttonHandler);
      toolBar.add(italic);

      underline = new ToggleButton();
      configureButton(underline, appearance.underline(), m.underlineTipTitle(), m.underlineTipText());
      underline.addSelectHandler(buttonHandler);
      toolBar.add(underline);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableAlignments) {
      justifyLeft = new TextButton();
      configureButton(justifyLeft, appearance.justifyLeft(), m.justifyLeftTipTitle(), m.justifyLeftTipText());
      justifyLeft.addSelectHandler(buttonHandler);
      toolBar.add(justifyLeft);

      justifyCenter = new TextButton();
      configureButton(justifyCenter, appearance.justifyCenter(), m.justifyCenterTipTitle(), m.justifyCenterTipText());
      justifyCenter.addSelectHandler(buttonHandler);
      toolBar.add(justifyCenter);

      justifyRight = new TextButton();
      configureButton(justifyRight, appearance.justifyRight(), m.justifyRightTipTitle(), m.justifyRightTipText());
      justifyRight.addSelectHandler(buttonHandler);
      toolBar.add(justifyRight);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableLists) {
      ol = new TextButton();
      configureButton(ol, appearance.ol(), m.olTipTitle(), m.olTipText());
      ol.addSelectHandler(buttonHandler);
      toolBar.add(ol);

      ul = new TextButton();
      configureButton(ul, appearance.ul(), m.ulTipTitle(), m.ulTipText());
      ul.addSelectHandler(buttonHandler);
      toolBar.add(ul);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableLinks) {
      link = new TextButton();
      configureButton(link, appearance.link(), m.linkTipTitle(), m.linkTipText());
      link.addSelectHandler(buttonHandler);
      toolBar.add(link);

      toolBar.add(new SeparatorToolItem());
    }

    if (enableColors) {
      fontColor = new TextButton();
      configureButton(fontColor, appearance.fontColor(), m.foreColorTipTitle(), m.foreColorTipText());
      final ColorMenu fontColorMenu = new ColorMenu();
      fontColorMenu.setFocusOnShow(false);
      fontColorMenu.getPalette().addValueChangeHandler(new ValueChangeHandler<String>() {

        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
          fontColorMenu.hide();
          textArea.getFormatter().setForeColor(event.getValue());
        }
      });

      fontColor.setMenu(fontColorMenu);

      toolBar.add(fontColor);

      fontHighlight = new TextButton();
      configureButton(fontHighlight, appearance.fontHighlight(), m.backColorTipTitle(), m.backColorTipText());

      final ColorMenu fontHighlightMenu = new ColorMenu();
      fontHighlightMenu.setFocusOnShow(false);
      fontHighlightMenu.getPalette().addValueChangeHandler(new ValueChangeHandler<String>() {
        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
          fontHighlightMenu.hide();
          textArea.getFormatter().setBackColor(event.getValue());
        }
      });
      fontHighlight.setMenu(fontHighlightMenu);

      toolBar.add(fontHighlight);
    }

    if (enableSourceEditMode) {
      toolBar.add(new SeparatorToolItem());
      sourceEdit = new ToggleButton();
      configureButton(sourceEdit, appearance.source(), m.sourceEditTipTitle(), m.sourceEditTipText());

      sourceEdit.addSelectHandler(new SelectHandler() {
        @Override
View Full Code Here

            }
          });

          ToolBar toolBar = new ToolBar();
          toolBar.add(toggleLive);
          toolBar.add(new SeparatorToolItem());
          toolBar.add(add);
          toolBar.add(fieldInput);
          toolBar.add(new SeparatorToolItem());
          toolBar.add(remove);
//          toolBar.add(box);

          VerticalLayoutContainer layout2 = new VerticalLayoutContainer();
View Full Code Here

  public ShellToolBar(){
    sync.addSelectHandler(syncHandler);
    add(run);
    add(selectRun);
    selectRun.disable();
    add(new SeparatorToolItem());
    add(sync);
    add(syncJump);
    add(new SeparatorToolItem());
    Menu menu=new Menu();
    menu.add(upload);
    extend.setMenu(menu);
    add(extend);
    add(new SeparatorToolItem());
    add(config);
  }
View Full Code Here

  public HiveToolBar(){
    sync.addSelectHandler(syncHandler);
    add(run);
    add(selectRun);
    selectRun.disable();
    add(new SeparatorToolItem());
    add(sync);
    add(syncJump);
    add(new SeparatorToolItem());
    Menu menu=new Menu();
    menu.add(upload);
    extend.setMenu(menu);
    add(extend);
    add(new SeparatorToolItem());
    add(config);
  }
View Full Code Here

        }
      });
      buttonConnectDisconnect.setIcon(DkMain.icons().connect_16());
      // Button disconnect

      connectSeparatorToolItem = new SeparatorToolItem();

      tb.add(connectSeparatorToolItem);
      tb.add(buttonConnectDisconnect);
    }
  }
View Full Code Here

TOP

Related Classes of com.sencha.gxt.widget.core.client.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.