本文整理汇总了Java中org.waveprotocol.wave.client.widget.popup.PopupChrome类的典型用法代码示例。如果您正苦于以下问题:Java PopupChrome类的具体用法?Java PopupChrome怎么用?Java PopupChrome使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PopupChrome类属于org.waveprotocol.wave.client.widget.popup包,在下文中一共展示了PopupChrome类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: UploadFormPopup
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的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: getNotSavedDialogActivator
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Creates a dialogBox that informs about not saved data.
*/
private DialogActivator getNotSavedDialogActivator() {
if (notSavedDialogActivator == null) {
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
UniversalPopup popup = PopupFactory.createPopup(Document.get().getElementById(APP_ELEMENT_ID),
new CenterPopupPositioner(), chrome, false);
Label messageLabel = new Label(messages.changesNotSavedMessage());
messageLabel.setStyleName(Dialog.getCss().infoLabel());
DialogBox.create(popup, messages.changesNotSavedTitle(), messageLabel,
new DialogButton[] { notSavedDialogNo, notSavedDialogYes });
notSavedDialogActivator = new DialogActivator(popup);
}
return notSavedDialogActivator;
}
示例3: showInPopup
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Shows in a popup, and returns the popup.
*/
public UniversalPopup showInPopup() {
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
UniversalPopup popup = PopupFactory.createPopup(
RootPanel.getBodyElement(), new CenterPopupPositioner(), chrome, true);
popup.addPopupEventListener(new PopupEventListener.Impl() {
@Override
public void onHide(PopupEventSourcer source) {
hide();
}
});
TitleBar titleBar = popup.getTitleBar();
titleBar.setTitleText(messages.selectGadget());
popup.add(GadgetSelectorWidget.this);
popup.show();
setFocusAndHeight();
setupEventHandlers();
return popup;
}
示例4: information
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Standard information dialog with prompt and "OK" button.
*
* @param message message to display
*/
public static void information(String message) {
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
final UniversalPopup popup = PopupFactory.createPopup(RootPanel.getBodyElement(),
new CenterPopupPositioner(), chrome, true);
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.setStyleName(Dialog.getCss().verticalPanel());
Label label = new Label(message);
verticalPanel.add(label);
DialogButton okButton = new DialogButton(messages.ok(), new Command() {
@Override
public void execute() {
popup.hide();
}
});
DialogBox.create(popup, messages.confirmation(), verticalPanel,
new DialogButton[] { okButton });
popup.show();
requestFocus(okButton.getButton());
}
示例5: createEditor
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/** Util to help construct an editor instance. */
private EditorImpl createEditor(KeyBindingRegistry keyBinding) {
EditorStaticDeps.setPopupProvider(new PopupProvider() {
@Override
public UniversalPopup createPopup(Element reference, RelativePopupPositioner positioner,
PopupChrome chrome, boolean autoHide) {
return new Popup(reference, positioner);
}
@Override
public void setRootPanel(Panel rootPanel) {
// Not used as we use our own popup implementation.
}
});
Editor editor = Editors.create();
initEditor(editor, Editor.ROOT_REGISTRIES, keyBinding);
return (EditorImpl) editor;
}
示例6: showInPopup
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Shows in a popup, and returns the popup.
*/
public UniversalPopup showInPopup() {
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
UniversalPopup popup = PopupFactory.createPopup(
null, new CenterPopupPositioner(), chrome, true);
TitleBar titleBar = popup.getTitleBar();
titleBar.setTitleText(messages.selectGadget());
popup.add(GadgetSelectorWidget.this);
popup.show();
setFocusAndHeight();
setupEventHandlers();
return popup;
}
示例7: BlipLinkPopupWidget
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Creates link info popup.
*/
public BlipLinkPopupWidget(Element relative) {
initWidget(BINDER.createAndBindUi(this));
// Wrap in a popup.
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
popup = PopupFactory.createPopup(relative, AlignedPopupPositioner.ABOVE_RIGHT, chrome, true);
popup.add(this);
popup.addPopupEventListener(this);
}
示例8: showInPopup
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Shows in a popup, and returns the popup.
* @param user the logged in user. The popup does not show it but makes sure it is
* in the participant set returned
*/
public UniversalPopup showInPopup(ParticipantId user, Set<ParticipantId> participants,
ProfileManager profiles) {
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
UniversalPopup popup = PopupFactory.createPopup(
RootPanel.getBodyElement(), new CenterPopupPositioner(), chrome, true);
TitleBar titleBar = popup.getTitleBar();
titleBar.setTitleText("Select participants");
popup.add(ParticipantSelectorWidget.this);
this.user = user;
this.participants = new HashSet<ParticipantId>(participants);
this.profiles = profiles;
// If there is only one participant, create the wave without showing the popup
if (participants.size() == 1) {
if (listener != null) {
listener.onSelect(participants);
}
return popup;
}
createParticipantList(participants);
popup.show();
setFocusAndHeight();
return popup;
}
示例9: showInPopup
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Shows in a popup, and returns the popup.
* @param currentUser the logged in user.
*/
public UniversalPopup showInPopup(Element relative) {
reset();
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
UniversalPopup popup = PopupFactory.createPopup(relative,
AlignedPopupPositioner.BELOW_LEFT, chrome, true);
popup.add(ContactSelectorWidget.this);
popup.show();
setFocus();
return popup;
}
示例10: ColorPopup
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Instantiates a new color popup.
*
* @param relative the relative
* @param allowNone the allow none
*/
public ColorPopup(Element relative, boolean allowNone) {
colorPicker = ComplexColorPicker.getInstance();
colorPicker.setAllowNone(allowNone);
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
popup = PopupFactory.createPopup(relative, AlignedPopupPositioner.ABOVE_RIGHT, chrome, true);
popup.add(colorPicker);
}
示例11: confirm
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Standard confirmation dialog with prompt, "OK" and "Cancel" buttons.
*
* @param message message to display
* @param okCommand command to be executed if OK button is pressed
*/
public static void confirm(String message, final Command okCommand) {
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
final UniversalPopup popup = PopupFactory.createPopup(RootPanel.getBodyElement(),
new CenterPopupPositioner(), chrome, true);
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.setStyleName(Dialog.getCss().verticalPanel());
Label label = new Label(message);
verticalPanel.add(label);
DialogButton okButton = new DialogButton(messages.ok(), new Command() {
@Override
public void execute() {
popup.hide();
if (okCommand != null) {
okCommand.execute();
}
}
});
DialogBox.create(popup, messages.confirmation(), verticalPanel,
new DialogButton[] { okButton, createCancelButton(popup) });
popup.show();
requestFocus(okButton.getButton());
}
示例12: ProfilePopupWidget
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Creates a profile card.
*/
public ProfilePopupWidget(Element relative, RelativePopupPositioner positioner) {
initWidget(BINDER.createAndBindUi(this));
// Wrap in a popup.
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
popup = PopupFactory.createPopup(relative, positioner, chrome, true);
popup.add(this);
popup.addPopupEventListener(this);
}
示例13: createEditor
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
private Editor createEditor(String id) {
EditorStaticDeps.setPopupProvider(Popup.LIGHTWEIGHT_POPUP_PROVIDER);
EditorStaticDeps.setPopupChromeProvider(new PopupChromeProvider() {
public PopupChrome createPopupChrome() {
return null;
}
});
Editor editor = Editors.create();
editor.getWidget().getElement().setId(id);
editor.addKeySignalListener(this);
return editor;
}
示例14: createTurbulencePopup
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/** Creates a popup that warns about network disconnects. */
private static UniversalPopup createTurbulencePopup() {
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
UniversalPopup popup =
PopupFactory.createPopup(null, new CenterPopupPositioner(), chrome, true);
popup.add(new HTML("<div style='color: red; padding: 5px; text-align: center;'>"
+ "<b>" + messages.turbulenceDetected() + "<br></br> "
+ messages.saveAndReloadWave() + "</b></div>"));
return popup;
}
示例15: showInPopup
import org.waveprotocol.wave.client.widget.popup.PopupChrome; //导入依赖的package包/类
/**
* Shows in a popup, and returns the popup.
* @param user the logged in user. The popup does not show it but makes sure it is
* in the participant set returned
*/
public UniversalPopup showInPopup(ParticipantId user, Set<ParticipantId> participants,
ProfileManager profiles) {
PopupChrome chrome = PopupChromeFactory.createPopupChrome();
UniversalPopup popup = PopupFactory.createPopup(
null, new CenterPopupPositioner(), chrome, true);
TitleBar titleBar = popup.getTitleBar();
titleBar.setTitleText("Select participants");
popup.add(ParticipantSelectorWidget.this);
this.user = user;
this.participants = new HashSet<ParticipantId>(participants);
this.profiles = profiles;
// If there is only one participant, create the wave without showing the popup
if (participants.size() == 1) {
if (listener != null) {
listener.onSelect(participants);
}
return popup;
}
createParticipantList(participants);
popup.show();
setFocusAndHeight();
return popup;
}