本文整理汇总了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()));
}
示例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()));
}
示例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()));
}
示例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));
}