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


Java ClientRunContexts类代码示例

本文整理汇总了Java中org.eclipse.scout.rt.client.context.ClientRunContexts的典型用法代码示例。如果您正苦于以下问题:Java ClientRunContexts类的具体用法?Java ClientRunContexts怎么用?Java ClientRunContexts使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: handleNotification

import org.eclipse.scout.rt.client.context.ClientRunContexts; //导入依赖的package包/类
@Override
  public void handleNotification(OrganizationDealMatchedNotification notification) {
    ModelJobs.schedule(new IRunnable() {

      @Override
      public void run() throws Exception {
        DealFormData deal = notification.getMatchedDeal();
        String statusMessage = TEXTS.get("DealWithNumberWasMatched", deal.getOrderBookType().getValue(), deal.getDealNr());
        if (StatusCodeType.PartiallyCompletedCode.ID.equals(deal.getStatus())) {
          statusMessage = TEXTS.get("DealWithNumberWasPartiallyMatched", deal.getOrderBookType().getValue(), deal.getDealNr());
        }
        Status status = new Status(statusMessage, IStatus.OK);
        DesktopNotification desktopNotification = new DesktopNotification(status, IDesktopNotification.INFINITE_DURATION, true);
        ClientSession.get().getDesktop().addNotification(desktopNotification);
        //TODO: [uko] activate
//        Desktop.get().dataChanged(ListenerObjectEnum.ORGANIZATION_OVERVIEW);
      }
    }, ModelJobs.newInput(ClientRunContexts.copyCurrent()));
  }
 
开发者ID:BSI-Business-Systems-Integration-AG,项目名称:trading-network,代码行数:20,代码来源:OrganizationDealMatchedNotificationHandler.java

示例2: execAction

import org.eclipse.scout.rt.client.context.ClientRunContexts; //导入依赖的package包/类
@Override
protected void execAction() {
	// start the result handler
	// resultHandler = new TestCaseResultHandler();

	// use ModelJobs to asynchronously start test case execution
	// sequence
	ModelJobs.schedule(new IRunnable() {

		@Override
		public void run() throws Exception {
			ICapabilityService cbService = BEANS.get(ICapabilityService.class);
			List<ITableRow> tcArray = getSelectedRows();
			for (ITableRow tr : tcArray) {
				tr.setCellValue(4, "starting");
				tr.setBackgroundColor(ResourceBase.RUNNING);
				String badge = tr.getCell(0).toString();
				String tcName = tr.getCell(3).toString();
				cbService.executeTestCase(sutId, tcName, badge);
			}
		}
	}, ModelJobs.newInput(ClientRunContexts.copyCurrent()));
}
 
开发者ID:MSG134,项目名称:IVCT_Framework,代码行数:24,代码来源:CapabilityTablePage.java

示例3: handleNotification

import org.eclipse.scout.rt.client.context.ClientRunContexts; //导入依赖的package包/类
@Override
public void handleNotification(TestCaseNotification notification) {
	// inform client about test case verdict
	ModelJobs.schedule(new IRunnable() {
		@Override
		public void run() throws Exception {
			logger.trace("Test Case Notification " + notification.getVerdict() + " received for "
					+ notification.getTc());

			for (IOutline outline : Desktop.CURRENT.get().getAvailableOutlines()) {
				if (outline instanceof BadgeOutline) {
					CapabilityTablePage cTP = (CapabilityTablePage) outline.getActivePage();
					for (ITableRow tr : cTP.getTable().getRows()) {
						// find row with test case name
						if (tr.getCellValue(3).equals(notification.getTc())) {
							tr.setCellValue(4, notification.getVerdict());
							tr.setBackgroundColor(ResourceBase.getVerdictColor(notification.getVerdict()));
						}
					}
				}
			}
		}
	}, ModelJobs.newInput(ClientRunContexts.copyCurrent()));
}
 
开发者ID:MSG134,项目名称:IVCT_Framework,代码行数:25,代码来源:TestCaseNotificationHandler.java

示例4: handleNotification

import org.eclipse.scout.rt.client.context.ClientRunContexts; //导入依赖的package包/类
@Override
public void handleNotification(TcStatusNotification notification) {
	// inform client about test case verdict
	ModelJobs.schedule(new IRunnable() {
		@Override
		public void run() throws Exception {
			logger.trace("Test Case Status Notification " + notification.getTc() + " is at "
					+ notification.getPercent() + "%");

			for (IOutline outline : Desktop.CURRENT.get().getAvailableOutlines()) {
				if (outline instanceof BadgeOutline) {
					CapabilityTablePage cTP = (CapabilityTablePage) outline.getActivePage();
					for (ITableRow tr : cTP.getTable().getRows()) {
						// find row with test case name
						if (tr.getCellValue(3).equals(notification.getTc())) {
							tr.setCellValue(4, notification.getStatus() + ": " + notification.getPercent() + "%");
						}
					}
				}
			}
		}
	}, ModelJobs.newInput(ClientRunContexts.copyCurrent()));
}
 
开发者ID:MSG134,项目名称:IVCT_Framework,代码行数:24,代码来源:TcStatusNotificationHandler.java

示例5: handleNotification

import org.eclipse.scout.rt.client.context.ClientRunContexts; //导入依赖的package包/类
@Override
public void handleNotification(OrganizationDealPublishedNotification notification) {
  ModelJobs.schedule(new IRunnable() {

    @Override
    public void run() throws Exception {
      DealFormData deal = notification.getPublishedDeal();
      String statusMessage = TEXTS.get("DealWithNumberWasPublished", deal.getOrderBookType().getValue(), deal.getDealNr());
      Status status = new Status(statusMessage, IStatus.INFO);
      DesktopNotification desktopNotification = new DesktopNotification(status, IDesktopNotification.INFINITE_DURATION, true);
      ClientSession.get().getDesktop().addNotification(desktopNotification);
    }
  }, ModelJobs.newInput(ClientRunContexts.copyCurrent()));
}
 
开发者ID:BSI-Business-Systems-Integration-AG,项目名称:trading-network,代码行数:15,代码来源:OrganizationDealPublishedNotificationHandler.java

示例6: start

import org.eclipse.scout.rt.client.context.ClientRunContexts; //导入依赖的package包/类
public void start() {
  ModelJobs.schedule(new IRunnable() {

    @Override
    public void run() throws Exception {
      runVoid();
    }
  }, ModelJobs.newInput(ClientRunContexts.copyCurrent().withSession(session, true)).withName(name));
}
 
开发者ID:innovad,项目名称:4mila-1.0,代码行数:10,代码来源:FMilaClientSyncJob.java


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