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

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


    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


        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

      });

      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

      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

    return toField;
  }

  protected void initButtons() {
    if (mode == Mode.INSERT) {
      up = new IconButton("arrow-up");
      configureButton(up, getMessages().getMoveUp(), GXT.MESSAGES.listField_moveSelectedUp());
      up.addListener(Events.Select, new Listener<IconButtonEvent>() {
        public void handleEvent(IconButtonEvent be) {
          onButtonUp(be);
        }
      });
      buttonBar.add(up);
    }

    allRight = new IconButton("arrow-double-right");
    configureButton(allRight, getMessages().getAddAll(), GXT.MESSAGES.listField_addAll());
    allRight.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonAllRight(be);
      }
    });
    buttonBar.add(allRight);

    right = new IconButton("arrow-right");
    configureButton(right, getMessages().getAddSelected(), GXT.MESSAGES.listField_addSelected());
    right.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonRight(be);
      }
    });

    left = new IconButton("arrow-left");
    configureButton(left, getMessages().getRemoveSelected(), GXT.MESSAGES.listField_removeSelected());
    left.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonLeft(be);
      }
    });

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

    allLeft = new IconButton("arrow-double-left");
    configureButton(allLeft, getMessages().getRemoveAll(), GXT.MESSAGES.listField_removeAll());
    allLeft.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonAllLeft(be);
      }
    });
    buttonBar.add(allLeft);

    if (mode == Mode.INSERT) {
      down = new IconButton("arrow-down");
      configureButton(down, getMessages().getMoveDown(), GXT.MESSAGES.listField_moveSelectedDown());
      down.addListener(Events.Select, new Listener<IconButtonEvent>() {
        public void handleEvent(IconButtonEvent be) {
          onButtonDown(be);
        }
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

    return toField;
  }

  protected void initButtons() {
    if (mode == Mode.INSERT) {
      up = new IconButton("arrow-up");
      configureButton(up, getMessages().getMoveUp(), GXT.MESSAGES.listField_moveSelectedUp());
      up.addListener(Events.Select, new Listener<IconButtonEvent>() {
        public void handleEvent(IconButtonEvent be) {
          onButtonUp(be);
        }
      });
      buttonBar.add(up);
    }

    allRight = new IconButton("arrow-double-right");
    configureButton(allRight, getMessages().getAddAll(), GXT.MESSAGES.listField_addAll());
    allRight.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonAllRight(be);
      }
    });
    buttonBar.add(allRight);

    right = new IconButton("arrow-right");
    configureButton(right, getMessages().getAddSelected(), GXT.MESSAGES.listField_addSelected());
    right.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonRight(be);
      }
    });

    left = new IconButton("arrow-left");
    configureButton(left, getMessages().getRemoveSelected(), GXT.MESSAGES.listField_removeSelected());
    left.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonLeft(be);
      }
    });

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

    allLeft = new IconButton("arrow-double-left");
    configureButton(allLeft, getMessages().getRemoveAll(), GXT.MESSAGES.listField_removeAll());
    allLeft.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonAllLeft(be);
      }
    });
    buttonBar.add(allLeft);

    if (mode == Mode.INSERT) {
      down = new IconButton("arrow-down");
      configureButton(down, getMessages().getMoveDown(), GXT.MESSAGES.listField_moveSelectedDown());
      down.addListener(Events.Select, new Listener<IconButtonEvent>() {
        public void handleEvent(IconButtonEvent be) {
          onButtonDown(be);
        }
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

    return toField;
  }

  protected void initButtons() {
    if (mode == Mode.INSERT) {
      up = new IconButton("arrow-up");
      configureButton(up, getMessages().getMoveUp(), GXT.MESSAGES.listField_moveSelectedUp());
      up.addListener(Events.Select, new Listener<IconButtonEvent>() {
        public void handleEvent(IconButtonEvent be) {
          onButtonUp(be);
        }
      });
      buttonBar.add(up);
    }

    allRight = new IconButton("arrow-double-right");
    configureButton(allRight, getMessages().getAddAll(), GXT.MESSAGES.listField_addAll());
    allRight.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonAllRight(be);
      }
    });
    buttonBar.add(allRight);

    right = new IconButton("arrow-right");
    configureButton(right, getMessages().getAddSelected(), GXT.MESSAGES.listField_addSelected());
    right.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonRight(be);
      }
    });

    left = new IconButton("arrow-left");
    configureButton(left, getMessages().getRemoveSelected(), GXT.MESSAGES.listField_removeSelected());
    left.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonLeft(be);
      }
    });

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

    allLeft = new IconButton("arrow-double-left");
    configureButton(allLeft, getMessages().getRemoveAll(), GXT.MESSAGES.listField_removeAll());
    allLeft.addListener(Events.Select, new Listener<IconButtonEvent>() {
      public void handleEvent(IconButtonEvent be) {
        onButtonAllLeft(be);
      }
    });
    buttonBar.add(allLeft);

    if (mode == Mode.INSERT) {
      down = new IconButton("arrow-down");
      configureButton(down, getMessages().getMoveDown(), GXT.MESSAGES.listField_moveSelectedDown());
      down.addListener(Events.Select, new Listener<IconButtonEvent>() {
        public void handleEvent(IconButtonEvent be) {
          onButtonDown(be);
        }
View Full Code Here

  protected Html text;

  public StatusBar() {
    baseStyle = "x-status";

    waitBtn = new IconButton("icon-wait");
    waitBtn.setData("width", "25px");
    waitBtn.setSize(17, 17);
    waitBtn.setStyleAttribute("cursor", "default");
    waitBtn.setStyleAttribute("marginRight", "5px");
    waitBtn.setVisible(false);
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.