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

Examples of com.extjs.gxt.ui.client.widget.button.IconButton


      });

      monthBtn.render(el().selectNode(".x-date-middle").dom);
      monthBtn.el().child("tr").addStyleName("x-btn-with-menu");

      prevBtn = new IconButton("x-date-left-icon", new SelectionListener<ComponentEvent>() {
        public void componentSelected(ComponentEvent ce) {
          showPrevMonth();
        }
      });
      prevBtn.setToolTip(pt);
      prevBtn.render(el().selectNode(".x-date-left").dom);

      nextBtn = new IconButton("x-date-right-icon", new SelectionListener<ComponentEvent>() {
        public void componentSelected(ComponentEvent ce) {
          showNextMonth();
        }
      });
      nextBtn.setToolTip(nt);
View Full Code Here


    super.onRender(target, index);
    setElement(DOM.createDiv(), target, index);
    addStyleName("x-small-editor");
    el().makePositionable();

    iconBtn = new IconButton();
    iconBtn.setVisible(false);
    iconBtn.setStyleAttribute("position", "absolute");
    iconBtn.setStyleAttribute("marginLeft", "0px");
    iconBtn.setWidth(20);
    iconBtn.render(el().dom);
View Full Code Here

    getInputEl().addStyleName(invalidStyle);
    msg = msg == null ? getMessages().getInvalidText() : msg;

    if (messageTarget.equals("side")) {
      if (errorIcon == null) {
        errorIcon = new IconButton("x-form-invalid-icon");
        Element p = el().getParent().dom;
        errorIcon.render(p);
        errorIcon.removeStyleName("x-tool");
        errorIcon.el().setVisibility(true);
      }
View Full Code Here

    if (!GXT.isIE) {
      item.el().setTabIndex(0);
    }

    if (checkable) {
      item.checkBtn = new IconButton("my-list-notchecked");
      El e = item.el().selectNode(".my-list-item-icon");
      e.removeChildren();
      e.setVisible(true);
      item.checkBtn.render(e.dom);
View Full Code Here

      monthBtn.setToolTip(getMessages().getMonthYearText());
      monthBtn.render(el().selectNode(".x-date-middle").dom);
      monthBtn.el().child("em").addStyleName("x-btn-arrow");

      prevBtn = new IconButton("x-date-left-icon", new SelectionListener<IconButtonEvent>() {
        public void componentSelected(IconButtonEvent ce) {
          showPrevMonth();
        }
      });
      prevBtn.setToolTip(messages.getPrevText());
      prevBtn.render(el().selectNode(".x-date-left").dom);

      nextBtn = new IconButton("x-date-right-icon", new SelectionListener<IconButtonEvent>() {
        public void componentSelected(IconButtonEvent ce) {
          showNextMonth();
        }
      });
      nextBtn.setToolTip(messages.getNextText());
View Full Code Here

    if (!GXT.isIE) {
      item.el().setTabIndex(0);
    }

    if (checkable) {
      item.checkBtn = new IconButton("my-list-notchecked");
      El e = item.el().selectNode(".my-list-item-icon");
      e.removeChildren();
      e.setVisible(true);
      item.checkBtn.render(e.dom);
View Full Code Here

    getInputEl().addStyleName(invalidStyle);
    msg = msg == null ? getMessages().getInvalidText() : msg;

    if (messageTarget.equals("side")) {
      if (errorIcon == null) {
        errorIcon = new IconButton("x-form-invalid-icon");
        Element p = el().getParent().dom;
        errorIcon.render(p);
        errorIcon.removeStyleName("x-tool");
        errorIcon.el().setVisibility(true);
      }
View Full Code Here

    super.onRender(target, index);
    setElement(DOM.createDiv(), target, index);
    addStyleName("x-small-editor");
    el().makePositionable();

    iconBtn = new IconButton();
    iconBtn.setVisible(false);
    iconBtn.setStyleAttribute("cursor", "default");
    iconBtn.setStyleAttribute("position", "absolute");
    iconBtn.setStyleAttribute("marginLeft", "0px");
    iconBtn.setWidth(20);
View Full Code Here

      });

      monthBtn.render(el().selectNode(".x-date-middle").dom);
      monthBtn.el().child("tr").addStyleName("x-btn-with-menu");

      prevBtn = new IconButton("x-date-left-icon", new SelectionListener<ComponentEvent>() {
        public void componentSelected(ComponentEvent ce) {
          showPrevMonth();
        }
      });
      prevBtn.setToolTip(pt);
      prevBtn.render(el().selectNode(".x-date-left").dom);

      nextBtn = new IconButton("x-date-right-icon", new SelectionListener<ComponentEvent>() {
        public void componentSelected(ComponentEvent ce) {
          showNextMonth();
        }
      });
      nextBtn.setToolTip(nt);
View Full Code Here

        tip = GXT.MESSAGES.listField_moveSelectedUp();
      } else {
        tip = getMessages().getMoveUp();
      }

      IconButton up = new IconButton("arrow-up");
      up.setHeight(18);
      up.setToolTip(tip);
      up.addListener(Events.Select, new Listener<ComponentEvent>() {
        public void handleEvent(ComponentEvent be) {
          toField.getListView().moveSelectedUp();
        }
      });
      buttonBar.add(up);
    }

    String tip = "";
    if (getMessages().getAddAll() == null) {
      tip = GXT.MESSAGES.listField_addAll();
    } else {
      tip = getMessages().getAddAll();
    }

    IconButton allRight = new IconButton("arrow-double-right");
    allRight.setHeight(18);
    allRight.setToolTip(tip);
    allRight.addListener(Events.Select, new Listener<ComponentEvent>() {
      public void handleEvent(ComponentEvent be) {
        List<D> sel = fromField.getStore().getModels();
        toField.getStore().add(sel);
        fromField.getStore().removeAll();
      }
    });
    buttonBar.add(allRight);

    tip = "";
    if (getMessages().getAddSelected() == null) {
      tip = GXT.MESSAGES.listField_addSelected();
    } else {
      tip = getMessages().getAddSelected();
    }

    IconButton right = new IconButton("arrow-right");
    right.setHeight(18);
    right.setToolTip(tip);
    right.addListener(Events.Select, new Listener<ComponentEvent>() {
      public void handleEvent(ComponentEvent be) {
        List<D> sel = fromField.getSelection();
        for (D model : sel) {
          fromField.getStore().remove(model);
        }
        toField.getStore().add(sel);
        select(toField, sel);
      }
    });

    tip = "";
    if (getMessages().getRemoveSelected() == null) {
      tip = GXT.MESSAGES.listField_removeSelected();
    } else {
      tip = getMessages().getRemoveSelected();
    }

    IconButton left = new IconButton("arrow-left");
    left.setHeight(18);
    left.setToolTip(tip);
    left.addListener(Events.Select, new Listener<ComponentEvent>() {
      public void handleEvent(ComponentEvent be) {
        List<D> sel = toField.getSelection();
        for (D model : sel) {
          toField.getStore().remove(model);
        }
        fromField.getStore().add(sel);
        select(fromField, sel);
      }
    });

    buttonBar.add(right);
    buttonBar.add(left);

    tip = "";
    if (getMessages().getRemoveAll() == null) {
      tip = GXT.MESSAGES.listField_removeAll();
    } else {
      tip = getMessages().getRemoveAll();
    }

    IconButton allLeft = new IconButton("arrow-double-left");
    allLeft.setHeight(18);
    allLeft.setToolTip(tip);
    allLeft.addListener(Events.Select, new Listener<ComponentEvent>() {
      public void handleEvent(ComponentEvent be) {
        List<D> sel = toField.getStore().getModels();
        fromField.getStore().add(sel);
        toField.getStore().removeAll();
      }
    });
    buttonBar.add(allLeft);

    if (mode == Mode.INSERT) {
      tip = "";
      if (getMessages().getMoveDown() == null) {
        tip = GXT.MESSAGES.listField_moveSelectedDown();
      } else {
        tip = getMessages().getMoveDown();
      }

      IconButton down = new IconButton("arrow-down");
      down.setHeight(18);
      down.setToolTip(tip);
      down.addListener(Events.Select, new Listener<ComponentEvent>() {
        public void handleEvent(ComponentEvent be) {
          toField.getListView().moveSelectedDown();
        }
      });
      buttonBar.add(down);
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.button.IconButton

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.