本文整理匯總了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);
}
示例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);
}
示例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());
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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("");
}
}
示例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);
}
示例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();
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}