// Sub title (dynamic)
// City name
y += positions.titleHeigth;
int leftBorderX = getBounds().x+getInset().left;
int x = leftBorderX + 20;
ICity cityModel = city.getCity();
GlyphVector gv = OpenPatricianPainter.createGlyphVector(g2d, cityModel.getName()+" "+cityModel.getPopulation(), 18);
y += (int)Math.rint(positions.titleHeigth*2/3);
g2d.drawGlyphVector(gv, x, y);
// Barrel icon
x += (int)Math.rint(gv.getVisualBounds().getWidth())+50;
BufferedImage barrel = loader.getImage("barrel_icon");
BufferedImage bale = loader.getImage("bale_icon");
g2d.drawImage(barrel, x, y-(int)Math.rint(positions.titleHeigth), null); // Is y correct ???
// loaded on ship and ship capacity
x += 50;
IShip ship = city.getActiveShip();
StringBuilder sb = new StringBuilder();
sb.append(ship.getLoad()).append(" / ").append(ship.getSize()).append(" ").append(ship.getName());
gv = OpenPatricianPainter.createGlyphVector(g2d, sb.toString(), 18);
g2d.drawGlyphVector(gv, x, y); // TODO this is a dynamic line
BufferedImage waxSeal = loader.getImage("waxseal");
// Table header
y += positions.lineHeight; // more space to the title
y += positions.lineHeight;
// Table
EWare[] wares = EWare.values();
for (EWare ware : wares) {
// Ware name
y += positions.lineHeight;
// Available amount in the city
AmountablePrice<EWare> wareInCity = cityModel.getWare(ware);
int availableAmount = wareInCity.getAmount();
int value = availableAmount; // amount available
if (value>0){
gv = OpenPatricianPainter.createGlyphVector(g2d, String.valueOf(value), 18);
g2d.drawGlyphVector(gv, positions.xCity, y);