* @return the available amount
* @throws FontFormatException Error while creating a font
* @throws IOException Error while reading a resource
*/
private int drawAvailableAmount(Graphics2D g2d, ICity city, ITradingOffice office, IWare ware,BufferedImage barrel, BufferedImage bale,int y) throws FontFormatException, IOException{
AmountablePrice available;
switch (type) {
case CITY_TO_SHIP:
case CITY_TO_STORAGE:
available = city.getWare(ware);
break;
default:
available = office.getWare(ware);
break;
}
int availableAmount = available.getAmount();
int value = availableAmount; // amount available
if (value>0){
GlyphVector gv = opPainter.createGlyphVector(g2d, String.valueOf(value), 18);
g2d.drawGlyphVector(gv, positions.xCity, y);
// draw barrel or burden