com.google.gwt.dom.client.Element.setPropertyInt()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中com.google.gwt.dom.client.Element.setPropertyInt()方法的一些代码示例,展示了Element.setPropertyInt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setPropertyInt()方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:setPropertyInt

Element.setPropertyInt介绍

[英]Sets an integer property on this element.
[中]设置此元素的整数属性。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Sets the amount of padding to be added around all cells.
 * 
 * @param padding the cell padding, in pixels
 */
public void setCellPadding(int padding) {
 tableElem.setPropertyInt("cellPadding", padding);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Sets the amount of spacing between this panel's cells.
 * 
 * @param spacing the inter-cell spacing, in pixels
 */
public void setSpacing(int spacing) {
 this.spacing = spacing;
 table.setPropertyInt("cellSpacing", spacing);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Sets the amount of spacing to be added around all cells.
 * 
 * @param spacing the cell spacing, in pixels
 */
public void setCellSpacing(int spacing) {
 tableElem.setPropertyInt("cellSpacing", spacing);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Sets an int property on the given element.
 * 
 * @param elem the element whose property is to be set
 * @param prop the name of the property to be set
 * @param value the new property value as an int
 * @deprecated Use {@link Element#setPropertyInt(String, int)} instead.
 */
@Deprecated
public static void setElementPropertyInt(Element elem, String prop, int value) {
 elem.setPropertyInt(prop, value);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Sets an integer property on the given element.
 *
 * @param elem the element whose property is to be set
 * @param attr the name of the property to be set
 * @param value the property's new integer value
 * @deprecated Use the more appropriately named
 *             {@link Element#setPropertyInt(String, int)} instead.
 */
@Deprecated
public static void setIntAttribute(Element elem, String attr, int value) {
 elem.setPropertyInt(attr, value);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Creates an empty stack panel.
 */
public StackPanel() {
 Element table = DOM.createTable();
 setElement(table);
 body = DOM.createTBody();
 DOM.appendChild(table, body);
 table.setPropertyInt("cellSpacing", 0);
 table.setPropertyInt("cellPadding", 0);
 DOM.sinkEvents(table, Event.ONCLICK);
 setStyleName(DEFAULT_STYLENAME);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

@Override
Element createHeaderElem() {
 // Create the table
 Element table = DOM.createTable();
 Element tbody = DOM.createTBody();
 DOM.appendChild(table, tbody);
 table.getStyle().setProperty("width", "100%");
 table.setPropertyInt("cellSpacing", 0);
 table.setPropertyInt("cellPadding", 0);
 // Add the decorated rows
 for (int i = 0; i < DEFAULT_ROW_STYLENAMES.length; i++) {
  DOM.appendChild(tbody, DecoratorPanel.createTR(DEFAULT_ROW_STYLENAMES[i]));
 }
 // Return the table
 return table;
}

代码示例来源:origin: com.google.gwt/gwt-servlet

private void updateIndicesFrom(int beforeIndex) {
 for (int i = beforeIndex, c = getWidgetCount(); i < c; ++i) {
  Element childTR = DOM.getChild(body, i * 2);
  Element childTD = DOM.getFirstChild(childTR);
  childTD.setPropertyInt("__index", i);
  // Update the special style on the first element
  if (beforeIndex == 0) {
   setStyleName(childTD, DEFAULT_ITEM_STYLENAME + "-first", true);
  } else {
   setStyleName(childTD, DEFAULT_ITEM_STYLENAME + "-first", false);
  }
 }
}

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Creates a new panel using the specified style names to apply to each row.
 * Each row will contain three cells (Left, Center, and Right). The Center
 * cell in the containerIndex row will contain the {@link Widget}.
 * 
 * @param rowStyles an array of style names to apply to each row
 * @param containerIndex the index of the container row
 */
DecoratorPanel(String[] rowStyles, int containerIndex) {
 super(DOM.createTable());
 // Add a tbody
 Element table = getElement();
 tbody = DOM.createTBody();
 DOM.appendChild(table, tbody);
 table.setPropertyInt("cellSpacing", 0);
 table.setPropertyInt("cellPadding", 0);
 // Add each row
 for (int i = 0; i < rowStyles.length; i++) {
  Element row = createTR(rowStyles[i]);
  DOM.appendChild(tbody, row);
  if (i == containerIndex) {
   containerElem = DOM.getFirstChild(DOM.getChild(row, 1));
  }
 }
 // Set the overall style name
 setStyleName(DEFAULT_STYLENAME);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Sets the amount of spacing to be added around all cells.
 * 
 * @param spacing the cell spacing, in pixels
 */
public void setCellSpacing(int spacing) {
 tableElem.setPropertyInt("cellSpacing", spacing);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Sets the amount of padding to be added around all cells.
 * 
 * @param padding the cell padding, in pixels
 */
public void setCellPadding(int padding) {
 tableElem.setPropertyInt("cellPadding", padding);
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Sets the amount of spacing between this panel's cells.
 * 
 * @param spacing the inter-cell spacing, in pixels
 */
public void setSpacing(int spacing) {
 this.spacing = spacing;
 table.setPropertyInt("cellSpacing", spacing);
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Sets the amount of spacing to be added around all cells.
 * 
 * @param spacing the cell spacing, in pixels
 */
public void setCellSpacing(int spacing) {
 tableElem.setPropertyInt("cellSpacing", spacing);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Sets the amount of spacing between this panel's cells.
 * 
 * @param spacing the inter-cell spacing, in pixels
 */
public void setSpacing(int spacing) {
 this.spacing = spacing;
 table.setPropertyInt("cellSpacing", spacing);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Sets an int property on the given element.
 * 
 * @param elem the element whose property is to be set
 * @param prop the name of the property to be set
 * @param value the new property value as an int
 * @deprecated Use {@link Element#setPropertyInt(String, int)} instead.
 */
@Deprecated
public static void setElementPropertyInt(Element elem, String prop, int value) {
 elem.setPropertyInt(prop, value);
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Sets an int property on the given element.
 * 
 * @param elem the element whose property is to be set
 * @param prop the name of the property to be set
 * @param value the new property value as an int
 * @deprecated Use {@link Element#setPropertyInt(String, int)} instead.
 */
@Deprecated
public static void setElementPropertyInt(Element elem, String prop, int value) {
 elem.setPropertyInt(prop, value);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

DOM.insertChild(rows[northRow].tr, td, rows[northRow].center);
 DOM.appendChild(td, child.getElement());
 td.setPropertyInt("colSpan", logicalRightCol - logicalLeftCol + 1);
 ++northRow;
} else if (layout.direction == SOUTH) {
 DOM.insertChild(rows[southRow].tr, td, rows[southRow].center);
 DOM.appendChild(td, child.getElement());
 td.setPropertyInt("colSpan", logicalRightCol - logicalLeftCol + 1);
 --southRow;
} else if (layout.direction == CENTER) {
 DOM.insertChild(row.tr, td, row.center++);
 DOM.appendChild(td, child.getElement());
 td.setPropertyInt("rowSpan", southRow - northRow + 1);
 ++logicalLeftCol;
} else if (shouldAddToLogicalRightOfTable(layout.direction)) {
 DOM.insertChild(row.tr, td, row.center);
 DOM.appendChild(td, child.getElement());
 td.setPropertyInt("rowSpan", southRow - northRow + 1);
 --logicalRightCol;

代码示例来源:origin: com.google.gwt/gwt-servlet

tdh.setPropertyInt("__owner", hashCode());
tdh.setPropertyString("height", "1px");

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material

/**
 * Set the given Integer value to the attribute of the range element.
 */
protected void setIntToRangeElement(String attribute, Integer val) {
  Element ele = $(rangeInputElement).asElement();
  if (ele != null) {
    ele.setPropertyInt(attribute, val);
  }
}

代码示例来源:origin: GwtMaterialDesign/gwt-material

/**
 * Set the given Integer value to the attribute of the range element.
 */
protected void setIntToRangeElement(String attribute, Integer val) {
  Element ele = $(rangeInputElement).asElement();
  if (ele != null) {
    ele.setPropertyInt(attribute, val);
  }
}

相关文章

微信公众号

最新文章

更多

Element类方法