本文整理汇总了Java中net.sf.freecol.common.networking.CloseMessage类的典型用法代码示例。如果您正苦于以下问题:Java CloseMessage类的具体用法?Java CloseMessage怎么用?Java CloseMessage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CloseMessage类属于net.sf.freecol.common.networking包,在下文中一共展示了CloseMessage类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: complete
import net.sf.freecol.common.networking.CloseMessage; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected boolean complete(boolean result) {
ChangeSet cs = new ChangeSet();
boolean ret = super.complete(cs);
if (!ret) {
completeInternal(result, cs);
cs.add(See.only(getColonyOwner()),
new CloseMessage("net.sf.freecol.client.gui.dialog.NativeDemandDialog"));
getGame().sendToAll(cs);
}
return ret;
}
示例2: complete
import net.sf.freecol.common.networking.CloseMessage; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected boolean complete(boolean result) {
final String dialogName = "net.sf.freecol.client.gui.dialog.NegotiationDialog";
ChangeSet cs = new ChangeSet();
boolean ret = complete(false, cs);
if (!ret) { // Withdraw offer
cs.add(See.only((ServerPlayer)this.agreement.getSender()),
new CloseMessage(dialogName));
cs.add(See.only((ServerPlayer)this.agreement.getRecipient()),
new CloseMessage(dialogName));
}
getGame().sendToAll(cs);
return ret;
}