本文整理匯總了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;
}