Package com.extjs.gxt.ui.client.core

Examples of com.extjs.gxt.ui.client.core.El


  protected void createFileInput() {
    if (file != null) {
      el().removeChild(file.dom);
    }
    file = new El((Element) Document.get().createFileInputElement().cast());
    file.addEventsSunk(Event.ONCHANGE | Event.FOCUSEVENTS);
    file.setId(XDOM.getUniqueId());
    file.addStyleName("x-form-file");
    file.setTabIndex(-1);
    ((InputElement) file.dom.cast()).setName(name);
View Full Code Here


    focusPreview.add();
  }

  @Override
  protected void onRender(Element target, int index) {
    El wrap = new El(DOM.createDiv());
    wrap.addStyleName("x-form-field-wrap");
    wrap.addStyleName("x-form-file-wrap");

    input = new El(DOM.createInputText());
    input.addStyleName(fieldStyle);
    input.addStyleName("x-form-file-text");
    input.setId(XDOM.getUniqueId());
    if (GXT.isAriaEnabled()) {
      input.setTitle("File upload field");
    }

    if (GXT.isIE && target.getTagName().equals("TD")) {
      input.setStyleAttribute("position", "static");
    }

    wrap.appendChild(input.dom);

    setElement(wrap.dom, target, index);

    button = new Button(getMessages().getBrowseText());
    button.getFocusSupport().setIgnore(true);
View Full Code Here

        return;
      }
    }

    for (int i = 0; i < elements.getLength(); i++) {
      El el = El.fly(elements.getItem(i));
      el.removeStyleName("x-color-palette-sel");
      el.removeStyleName("x-color-palette-hover");
    }

    if (!color.equals(value) || allowReselect) {
      El a = el().child("a.color-" + color);
      a.addStyleName("x-color-palette-sel");
      getElement().setAttribute("aria-activedescendant", a.getId());

      value = color;
      if (!suppressEvent) {
        fireEvent(Events.Select, ce);
      }
View Full Code Here

  }

  protected void onClick(ComponentEvent ce) {
    ce.preventDefault();
    if (!disabled) {
      El target = ce.getTarget("a", 3);
      if (target != null) {
        String className = target.getStyleName();
        if (className.indexOf("color-") != -1) {
          select(className.substring(className.indexOf("color-") + 6, className.indexOf("color-") + 12));
        }
      }
    }
View Full Code Here

      }
    }
  }

  protected void onMouseOut(ComponentEvent ce) {
    El target = ce.getTarget("a", 3);
    if (target != null) {
      target.removeStyleName("x-color-palette-hover");
    }
  }
View Full Code Here

      target.removeStyleName("x-color-palette-hover");
    }
  }

  protected void onMouseOver(ComponentEvent ce) {
    El target = ce.getTarget("a", 3);
    if (target != null) {
      target.addStyleName("x-color-palette-hover");
    }
  }
View Full Code Here

  protected void onRender(Element target, int index) {
    setElement(DOM.createDiv(), target, index);
    addStyleName("x-html-editor-wrap");
    rte = new rte();

    textarea = new El(DOM.createTextArea());
    textarea.addStyleName("x-hidden");
    textarea.addStyleName("x-form-textarea");
    textarea.addStyleName("x-form-field");
    textarea.setStyleAttribute("border", "0 none");
    el().appendChild(textarea.dom);
View Full Code Here

   * @param icon the icon
   */
  public void setIcon(AbstractImagePrototype icon) {
    this.icon = icon;
    if (rendered) {
      El oldIcon = el().selectNode(".x-menu-item-icon");
      if (oldIcon != null) {
        oldIcon.remove();
      }
      if (icon != null) {
        Element e = icon.createElement().cast();
        El.fly(e).addStyleName("x-menu-item-icon");
        el().insertChild(e, 0);
View Full Code Here

    monthPicker.setVisible(false);
  }

  protected void onClick(ComponentEvent be) {
    be.preventDefault();
    El target = be.getTargetEl();
    El pn = null;
    String cls = target.getStyleName();
    if (cls.equals("x-date-left-a")) {
      showPrevMonth();
    } else if (cls.equals("x-date-right-a")) {
      showNextMonth();
    }
    if ((pn = target.findParent("td.x-date-mp-month", 2)) != null) {
      mpMonths.removeStyleName("x-date-mp-sel");
      El elem = target.findParent("td.x-date-mp-month", 2);
      elem.addStyleName("x-date-mp-sel");
      mpSelMonth = pn.dom.getPropertyInt("xmonth");
    } else if ((pn = target.findParent("td.x-date-mp-year", 2)) != null) {
      mpYears.removeStyleName("x-date-mp-sel");
      El elem = target.findParent("td.x-date-mp-year", 2);
      elem.addStyleName("x-date-mp-sel");
      mpSelYear = pn.dom.getPropertyInt("xyear");
    } else if (target.is("button.x-date-mp-ok")) {
      DateWrapper d = new DateWrapper(mpSelYear, mpSelMonth, 1);
      update(d);
      hideMonthPicker();
View Full Code Here

    }
  }

  protected void onDayClick(ComponentEvent ce) {
    ce.preventDefault();
    El target = ce.getTargetEl();
    El e = target.findParent("a", 5);
    if (e != null) {
      String dt = e.dom.getPropertyString("dateValue");
      if (dt != null) {
        handleDateClick(e, dt);
        return;
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.core.El

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.