Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.MenuItem


                setAttribute(element, finalClassName, "textDecoration", prior);
              }});
      }});
  }
  private MenuItem getItalicMenuItem() {
    return italicsMenuItem = italicsMenuItem != null ? italicsMenuItem : new MenuItem("<span style='font-style: italic;'>I</span>", true, new Command(){
      @Override
      public void execute() {
        final Element element = invokingElement;
        final String finalClassName = className;
        final String prior = DOM.getStyleAttribute(invokingElement, "fontWeight");
View Full Code Here


                setAttribute(element, finalClassName, "fontStyle", prior);
              }});
      }});
  }
  private MenuItem getBoldMenuItem() {
    return boldMenuItem = boldMenuItem != null ? boldMenuItem : new MenuItem("<span style='font-weight: bolder;'>B</span>", true, new Command(){
      @Override
      public void execute() {
        final Element element = invokingElement;
        final String finalClassName = className;
        final String prior = DOM.getStyleAttribute(invokingElement, "fontWeight");
View Full Code Here

                setAttribute(element, finalClassName, "fontWeight", prior);
              }});
      }});
  }
  private MenuItem getTextAlignRightMenuItem() {
    return textAlignRightMenuItem = textAlignRightMenuItem != null ? textAlignRightMenuItem : new MenuItem("<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAH0lEQVR42mNgGAXUBv/JxIPfxaNhOBqGIysMRwHpAADGwEe5v4tWjAAAAABJRU5ErkJggg=='>"
      , true, new Command(){
        @Override
        public void execute() {
          final Element element = invokingElement;
          final String finalClassName = className;
View Full Code Here

                  setAttribute(element, finalClassName, "textAlign", prior);
                }});
        }});
  }
  private MenuItem getTextAlignCenterMenuItem() {
    return textAlignCenterMenuItem = textAlignCenterMenuItem != null ? textAlignCenterMenuItem : new MenuItem("<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAH0lEQVR42mNgGAXUBv/JxIPXpaNhOBqGIzMMRwHpAAC130e5KyRN6AAAAABJRU5ErkJggg=='>"
      , true, new Command(){
        @Override
        public void execute() {
          final Element element = invokingElement;
          final String finalClassName = className;
View Full Code Here

                }});
        }});
  }
  private MenuItem getTextAlignLeftMenuItem() {
   
    return textAlignLeftMenuItem = textAlignLeftMenuItem != null ? textAlignLeftMenuItem : new MenuItem("<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAH0lEQVR42mNgGAXUBv/JxIPPhaNhOBqGIzsMRwHpAACk/ke5B2guPwAAAABJRU5ErkJggg=='>"
        , true, new Command(){
          @Override
          public void execute() {
            final Element element = invokingElement;
            final String finalClassName = className;
View Full Code Here

                  }});
          }});
  }
  private MenuItem getStyleDialogMenuItem(final StyleMenu styleMenu) {
    if(styleDialogMenuItem == null) {
      styleDialogMenuItem = new MenuItem("SM", (Command)null);
      styleMenu.addDomHandler(new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
          if(event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE)
            stylePickerPopPanel.hide();
View Full Code Here

    return styleDialogMenuItem;
  }
  private MenuItem getBorderEdgePickerMenuItem() {
    if(borderEdgePickerMenuItem == null) {
      MenuBar borderEdgeMenu = new MenuBar(true);
      borderEdgePickerMenuItem = new MenuItem("BE", true, borderEdgeMenu);
      borderEdgeMenu.addItem("<div style='width: 10px; height: 10px; border-top: solid 1px black; border-left: solid 1px #DDDDDD; border-right: solid 1px #DDDDDD; border-bottom: solid 1px #DDDDDD;'></div>"
      , true, setBorderEdge("Top"));
      borderEdgeMenu.addItem("<div style='width: 10px; height: 10px; border-top: solid 1px #DDDDDD; border-left: solid 1px black; border-right: solid 1px #DDDDDD; border-bottom: solid 1px #DDDDDD;'></div>"
      , true, setBorderEdge("Left"));
      borderEdgeMenu.addItem("<div style='width: 10px; height: 10px; border-top: solid 1px #DDDDDD; border-left: solid 1px #DDDDDD; border-right: solid 1px black; border-bottom: solid 1px #DDDDDD;'></div>"
View Full Code Here

      }};
  }
  private MenuItem getBorderWidthPickerMenuItem() {
    if(borderWidthPickerMenuItem == null) {
      MenuBar borderWidthMenu = new MenuBar(true);
      borderWidthPickerMenuItem = new MenuItem("BW", true, borderWidthMenu);
      borderWidthMenu.addItem("<div style='width: 40px; border-top: solid 1px black'></div>", true, setBorderWidth(1));
      borderWidthMenu.addItem("<div style='width: 40px; border-top: solid 2px black'></div>", true, setBorderWidth(2));
      borderWidthMenu.addItem("<div style='width: 40px; border-top: solid 3px black'></div>", true, setBorderWidth(3));
      borderWidthMenu.addItem("<div style='width: 40px; border-top: solid 4px black'></div>", true, setBorderWidth(4));
      borderWidthMenu.addItem("<div style='width: 40px; border-top: solid 5px black'></div>", true, setBorderWidth(5));
View Full Code Here

              }});
      }};
  }
  private MenuItem getBorderColorPickerMenuItem() {
    if(borderColorPickerMenuItem == null) {
      borderColorPickerMenuItem = new MenuItem("BC", true, (Command)null);
      final PopupPanel borderPickerPopPanel = new PopupPanel(true);
      borderPickerPopPanel.setAutoHideEnabled(true);
      borderColorPickerMenuItem.setCommand(new Command(){
        @Override
        public void execute() {
View Full Code Here

    }
    return borderColorPickerMenuItem;
  }
  private MenuItem getBgColorPickerMenuItem() {
    if(bgColorPickerMenuItem == null) {
      bgColorPickerMenuItem = new MenuItem("<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAANUlEQVR42mNgGAW0Av+JxNjB39/s/5ExSDE6H5sYFn10MhCbBdgMGDVw1EBqGkhGFhwFNAQAQy76sGFjx7gAAAAASUVORK5CYII='>"
      , true, (Command)null);
      final PopupPanel bgPickerPopPanel = new PopupPanel(true);
      bgPickerPopPanel.setAutoHideEnabled(true);
     
      bgColorPickerMenuItem.setCommand(new Command(){
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.MenuItem

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.