congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Element.getStyle
Code IndexAdd Tabnine to your IDE (free)

How to use
getStyle
method
in
com.google.gwt.user.client.Element

Best Java code snippets using com.google.gwt.user.client.Element.getStyle (Showing top 20 results out of 1,494)

Refine searchRefine arrow

  • Style.setProperty
origin: kaaproject/kaa

private void updateImageElementFromImageResource(Element imageSpan,
                         ImageResource res,
                         int spacing) {
 SafeUri url = res.getSafeUri();
 int width = res.getWidth();
 int height = res.getHeight();
 int paddingRight = width + spacing;
 String style = "url(\"" + url.asString() + "\") no-repeat scroll left center";
 imageSpan.getStyle().setProperty("background", style);
 imageSpan.getStyle().setPropertyPx("width", width);
 imageSpan.getStyle().setPropertyPx("height", height);
 imageSpan.getStyle().setPropertyPx("paddingRight", paddingRight);
}
origin: kaaproject/kaa

messageLabel.getElement().getStyle().setWhiteSpace(WhiteSpace.PRE_WRAP);
messageLabel.getElement().getStyle().setProperty("maxHeight", "400px");
messageLabel.getElement().getStyle()
  .setProperty("maxWidth", Window.getClientWidth() * 2 / 3 + "px");
messageLabel.getElement().getStyle().setOverflowY(Overflow.AUTO);
messageLabel.setMessage(message);
dialogContents.add(messageLabel);
origin: com.google.gwt/gwt-servlet

/**
 * @deprecated Call and override {@link #setCellVerticalAlignment(Element,
 *             VerticalAlignmentConstant)} instead.
 */
@Deprecated
protected void setCellVerticalAlignment(com.google.gwt.user.client.Element td,
  VerticalAlignmentConstant align) {
 td.getStyle().setProperty("verticalAlign", align.getVerticalAlignString());
}
origin: com.google.gwt/gwt-servlet

/**
 * Creates an empty absolute panel.
 */
public AbsolutePanel() {
 this(DOM.createDiv());
 // Setting the panel's position style to 'relative' causes it to be treated
 // as a new positioning context for its children.
 getElement().getStyle().setProperty("position", "relative");
 getElement().getStyle().setProperty("overflow", "hidden");
}
origin: com.google.gwt/gwt-servlet

/**
 * Sets the object's width. This width does not include decorations such as
 * border, margin, and padding.
 * 
 * @param width the object's new width, in CSS units (e.g. "10px", "1em")
 */
public void setWidth(String width) {
 // This exists to deal with an inconsistency in IE's implementation where
 // it won't accept negative numbers in length measurements
 assert extractLengthValue(width.trim().toLowerCase(Locale.ROOT)) >= 0 : "CSS widths should not be negative";
 getElement().getStyle().setProperty("width", width);
}
origin: com.google.gwt/gwt-servlet

/**
 * Sets the object's height. This height does not include decorations such as
 * border, margin, and padding.
 * 
 * @param height the object's new height, in CSS units (e.g. "10px", "1em")
 */
public void setHeight(String height) {
 // This exists to deal with an inconsistency in IE's implementation where
 // it won't accept negative numbers in length measurements
 assert extractLengthValue(height.trim().toLowerCase(Locale.ROOT)) >= 0 : "CSS heights should not be negative";
 getElement().getStyle().setProperty("height", height);
}
origin: com.google.gwt/gwt-servlet

 @Override
 protected void onUpdate(double progress) {
  int scrollHeight = curPanel.contentWrapper.getElement().getPropertyInt("scrollHeight");
  int height = (int) (progress * scrollHeight);
  if (!opening) {
   height = scrollHeight - height;
  }
  height = Math.max(height, 1);
  curPanel.contentWrapper.getElement().getStyle().setProperty("height", height + "px");
  curPanel.contentWrapper.getElement().getStyle().setProperty("width", "auto");
 }
}
origin: com.google.gwt/gwt-servlet

 @Override
 void convertToFullNode(TreeItem item) {
  super.convertToFullNode(item);
  item.getElement().getStyle().setProperty("marginBottom", "0px");
 }
}
origin: com.google.gwt/gwt-servlet

/**
 * Sets the vertical alignment of the specified row.
 * 
 * @param row the row whose alignment is to be set
 * @param align the row's new vertical alignment as specified in
 *          {@link HasVerticalAlignment}
 * @throws IndexOutOfBoundsException
 */
public void setVerticalAlign(int row, VerticalAlignmentConstant align) {
 ensureElement(row).getStyle().setProperty("verticalAlign", align.getVerticalAlignString());
}
origin: com.google.gwt/gwt-servlet

@Override
protected void onComplete() {
 if (!opening) {
  curPanel.contentWrapper.setVisible(false);
 }
 curPanel.contentWrapper.getElement().getStyle().setProperty("height", "auto");
 curPanel = null;
}
origin: com.google.gwt/gwt-servlet

@Override
public void setHorizontalAlignment(HorizontalAlignmentConstant align) {
 horzAlign = align;
 getElement().getStyle().setProperty("textAlign", align.getTextAlignString());
}
origin: com.google.gwt/gwt-servlet

/**
 * Sets whether the specified cell will allow word wrapping of its contents.
 * 
 * @param row the row of the cell whose word-wrap is to be set
 * @param column the column of the cell whose word-wrap is to be set
 * @param wrap <code>false </code> to disable word wrapping in this cell
 * @throws IndexOutOfBoundsException
 */
public void setWordWrap(int row, int column, boolean wrap) {
 prepareCell(row, column);
 String wrapValue = wrap ? "" : "nowrap";
 getElement(row, column).getStyle().setProperty("whiteSpace", wrapValue);
}
origin: com.google.gwt/gwt-servlet

public void setAlignment(TextAlignment align) {
 getElement().getStyle().setProperty("textAlign", align.getTextAlignString());
}
origin: com.google.gwt/gwt-servlet

/**
 * Set the minimum width of the tables in this widget. If the widget become
 * narrower than the minimum width, a horizontal scrollbar will appear so the
 * user can scroll horizontally.
 * 
 * <p>
 * Note that this method is not supported in IE6 and earlier versions of IE.
 * </p>
 * 
 * @param value the width
 * @param unit the unit of the width
 * @see #setTableWidth(double, Unit)
 */
public void setMinimumTableWidth(double value, Unit unit) {
 /*
  * The min-width style attribute doesn't apply to tables, so we set the
  * min-width of the element that contains the table instead. The table width
  * is fixed at 100%.
  */
 tableHeaderContainer.getElement().getStyle().setProperty("minWidth", value, unit);
 tableFooterContainer.getElement().getStyle().setProperty("minWidth", value, unit);
 tableDataContainer.getStyle().setProperty("minWidth", value, unit);
}
origin: com.google.gwt/gwt-servlet

/**
 * Sets whether this object is visible. This method just sets the
 * <code>visibility</code> style attribute. You need to call {@link #show()}
 * to actually attached/detach the {@link PopupPanel} to the page.
 *
 * @param visible <code>true</code> to show the object, <code>false</code> to
 *          hide it
 * @see #show()
 * @see #hide()
 */
@Override
public void setVisible(boolean visible) {
 // We use visibility here instead of UIObject's default of display
 // Because the panel is absolutely positioned, this will not create
 // "holes" in displayed contents and it allows normal layout passes
 // to occur so the size of the PopupPanel can be reliably determined.
 getElement().getStyle().setProperty("visibility", visible ? "visible" : "hidden");
 // If the PopupImpl creates an iframe shim, it's also necessary to hide it
 // as well.
 if (glass != null) {
  glass.getStyle().setProperty("visibility", visible ? "visible" : "hidden");
 }
}
origin: com.google.gwt/gwt-servlet

/**
 * Creates an empty DisclosurePanel that is initially closed.
 */
public DisclosurePanel() {
 initWidget(mainPanel);
 mainPanel.add(header);
 mainPanel.add(contentWrapper);
 contentWrapper.getElement().getStyle().setProperty("padding", "0px");
 contentWrapper.getElement().getStyle().setProperty("overflow", "hidden");
 setStyleName(STYLENAME_DEFAULT);
 setContentDisplay(false);
}
origin: com.google.gwt/gwt-servlet

/**
 * Called only from {@link TreeItem}: Shows the leaf image on a tree item.
 *
 * @param treeItem the tree item
 */
void showLeafImage(TreeItem treeItem) {
 if (useLeafImages || treeItem.isFullNode()) {
  showImage(treeItem, images.treeLeaf());
 } else if (LocaleInfo.getCurrentLocale().isRTL()) {
  treeItem.getElement().getStyle().setProperty("paddingRight", indentValue);
 } else {
  treeItem.getElement().getStyle().setProperty("paddingLeft", indentValue);
 }
}
origin: com.google.gwt/gwt-servlet

public SuggestionMenuItem(Suggestion suggestion, boolean asHTML) {
 super(suggestion.getDisplayString(), asHTML);
 // Each suggestion should be placed in a single row in the suggestion
 // menu. If the window is resized and the suggestion cannot fit on a
 // single row, it should be clipped (instead of wrapping around and
 // taking up a second row).
 getElement().getStyle().setProperty("whiteSpace", "nowrap");
 setStyleName(STYLENAME_DEFAULT);
 setSuggestion(suggestion);
}
origin: com.google.gwt/gwt-servlet

@Override
protected void onStart() {
 offsetHeight = curPanel.getOffsetHeight();
 offsetWidth = curPanel.getOffsetWidth();
 curPanel.getElement().getStyle().setProperty("overflow", "hidden");
 super.onStart();
}
origin: org.jboss.errai/errai-bus

 private void resize() {
  contentPanel.setWidth(Window.getClientWidth() * 0.90 + "px");
  contentPanel.setHeight(Window.getClientHeight() * 0.90 + "px");
  contentPanel.getElement().getStyle().setProperty("overflow", "auto");
 }
}
com.google.gwt.user.clientElementgetStyle

Popular methods of Element

  • setAttribute
  • appendChild
  • setId
  • getParentElement
  • cast
  • setInnerText
  • getId
  • setInnerHTML
  • addClassName
  • getAttribute
  • getInnerHTML
  • getFirstChildElement
  • getInnerHTML,
  • getFirstChildElement,
  • getInnerText,
  • getClientWidth,
  • removeChild,
  • getChildCount,
  • getOffsetHeight,
  • removeAttribute,
  • removeClassName

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JFrame (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now