本文整理汇总了Java中com.google.gwt.user.client.ui.PopupPanel.addCloseHandler方法的典型用法代码示例。如果您正苦于以下问题:Java PopupPanel.addCloseHandler方法的具体用法?Java PopupPanel.addCloseHandler怎么用?Java PopupPanel.addCloseHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.PopupPanel
的用法示例。
在下文中一共展示了PopupPanel.addCloseHandler方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: show
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
void show() {
final PopupPanel p = new PopupPanel(true);
p.setStyleName(Resources.I.style().popup());
p.addAutoHidePartner(activatingButton.getElement());
p.addCloseHandler(
new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
activatingButton.unlink();
if (popup == p) {
popup = null;
}
}
});
p.add(panel);
p.showRelativeTo(activatingButton);
GlobalKey.dialog(p);
popup = p;
}
示例2: onRename
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
void onRename() {
if (popup != null) {
popup.hide();
return;
}
if (renameBox == null) {
renameBox = new RenameFileBox(project, changeId, revision);
}
renameBox.clearPath();
final PopupPanel p = new PopupPanel(true);
p.setStyleName(style.replyBox());
p.addAutoHidePartner(renameButton.getElement());
p.addCloseHandler(
new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
if (popup == p) {
popup = null;
}
}
});
p.add(renameBox);
p.showRelativeTo(renameButton);
GlobalKey.dialog(p);
renameBox.setFocus(true);
popup = p;
}
示例3: onEdit
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
public void onEdit() {
if (popup != null) {
popup.hide();
return;
}
files.unregisterKeys();
if (addBox == null) {
addBox = new AddFileBox(project, changeId, revision, files);
}
addBox.clearPath();
final PopupPanel p = new PopupPanel(true);
p.setStyleName(style.replyBox());
p.addAutoHidePartner(addButton.getElement());
p.addCloseHandler(
new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
if (popup == p) {
popup = null;
}
}
});
p.add(addBox);
p.showRelativeTo(addButton);
GlobalKey.dialog(p);
addBox.setFocus(true);
popup = p;
}
示例4: onReply
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
void onReply(MessageInfo msg) {
if (popup != null) {
popup.hide();
return;
}
if (replyBox == null) {
replyBox = new ReplyBox(clp, project, psId, revision, allLabels, permittedLabels);
allLabels = null;
permittedLabels = null;
}
if (msg != null) {
replyBox.replyTo(msg);
}
final PopupPanel p = new PopupPanel(true, false);
p.setStyleName(style.replyBox());
p.addAutoHidePartner(replyButton.getElement());
p.addAutoHidePartner(quickApproveButton.getElement());
p.addCloseHandler(
new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
if (popup == p) {
popup = null;
if (hasDraftComments || replyBox.hasMessage()) {
replyButton.setStyleName(style.highlight());
}
}
}
});
p.add(replyBox);
Window.scrollTo(0, 0);
replyButton.removeStyleName(style.highlight());
p.showRelativeTo(replyButton);
GlobalKey.dialog(p);
popup = p;
}
示例5: onDelete
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
void onDelete() {
if (popup != null) {
popup.hide();
return;
}
if (deleteBox == null) {
deleteBox = new DeleteFileBox(project, changeId, revision);
}
deleteBox.clearPath();
final PopupPanel p = new PopupPanel(true);
p.setStyleName(style.replyBox());
p.addAutoHidePartner(deleteButton.getElement());
p.addCloseHandler(
new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
if (popup == p) {
popup = null;
}
}
});
p.add(deleteBox);
p.showRelativeTo(deleteButton);
GlobalKey.dialog(p);
deleteBox.setFocus(true);
popup = p;
}
示例6: show
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
void show() {
if (popup != null) {
popup.hide();
popup = null;
return;
}
final PopupPanel p = new PopupPanel(true);
p.setStyleName(style.popup());
p.addAutoHidePartner(activatingButton.getElement());
p.addCloseHandler(
new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
if (popup == p) {
popup = null;
}
}
});
p.add(this);
p.showRelativeTo(activatingButton);
GlobalKey.dialog(p);
message.setFocus(true);
popup = p;
}
示例7: createPopup
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
@Override
protected PopupPanel createPopup() {
PopupPanel p = super.createPopup();
p.addCloseHandler(new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
popupHideTimer.schedule(400);
}
});
return p;
}
示例8: setInstructions
import com.google.gwt.user.client.ui.PopupPanel; //导入方法依赖的package包/类
public void setInstructions(final String instructions, final String infoButtonChar, final String closeButtonLabel) {
final HTML instructionsLabel = new HTML(instructions);
final PopupPanel popupPanel = new PopupPanel(false); // the close action to this panel causes background buttons to be clicked
popupPanel.setGlassEnabled(true);
popupPanel.setStylePrimaryName("stimulusHelpPanel");
instructionsLabel.setStylePrimaryName("stimulusHelpText");
instructionsScrollPanel = new ScrollPanel(instructionsLabel);
instructionsScrollPanel.getElement().getStyle().setPropertyPx("maxHeight", Window.getClientHeight() - 150);
final VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(instructionsScrollPanel);
final Button closeButton = new Button(closeButtonLabel);
verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
verticalPanel.add(closeButton);
popupPanel.setWidget(verticalPanel);
infoButton.setText(infoButtonChar);
final SingleShotEventListner infoSingleShotEventListner = new SingleShotEventListner() {
@Override
protected void singleShotFired() {
if (infoButton.isEnabled()) {
// outerGrid.clear(); // users found that hiding the picker screen made it hard to understand the instruction text
popupPanel.center();
infoButton.setEnabled(false);
resetSingleShot();
}
}
};
infoButton.addClickHandler(infoSingleShotEventListner);
infoButton.addTouchStartHandler(infoSingleShotEventListner);
infoButton.addTouchMoveHandler(infoSingleShotEventListner);
infoButton.addTouchEndHandler(infoSingleShotEventListner);
final SingleShotEventListner instructionsSingleShotEventListner1 = new SingleShotEventListner() {
@Override
protected void singleShotFired() {
popupPanel.hide();
resizeView();
infoButton.setEnabled(true);
resetSingleShot();
}
};
closeButton.addClickHandler(instructionsSingleShotEventListner1);
closeButton.addTouchStartHandler(instructionsSingleShotEventListner1);
closeButton.addTouchMoveHandler(instructionsSingleShotEventListner1);
closeButton.addTouchEndHandler(instructionsSingleShotEventListner1);
popupPanel.addCloseHandler(new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
instructionsScrollPanel = null;
// instructionsSingleShotEventListner1.eventFired();
// infoButton.setEnabled(true);
// resizeView();
}
});
popupPanel.center();
}
开发者ID:languageininteraction,项目名称:GraphemeColourSynaesthesiaApp,代码行数:58,代码来源:ColourPickerCanvasView.java