/** Create a progress bar */
 public ProgressWidget() {
   PROGRESS_RESOURCES.css().ensureInjected();
   bar.setClassName(PROGRESS_RESOURCES.css().bar());
   groove.setClassName(PROGRESS_RESOURCES.css().groove());
   element.appendChild(bar);
   element.appendChild(groove);
   setElement(element);
   setValue(0.0);
 }
Esempio n. 2
0
  private DivElement addPanel(String styleName, int halign, int valign) {
    DivElement div = Document.get().createDivElement();
    div.setClassName(styleName);

    Style style = div.getStyle();
    style.setPosition(Style.Position.ABSOLUTE);

    switch (halign) {
      case LEFT:
        style.setPropertyPx("left", 0);
        style.setPropertyPx("width", 10);
        break;
      case CENTER:
        style.setPropertyPx("left", 10);
        style.setPropertyPx("right", 10);
        break;
      case RIGHT:
        style.setPropertyPx("right", 0);
        style.setPropertyPx("width", 10);
        break;
    }
    switch (valign) {
      case TOP:
        style.setPropertyPx("top", 0);
        style.setPropertyPx("height", 26);
        break;
      case MIDDLE:
        style.setPropertyPx("top", 26);
        style.setPropertyPx("bottom", 26);
        break;
      case BOTTOM:
        style.setPropertyPx("bottom", 0);
        style.setPropertyPx("height", 26);
    }

    layout_.getElement().appendChild(div);
    return div;
  }
Esempio n. 3
0
 public VPopupButton() {
   super();
   DivElement e = Document.get().createDivElement();
   e.setClassName(POPUP_INDICATOR_CLASSNAME);
   getElement().getFirstChildElement().appendChild(e);
 }