Package com.google.gwt.dom.client

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


            root.getStyle().setProperty("position", "relative");
        }

        getElement().appendChild(root);

        Style style = clearElement.getStyle();
        style.setProperty("width", "0px");
        style.setProperty("height", "0px");
        style.setProperty("clear", "both");
        style.setProperty("overflow", "hidden");
        root.appendChild(clearElement);

    }
View Full Code Here


        // ApplicationConnection.getConsole().log("Spacing: " + activeSpacing);
        // Util.alert("Margins: " + activeMargins);
        root.removeChild(helper);

        // apply margin
        Style style = root.getStyle();
        style.setPropertyPx("marginLeft", activeMargins.getMarginLeft());
        style.setPropertyPx("marginRight", activeMargins.getMarginRight());
        style.setPropertyPx("marginTop", activeMargins.getMarginTop());
        style.setPropertyPx("marginBottom", activeMargins.getMarginBottom());

        return true;
    }
View Full Code Here

        containerDIV = Document.get().createDivElement();

        widgetDIV = Document.get().createDivElement();
        if (BrowserInfo.get().isFF2()) {
            Style style = widgetDIV.getStyle();
            // FF2 chokes on some floats very easily. Measuring size escpecially
            // becomes terribly slow
            TableElement tableEl = Document.get().createTableElement();
            tableEl.setInnerHTML("<tbody><tr><td><div></div></td></tr></tbody>");
            DivElement div = (DivElement) tableEl.getFirstChildElement()
View Full Code Here

                            zIndex = keyValue[1];
                        }
                    }
                }
                // ensure ne values
                Style style = getElement().getStyle();
                /*
                 * IE8 dies when nulling zIndex, even in IE7 mode. All other css
                 * properties (and even in older IE's) accept null values just
                 * fine. Assign empty string instead of null.
                 */
                if (zIndex != null) {
                    style.setProperty("zIndex", zIndex);
                } else {
                    style.setProperty("zIndex", "");
                }
                style.setProperty("top", top);
                style.setProperty("left", left);
                style.setProperty("right", right);
                style.setProperty("bottom", bottom);

                if (BrowserInfo.get().isIE6()) {
                    ie6Layout();
                }
            }
View Full Code Here

            updateCaptionPosition();
        }

        private void updateCaptionPosition() {
            if (caption != null) {
                Style style = caption.getElement().getStyle();
                style.setProperty("position", "absolute");
                style.setPropertyPx("left", getElement().getOffsetLeft());
                style.setPropertyPx("top", getElement().getOffsetTop()
                        - caption.getHeight());
            }
        }
View Full Code Here

        }

        private void ie6Layout() {
            // special handling for IE6 is needed, it does not support
            // setting both left/right or top/bottom
            Style style = getElement().getStyle();
            if (bottom != null && top != null) {
                // define height for wrapper to simulate bottom property
                int bottompixels = measureForIE6(bottom, true);
                VConsole.log("ALB" + bottompixels);
                int height = canvas.getOffsetHeight() - bottompixels
                        - getElement().getOffsetTop();
                VConsole.log("ALB" + height);
                if (height < 0) {
                    height = 0;
                }
                style.setPropertyPx("height", height);
            } else {
                // reset possibly existing value
                style.setProperty("height", "");
            }
            if (left != null && right != null) {
                // define width for wrapper to simulate right property
                int rightPixels = measureForIE6(right, false);
                VConsole.log("ALR" + rightPixels);
                int width = canvas.getOffsetWidth() - rightPixels
                        - getElement().getOffsetLeft();
                VConsole.log("ALR" + width);
                if (width < 0) {
                    width = 0;
                }
                style.setPropertyPx("width", width);
            } else {
                // reset possibly existing value
                style.setProperty("width", "");
            }
        }
View Full Code Here

     * Make element transparent
     *
     * @param target
     */
    private void setTransparent(Element target) {
        Style targetStyle = target.getStyle();
        targetStyle.setProperty("opacity", "0.3");
        targetStyle.setProperty("filter", "alpha(opacity=30)");
    }
View Full Code Here

     * Make element opaque
     *
     * @param target
     */
    private void removeTransparent(Element target) {
        Style targetStyle = target.getStyle();
        targetStyle.setProperty("opacity", "1");
        targetStyle.setProperty("filter", "alpha(opacity=100)");
    }
View Full Code Here

      final TextBox resultBox = new TextBox();
      resultBox.setEnabled(false);

      final String receiverName = "RandomNumberReceiver" + i;

      final Style resultStyle = resultBox.getElement().getStyle();

      /**
       * Create a callback receiver to receive the data from the server.
       */
      final MessageCallback receiver = new MessageCallback() {
        public void callback(Message message) {
          counter.increment();
          Double value = message.get(Double.class, "Data");
          resultBox.setText(String.valueOf(value));

          if (value > 0.5d) {
            resultStyle.setProperty("backgroundColor", "green");
          }
          else {
            resultStyle.setProperty("backgroundColor", "red");
          }
        }
      };

      /**
 
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

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.