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


Java UIObject.setVisible方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.UIObject.setVisible方法的典型用法代碼示例。如果您正苦於以下問題:Java UIObject.setVisible方法的具體用法?Java UIObject.setVisible怎麽用?Java UIObject.setVisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.UIObject的用法示例。


在下文中一共展示了UIObject.setVisible方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: UploadFormPopup

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
/**
 * Creates an upload popup.
 */
public UploadFormPopup() {
  form = BINDER.createAndBindUi(this);

  PopupChrome chrome = PopupChromeFactory.createPopupChrome();
  chrome.enableTitleBar();
  popup = PopupFactory.createPopup(null, new CenterPopupPositioner(), chrome, false);
  popup.getTitleBar().setTitleText("Upload attachment");
  popup.add(form);

  iframe = Document.get().createIFrameElement();
  iframe.setName("_uploadform" + iframeId++);
  // HACK(danilatos): Prevent browser from caching due to whatever reason
  iframe.setSrc("/uploadform?nocache=" + Duration.currentTimeMillis());
  form.getElement().setAttribute("target", iframe.getName());

  onloadRegistration =
      DomHelper.registerEventHandler(iframe, "load", new JavaScriptEventListener() {
        @Override
        public void onJavaScriptEvent(String name, Event event) {
          onIframeLoad();
        }
      });
  UIObject.setVisible(iframe, false);
}
 
開發者ID:ArloJamesBarnes,項目名稱:walkaround,代碼行數:28,代碼來源:UploadFormPopup.java

示例2: setupWavePanel

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
private void setupWavePanel() {
  // Hide the frame until waves start getting opened
  UIObject.setVisible(waveFrame.getElement(), false);

  Document.get().getElementById(SIGNOUT_ELEMENT_ID).setInnerText(messages.signout());

  // Handles opening waves.
  ClientEvents.get().addWaveSelectionEventHandler(new WaveSelectionEventHandler() {

    @Override
    public void onSelection(WaveRef waveRef, boolean ctrlDown, boolean altDown) {
      // Ctrl or Alt isn't pressed => open wave with diffs
      closeAndOpenWave(new OpenWaveData(waveRef, false, null, !ctrlDown && !altDown));
    }
  });

  waveFrame.getElement().setId(WAVE_ELEMENT_ID);
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:19,代碼來源:WebClient.java

示例3: refresh

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
public void refresh() {
    UIObject.setVisible(panel.contentNode, getState().isOpen());
    updateStyleName(panel);

    if (getState().isToggleIconEnabled()) {
        updateToggleIcon(getState().isOpen());
    }

    if (getState().isToggleEnabled()) {
        if (clickHandlerRegistration != null) {
            clickHandlerRegistration.removeHandler();
        }
        clickHandlerRegistration = panel.addDomHandler(toggleClickHandler, ClickEvent.getType());
    } else {
        if (clickHandlerRegistration != null) {
            clickHandlerRegistration.removeHandler();
        }
        clickHandlerRegistration = panel.addDomHandler(toggleDisabledClickHandler, ClickEvent.getType());
    }
}
 
開發者ID:mouellet,項目名稱:vaadin-stackpanel,代碼行數:21,代碼來源:StackPanelConnector.java

示例4: complete

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
/**
 * Complete the partially filled history item with the response data.
 *
 * @param response Response data.
 * @param timeMillis Time that execution took in milliseconds.
 * @param linkFactory Link factory that is used to generate hyperlink and menu links in the
 *        response view.
 */
public void complete(ApiResponse response, long timeMillis, PrettifierLinkFactory linkFactory) {
  executing.setVisible(false);
  wireContent.addStyleName(style.fadeIn());
  time.setInnerText("time to execute: " + timeMillis + " ms");
  statusDiv.setInnerText(response.getStatus() + " " + response.getStatusText());

  // Headers are hidden by default.
  UIObject.setVisible(responseHeadersDiv, false);
  responseHeadersDiv.setInnerText(getResponseHeadersString(response));
  try {
    JsonPrettifier.prettify(
        request.getService(), requestBodyDiv, request.getRequestBody(), linkFactory);
  } catch (JsonFormatException e) {
    // We should only be generating valid requests
    requestBodyDiv.add(new InlineLabel(request.getRequestBody()));
  }

  setResponseContent(request, response, realPathFragment, linkFactory);
}
 
開發者ID:showlowtech,項目名稱:google-apis-explorer,代碼行數:28,代碼來源:EmbeddedHistoryItemView.java

示例5: finishWidgetInitialization

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
/**
 * Setup the container around the widget.
 */
private void finishWidgetInitialization(Element container, Widget w) {
    UIObject.setVisible(container, false);

    // Set all anchors by default.
    Element we = w.getElement();
    we.getStyle().setPosition(Style.Position.ABSOLUTE);
    we.getStyle().clearWidth();
    we.getStyle().clearHeight();
    we.getStyle().setLeft(0, Style.Unit.PX);
    we.getStyle().setRight(0, Style.Unit.PX);
    we.getStyle().setTop(0, Style.Unit.PX);
    we.getStyle().setBottom(0, Style.Unit.PX);
    we.getStyle().setMarginLeft(hgap, Style.Unit.PX);
    we.getStyle().setMarginRight(hgap, Style.Unit.PX);
    we.getStyle().setMarginTop(vgap, Style.Unit.PX);
    we.getStyle().setMarginBottom(vgap, Style.Unit.PX);
    
    // Issue 2510 from GWT : Hiding the widget isn't necessary because we hide its
    // wrapper, but it's in here for legacy support.
    w.setVisible(false);
}
 
開發者ID:marat-gainullin,項目名稱:platypus-js,代碼行數:25,代碼來源:CardsPanel.java

示例6: setTabVisibility

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
public static void setTabVisibility(TabPanel tabs, int index, boolean visible, UIObject tabUI) {
    try {
        if (index >= tabs.getTabBar().getTabCount() || index < 0)
            return;
        // Native Google implementation of TabBar uses an HorizontalPanel,
        // so, the DOM primary element is a table element (with just one tr)
        Element table = tabs.getTabBar().getElement();
        Element tr = DOM.getFirstChild(DOM.getFirstChild(table));
        // (index + 1) to account for 'first' placeholder td.
        Element td = DOM.getChild(tr, index + 1);
        UIObject.setVisible(td, visible);
        tabUI.setVisible(visible);
    } catch (Exception e) {
        LOG.log(Level.WARNING,
            "Not sure what can go wrong, but setting tab visibility might have failed", e);
    }
}
 
開發者ID:qafedev,項目名稱:qafe-platform,代碼行數:18,代碼來源:TabPanelRenderer.java

示例7: initSize

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
protected void initSize(UIObject widget, String width, String height, String uuid, String parent, String context) {
	if (widget == null) {
		return;
	}
	if (!QAMLUtil.isEmpty(width)) {
		if (!width.startsWith("-")) {
			// Width is not negative
			if (QAMLUtil.isNumber(width)) {
				width = width + QAMLConstants.UNIT;
			}
			widget.setWidth(width);
		}
	}
	if (!QAMLUtil.isEmpty(height)) {
		if (!height.startsWith("-")) {
			// Height is not negative
			if (QAMLUtil.isNumber(height)) {
				height = height + QAMLConstants.UNIT;
			}
			widget.setHeight(height);
		}
	}
	if ("0".equals(width) && "0".equals(height)) {
		widget.setVisible(false);
	}
}
 
開發者ID:qafedev,項目名稱:qafe-platform,代碼行數:27,代碼來源:AbstractComponentRenderer.java

示例8: onOpenForm

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
void onOpenForm() {
  UIObject.setVisible(form, true);
  UIObject.setVisible(show, false);
  UIObject.setVisible(error, false);
  editAssigneeIcon.setVisible(false);
  suggestBox.setFocus(true);
  if (currentAssignee != null) {
    suggestBox.setText(FormatUtil.nameEmail(currentAssignee));
    suggestBox.selectAll();
  } else {
    suggestBox.setText("");
  }
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:14,代碼來源:Assignee.java

示例9: onCloseForm

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
void onCloseForm() {
  UIObject.setVisible(form, false);
  UIObject.setVisible(show, true);
  UIObject.setVisible(error, false);
  editAssigneeIcon.setVisible(true);
  suggestBox.setFocus(false);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:8,代碼來源:Assignee.java

示例10: setHeaderVisible

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
void setHeaderVisible(boolean show) {
  DiffScreen parent = getDiffScreen();
  if (show != UIObject.isVisible(patchSetNavRow)) {
    UIObject.setVisible(patchSetNavRow, show);
    UIObject.setVisible(diffHeaderRow, show && header);
    if (show) {
      parent.header.removeStyleName(Resources.I.diffTableStyle().fullscreen());
    } else {
      parent.header.addStyleName(Resources.I.diffTableStyle().fullscreen());
    }
    parent.resizeCodeMirror();
  }
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:14,代碼來源:DiffTable.java

示例11: setNoDiff

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
void setNoDiff(DiffInfo diff) {
  if (diff.binary()) {
    UIObject.setVisible(noDiff, false); // Don't bother showing "No Differences"
  } else {
    JsArray<Region> regions = diff.content();
    boolean b = regions.length() == 0 || (regions.length() == 1 && regions.get(0).ab() != null);
    UIObject.setVisible(noDiff, b);
  }
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:10,代碼來源:Header.java

示例12: setOpen

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
@Override
void setOpen(boolean open) {
  UIObject.setVisible(summary, !open);
  UIObject.setVisible(message, open);
  UIObject.setVisible(buttons, open && replyBox == null);
  if (open) {
    removeStyleName(style.closed());
  } else {
    addStyleName(style.closed());
  }
  super.setOpen(open);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:13,代碼來源:PublishedBox.java

示例13: onCancel

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
@UiHandler("cancel")
void onCancel(@SuppressWarnings("unused") ClickEvent e) {
  addReviewerIcon.setVisible(true);
  UIObject.setVisible(form, false);
  suggestBox.setFocus(false);
  suggestBox.setText("");
  suggestBox.setServeSuggestionsOnOracle(false);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:9,代碼來源:Reviewers.java

示例14: PreferencesBox

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
public PreferencesBox(DiffScreen view) {
  this.view = view;

  initWidget(uiBinder.createAndBindUi(this));
  initIgnoreWhitespace();
  initTheme();

  if (view != null) {
    initMode();
  } else {
    UIObject.setVisible(header, false);
    apply.getElement().getStyle().setVisibility(Visibility.HIDDEN);
  }
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:15,代碼來源:PreferencesBox.java

示例15: onOpenForm

import com.google.gwt.user.client.ui.UIObject; //導入方法依賴的package包/類
void onOpenForm() {
  UIObject.setVisible(form, true);
  UIObject.setVisible(error, false);
  addReviewerIcon.setVisible(false);
  suggestBox.setServeSuggestionsOnOracle(true);
  suggestBox.setFocus(true);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:8,代碼來源:Reviewers.java


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