Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.Style


    parent.getStyle().setPosition(Position.RELATIVE);
    parent.appendChild(relativeRuler = createRuler(EM, EX));
  }

  public void layout(Layer layer) {
    Style style = layer.container.getStyle();

    style.setProperty("left", layer.setLeft
        ? (layer.left + layer.leftUnit.getType()) : "");
    style.setProperty("top", layer.setTop
        ? (layer.top + layer.topUnit.getType()) : "");
    style.setProperty("right", layer.setRight
        ? (layer.right + layer.rightUnit.getType()) : "");
    style.setProperty("bottom", layer.setBottom
        ? (layer.bottom + layer.bottomUnit.getType()) : "");
    style.setProperty("width", layer.setWidth
        ? (layer.width + layer.widthUnit.getType()) : "");
    style.setProperty("height", layer.setHeight
        ? (layer.height + layer.heightUnit.getType()) : "");

    style = layer.child.getStyle();
    switch (layer.hPos) {
      case BEGIN:
        style.clearLeft();
        break;
      case END:
        style.clearLeft();
        style.setRight(0, Unit.PX);
        break;
      case STRETCH:
        style.setLeft(0, Unit.PX);
        style.setRight(0, Unit.PX);
        break;
    }

    switch (layer.vPos) {
      case BEGIN:
        style.clearTop();
        break;
      case END:
        style.clearTop();
        style.setBottom(0, Unit.PX);
        break;
      case STRETCH:
        style.setTop(0, Unit.PX);
        style.setBottom(0, Unit.PX);
        break;
    }
  }
View Full Code Here


    if (child.getParentElement() == container) {
      child.removeFromParent();
    }

    // Cleanup child styles set by fillParent().
    Style style = child.getStyle();
    style.clearPosition();
    style.clearLeft();
    style.clearTop();
    style.clearWidth();
    style.clearHeight();
  }
View Full Code Here

 
    /**
     * initialize the style of the block ui element
     */
    private void initElementStyles() {
        Style style;
       
        blockUiElement = this.getElement();
        blockUiBackgroundElement = pnlBlockUiBackground.getElement();
       
        style = blockUiElement.getStyle();
View Full Code Here

     */
    public static void glass() {
        if (glass == null) {
            glass = Document.get().createDivElement();

            Style style = glass.getStyle();
            style.setPosition(Style.Position.ABSOLUTE);
            style.setLeft(0, Style.Unit.PX);
            style.setTop(0, Style.Unit.PX);
            style.setRight(0, Style.Unit.PX);
            style.setBottom(0, Style.Unit.PX);
            style.setZIndex(2147483647); // Maximum z-index
        }
       
        Document.get().getBody().appendChild(glass);
    }
View Full Code Here

    /**
     * Block the entire client window with the given color and opacity of
     * background
     */
    public void blockAllDefault() {
        Style style = instance.blockUiElement.getStyle();
       
        style.setTop(0, Style.Unit.PX);
        style.setLeft(0, Style.Unit.PX);
       
        style = blockUiBackgroundElement.getStyle();
       
        style.setBackgroundColor(backgroundColor);
        style.setOpacity(backgroundOpacity);
       
        setHeight("100%");
        setWidth("100%");
        setVisible(true);
    }
View Full Code Here

      titleBar.add(buttonPanel);
      titleBar.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_RIGHT);

      panel.add(titleBar);

      Style s = panel.getElement().getStyle();

      s.setProperty("border", "1px");
      s.setProperty("borderStyle", "solid");
      s.setProperty("borderColor", "black");
      s.setProperty("backgroundColor", "#ede0c3");

      resize();

      panel.add(contentPanel);
      add(panel);
View Full Code Here

      titleBar.add(buttonPanel);
      titleBar.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_RIGHT);

      panel.add(titleBar);

      Style s = panel.getElement().getStyle();

      s.setProperty("border", "1px");
      s.setProperty("borderStyle", "solid");
      s.setProperty("borderColor", "black");
      s.setProperty("backgroundColor", "#ede0c3");

      resize();

      panel.add(contentPanel);
      add(panel);
View Full Code Here

        cancelButton.addClickHandler(cancelListener);
        buttonPanel.add(cancelButton);

        innerContainer.add(buttonPanel);

        Style s = message.getElement().getStyle();
        s.setProperty("padding", "8px");
        s.setProperty("verticalAlign", "top");

        window.add(hPanel);
    }
View Full Code Here

  
   public void addIcon(ImageResource icon)
   {
      Image iconImage = new Image(icon);
      wrapper_.insert(iconImage, 0);
      Style imageStyle = iconImage.getElement().getStyle();
      imageStyle.setVerticalAlign(VerticalAlign.MIDDLE);
      imageStyle.setMarginRight(5, Unit.PX);
      imageStyle.setMarginBottom(2, Unit.PX);
   }
View Full Code Here

      outerPanel_.getElement().getStyle().setPosition(Position.RELATIVE);
     
      // large logo
      logoLarge_ = new Image(ThemeResources.INSTANCE.rstudio());
      ((ImageElement)logoLarge_.getElement().cast()).setAlt("RStudio");
      Style style = logoLarge_.getElement().getStyle();
      style.setPosition(Position.ABSOLUTE);
      style.setTop(5, Unit.PX);
      style.setLeft(18, Unit.PX);
     
      // small logo
      logoSmall_ = new Image(ThemeResources.INSTANCE.rstudio_small());
      ((ImageElement)logoSmall_.getElement().cast()).setAlt("RStudio");
      style = logoSmall_.getElement().getStyle();
      style.setPosition(Position.ABSOLUTE);
      style.setTop(5, Unit.PX);
      style.setLeft(18, Unit.PX);

      // header container
      headerBarPanel_ = new HorizontalPanel() ;
      headerBarPanel_.setStylePrimaryName(themeResources.themeStyles().header());
      headerBarPanel_.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.Style

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.