Package net.sf.freecol.common.model
Interface TradeLocation
-
- All Known Implementing Classes:
Colony
,Europe
,IndianSettlement
,ServerColony
,ServerEurope
,ServerIndianSettlement
,TradeRouteStop
public interface TradeLocation
A wrapper interface for a location that can be on a trade route.- See Also:
TradeRoute
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
canBeInput()
Can a TradeLocation be set as the input location on a TradeRouteInputPanelint
getAvailableGoodsCount(GoodsType goodsType)
Get the amount of a given goods type at this trade location.int
getExportAmount(GoodsType goodsType, int turns)
Gets the amount of a given goods type that can be exported from this trade location after a given number of turns.int
getImportAmount(GoodsType goodsType, int turns)
Gets the amount of a given goods type that can be imported to this trade location after a given number of turns.java.lang.String
getLocationName(TradeLocation tradeLocation)
Function for returning the name of a TradeLocationdefault javax.swing.JLabel
getNameAsJlabel()
Get the name of this instance as a JLabel.
-
-
-
Method Detail
-
getAvailableGoodsCount
int getAvailableGoodsCount(GoodsType goodsType)
Get the amount of a given goods type at this trade location.- Parameters:
goodsType
- TheGoodsType
to check.- Returns:
- The amount of goods present.
-
getExportAmount
int getExportAmount(GoodsType goodsType, int turns)
Gets the amount of a given goods type that can be exported from this trade location after a given number of turns.- Parameters:
goodsType
- TheGoodsType
to check.turns
- The number of turns before the goods is required.- Returns:
- The amount of goods to export.
-
getImportAmount
int getImportAmount(GoodsType goodsType, int turns)
Gets the amount of a given goods type that can be imported to this trade location after a given number of turns.- Parameters:
goodsType
- TheGoodsType
to check.turns
- The number of turns before the goods will arrive.- Returns:
- The amount of goods to import.
-
getLocationName
java.lang.String getLocationName(TradeLocation tradeLocation)
Function for returning the name of a TradeLocation- Parameters:
tradeLocation
- TheTradeLocation
to return the name.- Returns:
- The name.
-
getNameAsJlabel
default javax.swing.JLabel getNameAsJlabel()
Get the name of this instance as a JLabel.- Returns:
- The
JLabel
with the result ofgetLocationName(TradeLocation)
-
canBeInput
default boolean canBeInput()
Can a TradeLocation be set as the input location on a TradeRouteInputPanel- Returns:
- True if possible, false by default.
-
-