本文整理匯總了Java中net.sf.freecol.client.gui.dialog.NativeDemandDialog類的典型用法代碼示例。如果您正苦於以下問題:Java NativeDemandDialog類的具體用法?Java NativeDemandDialog怎麽用?Java NativeDemandDialog使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
NativeDemandDialog類屬於net.sf.freecol.client.gui.dialog包,在下文中一共展示了NativeDemandDialog類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: showNativeDemandDialog
import net.sf.freecol.client.gui.dialog.NativeDemandDialog; //導入依賴的package包/類
/**
* Display a dialog to handle a native demand to a colony.
*
* @param unit The demanding {@code Unit}.
* @param colony The {@code Colony} being demanded of.
* @param type The {@code GoodsType} demanded (may be null for gold).
* @param amount The amount of goods demanded.
* @param handler A {@code DialogHandler} for the dialog response.
*/
public void showNativeDemandDialog(Unit unit, Colony colony,
GoodsType type, int amount,
DialogHandler<Boolean> handler) {
SwingUtilities.invokeLater(
new DialogCallback<>(
new NativeDemandDialog(freeColClient, frame, unit, colony,
type, amount),
unit.getTile(), handler));
}