當前位置: 首頁>>代碼示例>>Java>>正文


Java Style.setDisplay方法代碼示例

本文整理匯總了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;
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:12,代碼來源:CubaTreeTableWidget.java

示例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;
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:12,代碼來源:CubaScrollTableWidget.java

示例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);
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:8,代碼來源:CubaSuggestPopup.java

示例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;
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:15,代碼來源:CubaGroupBoxWidget.java

示例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);
  }
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:10,代碼來源:ImageThumbnailWidget.java

示例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);
  }
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:15,代碼來源:FullStructure.java

示例7: show

import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
@Override
public void show() {
    Style style = getElement().getStyle();
    style.setDisplay(Display.BLOCK);
}
 
開發者ID:YoungDigitalPlanet,項目名稱:empiria.player,代碼行數:6,代碼來源:ExplanationViewImpl.java

示例8: hide

import com.google.gwt.dom.client.Style; //導入方法依賴的package包/類
@Override
public void hide() {
    Style style = getElement().getStyle();
    style.setDisplay(Display.NONE);
}
 
開發者ID:YoungDigitalPlanet,項目名稱:empiria.player,代碼行數:6,代碼來源:ExplanationViewImpl.java

示例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;
}
 
開發者ID:GwtMaterialDesign,項目名稱:gwt-material-table,代碼行數:61,代碼來源:BaseRenderer.java


注:本文中的com.google.gwt.dom.client.Style.setDisplay方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。