本文整理匯總了Java中com.google.gwt.dom.client.Style.setDisplay方法的典型用法代碼示例。如果您正苦於以下問題:Java Style.setDisplay方法的具體用法?Java Style.setDisplay怎麽用?Java Style.setDisplay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.dom.client.Style
的用法示例。
在下文中一共展示了Style.setDisplay方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setPresentationsMenu
import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
public void setPresentationsMenu(Widget presentationsMenu) {
if (_delegate.presentationsMenu != presentationsMenu) {
Style presentationsIconStyle = ((CubaTreeTableTableHead) tHead).presentationsEditIcon.getElement().getStyle();
if (presentationsMenu == null) {
presentationsIconStyle.setDisplay(Style.Display.NONE);
} else {
presentationsIconStyle.setDisplay(Style.Display.BLOCK);
}
}
_delegate.presentationsMenu = presentationsMenu;
}
示例2: setPresentationsMenu
import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
public void setPresentationsMenu(Widget presentationsMenu) {
if (_delegate.presentationsMenu != presentationsMenu) {
Style presentationsIconStyle = ((CubaScrollTableHead) tHead).presentationsEditIcon.getElement().getStyle();
if (presentationsMenu == null) {
presentationsIconStyle.setDisplay(Style.Display.NONE);
} else {
presentationsIconStyle.setDisplay(Style.Display.BLOCK);
}
}
_delegate.presentationsMenu = presentationsMenu;
}
示例3: CubaSuggestPopup
import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
public CubaSuggestPopup() {
Style style = loadingImage.getElement().getStyle();
style.clearWidth();
style.clearHeight();
style.setDisplay(Style.Display.BLOCK);
}
示例4: setCollapsable
import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
public void setCollapsable(boolean collapsable) {
Style expanderStyle = expander.getStyle();
if (collapsable) {
expanderStyle.clearProperty("display");
removeStyleDependentName("nocollapsable");
} else {
addStyleDependentName("nocollapsable");
expanderStyle.setDisplay(Style.Display.NONE);
}
Tools.textSelectionEnable(captionNode, !collapsable);
this.collapsable = collapsable;
}
示例5: execute
import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
@Override
public void execute() {
Style style = menuButtonContainer.getElement().getStyle();
if (resizeButtonVisible) {
style.setDisplay(Display.BLOCK);
} else {
style.setDisplay(Display.NONE);
}
}
示例6: kickWebkit
import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
private static void kickWebkit(Element element) {
if (UserAgent.isWebkit()) {
Style style = element.getStyle();
String oldDisplay = style.getDisplay();
// Erase layout. Querying getOffsetParent() forces layout.
style.setDisplay(Display.NONE);
element.getOffsetParent();
// Restore layout.
style.setProperty("display", oldDisplay);
}
}
示例7: show
import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
@Override
public void show() {
Style style = getElement().getStyle();
style.setDisplay(Display.BLOCK);
}
示例8: hide
import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
@Override
public void hide() {
Style style = getElement().getStyle();
style.setDisplay(Display.NONE);
}
示例9: drawRow
import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
@Override
public TableRow drawRow(DataView<T> dataView, RowComponent<T> rowComponent, Object valueKey,
List<Column<T, ?>> columns, boolean redraw) {
T data = rowComponent.getData();
TableRow row = rowComponent.getWidget();
boolean draw = true;
if(row == null) {
// Create a new row element
row = new TableRow();
Style style = row.getElement().getStyle();
style.setDisplay(Display.NONE);
style.setProperty("height", getExpectedRowHeight() + "px");
style.setProperty("maxHeight", getExpectedRowHeight() + "px");
style.setProperty("minHeight", getExpectedRowHeight() + "px");
row.setStyleName(TableCssName.DATA_ROW);
rowComponent.setWidget(row);
if(!dataView.getSelectionType().equals(SelectionType.NONE)) {
TableData selection = drawSelectionCell();
row.add(selection);
}
} else if(!redraw && !rowComponent.isRedraw()) {
draw = false;
}
if(draw) {
// Build the columns
int colOffset = dataView.getColumnOffset();
int colSize = columns.size();
for(int c = 0; c < colSize; c++) {
int colIndex = c + colOffset;
Context context = new Context(rowComponent.getIndex(), colIndex, valueKey);
drawColumn(row, context, data, columns.get(c), colIndex, dataView.isHeaderVisible(colIndex));
}
rowComponent.setRedraw(false);
}
if(dataView.isUseRowExpansion()) {
if(!row.hasExpansionColumn()) {
TableData expand = new TableData();
expand.setId("colex");
MaterialIcon expandIcon = new MaterialIcon();
expandIcon.setId("expand");
expandIcon.setWidth("100%");
expandIcon.setIconType(IconType.KEYBOARD_ARROW_DOWN);
expandIcon.setWaves(WavesType.LIGHT);
expandIcon.getElement().getStyle().setCursor(Cursor.POINTER);
expand.add(expandIcon);
row.add(expand);
}
} else if(row.hasExpansionColumn()) {
row.removeExpansionColumn();
}
Scheduler.get().scheduleDeferred(() -> {
calculateRowHeight(rowComponent);
});
return row;
}