当前位置: 首页>>代码示例>>Java>>正文


Java ClosingEvent类代码示例

本文整理汇总了Java中com.google.gwt.user.client.Window.ClosingEvent的典型用法代码示例。如果您正苦于以下问题:Java ClosingEvent类的具体用法?Java ClosingEvent怎么用?Java ClosingEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ClosingEvent类属于com.google.gwt.user.client.Window包,在下文中一共展示了ClosingEvent类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
public void initialize() {

		addChangelayerListener();

		addRemoveLayerListener();

		addAddLayerListener();
		
		addChangeSelectedWMSLayerListener();

		Window.addWindowClosingHandler(new Window.ClosingHandler() {
			@Override
			public void onWindowClosing(final ClosingEvent event) {
				event.setMessage(UIMessages.INSTANCE.leaveWebText());
			}
		});
	}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:18,代码来源:EventListenerInitializer.java

示例2: GwtCommandDispatcher

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
private GwtCommandDispatcher() {
	locale = LocaleInfo.getCurrentLocale().getLocaleName();
	if ("default".equals(locale)) {
		locale = null;
	}
	deferreds = new ArrayList<Deferred>();
	service = (GeomajasServiceAsync) GWT.create(GeomajasService.class);
	setServiceEndPointUrl(GWT.getModuleBaseURL() + "geomajasService");
	setUseLazyLoading(true);
	setShowError(true);

	Window.addWindowClosingHandler(new ClosingHandler() {

		public void onWindowClosing(ClosingEvent event) {
			GwtCommandDispatcher.getInstance().setShowError(false);

			// Cancel all outstanding requests:
			for (Deferred deferred : deferreds) {
				deferred.cancel();
			}
		}
	});
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:24,代码来源:GwtCommandDispatcher.java

示例3: setupWindowClosingHandler

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
private void setupWindowClosingHandler() {
  Window.addWindowClosingHandler(new Window.ClosingHandler() {

    @Override
    public void onWindowClosing(ClosingEvent event) {
      if (savingInProcess) {
        event.setMessage("Failed to save your last changes.");
      }
    }
  });
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:12,代码来源:WebClient.java

示例4: releaseLockOnClose

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
private void releaseLockOnClose() {
    closeHandler = Window.addWindowClosingHandler(new ClosingHandler() {
        @Override
        public void onWindowClosing(ClosingEvent event) {
            releaseLock();
        }
    });
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:9,代码来源:LockManagerImpl.java

示例5: createMenuCloseEvent

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
public static void createMenuCloseEvent(final String uuid, final WindowPanel sender) {
	sender.addWindowClosingHandler(new ClosingHandler() {
		public void onWindowClosing(ClosingEvent event) {
			if (Window.confirm("Are you sure you want to close the application and all of its windows ?")) {
				MainFactoryActions.remove(uuid);
				ComponentRepository.getInstance().removeAllItemsForWindow(uuid, null);
				// ClientApplicationContext.getInstance().closeAllWindowsForUUID(uuid);
				// return true;
			} else {
				// return false;
			}
			Window.prompt("Are you sure you want to close the application and all of its windows ?", "X");
		}
	});
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:16,代码来源:EventFactory.java

示例6: setUpHistoryManagement

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
/**
 * Set up the History management for the application.
 */
public void setUpHistoryManagement(){
	// Make this class your history manager (see onValueChange method)
	History.addValueChangeHandler(this);
	// Handle any existing history token
	History.fireCurrentHistoryState();
	// Trap user hitting back button too many times.
	Window.addWindowClosingHandler(new ClosingHandler(){
		public void onWindowClosing(ClosingEvent event) {
			event.setMessage("Ran out of history.  Now leaving application, is that OK?");
		}
	});
}
 
开发者ID:robert0714,项目名称:gwtinaction2,代码行数:16,代码来源:BasicProject.java

示例7: initWindowClosingConfirmationDialog

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
/**
 * Display a confirmation dialog to leave our site when the user refreshes
 * or goes to another URL.
 */
protected void initWindowClosingConfirmationDialog() {
    Window.addWindowClosingHandler(new ClosingHandler() {
        @Override
        public void onWindowClosing(ClosingEvent event) {
            // This message doesn't show, but by adding this close handler,
            // we get the default dialog to display and confirm that the
            // user does want to leave our site.
            event.setMessage("Are you sure you want to leave?");
        }
    });
}
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:16,代码来源:Htp.java

示例8: onWindowClosing

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
@Override
public void onWindowClosing(ClosingEvent p_event)
{
  AppMain.getRpcService().disconnect( getMyPresence(), m_dummyCallback );
}
 
开发者ID:kroc702,项目名称:fullmetalgalaxy,代码行数:6,代码来源:AppMain.java

示例9: onWindowClosing

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
@Override
public void onWindowClosing(ClosingEvent event) {
  event.setMessage("ゲームプレイ中にウィンドウを閉じた場合\nレーティングにペナルティが加わります\nよろしいですか?");
}
 
开发者ID:nodchip,项目名称:QMAClone,代码行数:5,代码来源:SceneGame.java

示例10: onWindowClosing

import com.google.gwt.user.client.Window.ClosingEvent; //导入依赖的package包/类
public void onWindowClosing(ClosingEvent event) {

    }
 
开发者ID:robertwaszkowski,项目名称:gwt-connectors,代码行数:4,代码来源:Keyboard.java


注:本文中的com.google.gwt.user.client.Window.ClosingEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。