Tabnine Logo
StaticTextTableCell
Code IndexAdd Tabnine to your IDE (free)

How to use
StaticTextTableCell
in
ch.sahits.game.openpatrician.javafx.model

Best Java code snippets using ch.sahits.game.openpatrician.javafx.model.StaticTextTableCell (Showing top 20 results out of 315)

origin: ch.sahits.game/OpenPatricianDisplay

private void addEmptyRow(Table model) {
  TableRow row;
  row = new TableRow();
  row.add(new StaticTextTableCell(""));
  row.add(new StaticTextTableCell(""));
  row.add(new StaticTextTableCell(""));
  row.add(new StaticTextTableCell(""));
  model.add(row);
}
private static class LevelBinding extends StringBinding {
origin: ch.sahits.game/OpenPatricianJavaFX

/**
 * Adding a table cell to the grid
 * @param grid grid pant to which to add.
 * @param rowNum row index
 * @param row table row
 * @param col column index
 * @param cell the node is pased on
 * @param hAlignment horizontal alignment
 * @param textStyleClass style class for the text
 */
public void addCellToGridPane(GridPane grid,  int rowNum, TableRow row, int col, ITableCell cell, HPos hAlignment, String textStyleClass) {
  if (cell instanceof StaticTextTableCell) {
    Text text = new Text(((StaticTextTableCell)cell).getValue());
    text.getStyleClass().add(textStyleClass);
    addCellToGridPane(rowNum, row, col, cell, text, grid, hAlignment);
  } else if (cell instanceof DynamicTextTableCell) {
    DynamicTextTableCell dynCell = (DynamicTextTableCell) cell;
    Text text = new Text();
    text.textProperty().bind(dynCell.valueProperty());
    text.getStyleClass().add(textStyleClass);
    addCellToGridPane(rowNum, row, col, cell, text, grid, hAlignment);
  } else if (cell instanceof ControlTableCell) {
    final Node control = ((ControlTableCell) cell).getControl();
    addCellToGridPane(rowNum, row, col, cell, control, grid, hAlignment);
  } else {
    throw new RuntimeException("Not implemented");
  }
}
/**
origin: ch.sahits.game/OpenPatricianDisplay

private Table createModel() {
  Table model = new Table();
  TableHeader header = new TableHeader(2);
  header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.model.people.impl.WeaponsDealerState.noticeboardTitle", new Object[]{}, locale.getCurrentLocal())));
  header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.WeaponInventoryDialog.inStock", new Object[]{}, locale.getCurrentLocal())));
  header.setAligenment(0, HPos.RIGHT);
  header.setAligenment(1, HPos.RIGHT);
  model.setHeader(header);
  model.setColumnWidth(100, 200);
  for (EWeapon weapon : EWeapon.values()) {
    TableRow row = new TableRow();
    row.add(new StaticTextTableCell(translator.getLocalDisplayName(weapon)));
    row.add(new StaticTextTableCell(String.valueOf(weaponStorage.getWeapon(weapon))));
    model.add(row);
  }
    return model;
}
@Override
origin: ch.sahits.game/OpenPatricianDisplay

@Override
protected Table createMainTable() {
  Table model = new Table();
  // Add dummy header which is not rendered
  TableHeader header = new TableHeader(2);
  header.add(new StaticTextTableCell(""));
  header.add(new StaticTextTableCell(""));
  model.setHeader(header);
  model.setColumnWidth(150, 200);
  TableRow row = new TableRow();
  row.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.ShipyardRenameDialogV2.shipName", new Object[]{}, locale.getCurrentLocal())));
  shipNameInput = new OpenPatricianDialogInput("");
  shipNameInput.getStyleClass().add("defaultLabelFont");
  shipNameInput.textProperty().bindBidirectional(shipName);
  row.add(new ControlTableCell(shipNameInput));
  model.add(row);
  return model;
}
origin: ch.sahits.game/OpenPatricianDisplay

@Override
protected Table createTopTable() {
  Table model = new Table();
  // Add dummy header which is not rendered
  TableHeader header = new TableHeader(4);
  model.setHeader(header);
  model.setColumnWidth(70, 70, 70, 70);
  TableRow row = new TableRow();
  BarrelAmount capacityAmount = new BarrelAmount();
  capacityAmount.setAmount(currentShip.get().getLoadableSpace());
  row.add(new ControlTableCell(capacityAmount));
  row.add(new StaticTextTableCell(String.valueOf(100 - currentShip.get().getDamage())));
  row.add(new StaticTextTableCell(String.valueOf(currentShip.get().getNumberOfSailors())));
  row.add(new StaticTextTableCell("1"));
  model.add(row);
  return model;
}
origin: ch.sahits.game/OpenPatricianDisplay

@Override
protected Table createTopTable() {
  int capacity = shipFactory.calculateInitialCapacity(getCurrentShipType(), getCity().getCoordinates().getX());
  List<IWeaponSlot> shipWeapons = weaponsLocationFactory.getShipWeaponsLocation(getCurrentShipType(), EShipUpgrade.NONE);
  Table model = new Table();
  // Add dummy header which is not rendered
  TableHeader header = new TableHeader(5);
  model.setHeader(header);
  model.setColumnWidth(70, 70, 70, 70, 70);
  TableRow row = new TableRow();
  BarrelAmount capacityAmount = new BarrelAmount();
  capacityAmount.setAmount(capacity);
  row.add(new ControlTableCell(capacityAmount));
  WeaponSlotCount slotCount = shipService.getWeaponSlotCount(shipWeapons);
  row.add(new StaticTextTableCell(String.valueOf(slotCount.getNbSmallSlots())));
  row.add(new StaticTextTableCell(String.valueOf(slotCount.getNbLargeSlots())));
  row.add(new StaticTextTableCell(String.valueOf(shipFactory.getShipSpeed(getCurrentShipType()))));
  row.add(new StaticTextTableCell(String.valueOf(shipFactory.getMinimalSailors(getCurrentShipType()))));
  model.add(row);
  return model;
}
origin: ch.sahits.game/OpenPatricianDisplay

@Override
protected Table createTopTable() {
  int capacity = shipFactory.calculateInitialCapacity(getCurrentShipType(), getCity().getCoordinates().getX());
  List<IWeaponSlot> shipWeapons = weaponsLocationFactory.getShipWeaponsLocation(getCurrentShipType(), EShipUpgrade.NONE);
  Table model = new Table();
  // Add dummy header which is not rendered
  TableHeader header = new TableHeader(5);
  model.setHeader(header);
  model.setColumnWidth(70, 70, 70, 70, 70);
  TableRow row = new TableRow();
  BarrelAmount capacityAmount = new BarrelAmount();
  capacityAmount.setAmount(capacity);
  row.add(new ControlTableCell(capacityAmount));
  WeaponSlotCount slotCount = shipService.getWeaponSlotCount(shipWeapons);
  row.add(new StaticTextTableCell(String.valueOf(slotCount.getNbSmallSlots())));
  row.add(new StaticTextTableCell(String.valueOf(slotCount.getNbLargeSlots())));
  row.add(new StaticTextTableCell(String.valueOf(shipFactory.getShipSpeed(getCurrentShipType()))));
  row.add(new StaticTextTableCell(String.valueOf(shipFactory.getMinimalSailors(getCurrentShipType()))));
  model.add(row);
  return model;
}
origin: ch.sahits.game/OpenPatricianDisplay

@Override
protected Table createTopTable() {
  Table model = new Table();
  // Add dummy header which is not rendered
  TableHeader header = new TableHeader(3);
  model.setHeader(header);
  model.setColumnWidth(70, 70, 70);
  TableRow row = new TableRow();
  BarrelAmount capacityAmount = new BarrelAmount();
  capacityAmount.setAmount(currentShip.get().getLoadableSpace());
  row.add(new ControlTableCell(capacityAmount));
  row.add(new StaticTextTableCell(String.valueOf(100 - currentShip.get().getDamage())));
  row.add(new StaticTextTableCell(String.valueOf(currentShip.get().getNumberOfSailors())));
  model.add(row);
  return model;
}
@Override
origin: ch.sahits.game/OpenPatricianDisplay

header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.armory.HandWeaponDialog.header.amrory", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.armory.HandWeaponDialog.header.buy", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.armory.HandWeaponDialog.header.prio", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.armory.HandWeaponDialog.header.tradingOffice", new Object[]{}, locale.getCurrentLocal())));
header.setAligenment(0, HPos.RIGHT);
header.setAligenment(1, HPos.RIGHT);
origin: ch.sahits.game/OpenPatricianDisplay

header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.armory.ShipWeaponDialog.header.amrory", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.armory.ShipWeaponDialog.header.buy", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.armory.ShipWeaponDialog.header.sell", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.armory.ShipWeaponDialog.header.tradingOffice", new Object[]{}, locale.getCurrentLocal())));
header.setAligenment(0, HPos.RIGHT);
header.setAligenment(1, HPos.RIGHT);
origin: ch.sahits.game/OpenPatricianDisplay

Table model = new Table();
TableHeader header = new TableHeader(5);
header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
header.setAligenment(0, HPos.RIGHT);
header.setAligenment(1, HPos.LEFT);
model.setColumnWidth(100, 50, 100, 50, 150);
TableRow row = new TableRow();
row.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TradeOfficeBalanceDialog.rentalIncome", new Object[]{}, locale.getCurrentLocal())));
row.add(new StaticTextTableCell(""));
StringBinding rentalIncomeLastWeek = new DateBoundStringProperty() {
  @Override
coinPrice.amountProperty().bind(rentalIncomeLastWeek);
row.add(new ControlTableCell(coinPrice));
row.add(new StaticTextTableCell(""));
StringBinding rentalIncomeForecast = new DateBoundStringProperty() {
  @Override
row.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TradeOfficeBalanceDialog.wages", new Object[]{}, locale.getCurrentLocal())));
row.add(new StaticTextTableCell(""));
StringBinding wagesIncomeLastWeek = new DateBoundStringProperty() {
  @Override
coinPrice.amountProperty().bind(wagesIncomeLastWeek);
origin: ch.sahits.game/OpenPatricianDisplay

@Override
protected Table createMainTable() {
  Table model = new Table();
  // Add dummy header which is not rendered
  TableHeader header = new TableHeader(1);
  model.setHeader(header);
  model.setColumnWidth(200);
  TableRow row = new TableRow();
  row.add(new StaticTextTableCell(currentShip.get().getName()));
  model.add(row);
  return model;
}
origin: ch.sahits.game/OpenPatricianDisplay

header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.BaseTradeDialog.ware", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.CityProductionConsumptionDialog.stock", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.BaseTradeDialog.city", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.CityProductionConsumptionDialog.shops", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.CityProductionConsumptionDialog.pop", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.CityProductionConsumptionDialog.shops", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.CityProductionConsumptionDialog.tot", new Object[]{}, locale.getCurrentLocal())));
model.setHeader(header);
model.setAligenment(0, HPos.RIGHT);
  TableRow row = new TableRow();
  row.add(new StaticTextTableCell(translator.getLocalDisplayName(ware)));
origin: ch.sahits.game/OpenPatricianDisplay

header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
model.setHeader(header);
model.setAligenment(0, HPos.LEFT);
row.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.StorageOverviewDialog.requiredCapacity", new Object[]{}, locale.getCurrentLocal())));
row.add(new StaticTextTableCell(""));
Text amount = new Text();
amount.getStyleClass().add("dialogText");
row.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.StorageOverviewDialog.availableCap", new Object[]{}, locale.getCurrentLocal())));
row.add(new StaticTextTableCell(""));
Text capacityTxt = new Text();
capacityTxt.getStyleClass().add("dialogText");
row.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.StorageOverviewDialog.additionalCap", new Object[]{}, locale.getCurrentLocal())));
row.add(new StaticTextTableCell(""));
IntegerBinding additionalAmount = new IntegerBinding() {
row.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.StorageOverviewDialog.otherGoods", new Object[]{}, locale.getCurrentLocal())));
row.add(new StaticTextTableCell(""));
Text otherTxt = new Text();
otherTxt.getStyleClass().add("dialogText");
row.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.StorageOverviewDialog.costs", new Object[]{}, locale.getCurrentLocal())));
row.add(new StaticTextTableCell(""));
Text storageCosts = new Text();
origin: ch.sahits.game/OpenPatricianDisplay

Table model = new Table();
TableHeader header = new TableHeader(4);
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.BaseTradeDialog.ware", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.WareInStockDialog.stockInCity", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.WareInStockDialog.fromCity", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.WareInStockDialog.toCity", new Object[]{}, locale.getCurrentLocal())));
header.setAligenment(0, HPos.RIGHT);
header.setAligenment(1, HPos.CENTER);
for (EWare ware : EWare.values()) {
  TableRow row = new TableRow();
  row.add(new StaticTextTableCell(translator.getLocalDisplayName(ware)));
origin: ch.sahits.game/OpenPatricianDisplay

header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.WeaponTransferDialog.header.weapon", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.WeaponTransferDialog.header.ship", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.WeaponTransferDialog.header.transfer", new Object[]{}, locale.getCurrentLocal())), ECellConstraint.COLSPAN2);
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.WeaponTransferDialog.header.storage", new Object[]{}, locale.getCurrentLocal())));
header.setAligenment(0, HPos.RIGHT);
header.setAligenment(1, HPos.RIGHT);
for (EWeapon weapon : weapons) {
  TableRow row = new TableRow();
  row.add(new StaticTextTableCell(translator.getLocalDisplayName(weapon)));
  DynamicTextTableCell shipAmount = new DynamicTextTableCell();
  IntegerBinding shipAmountBinding = shipAmount(weapon, ship);
origin: ch.sahits.game/OpenPatricianDisplay

String s = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.BaseTradeDialog.ware", new Object[]{}, locale.getCurrentLocal());
header.add(new StaticTextTableCell(s));
s = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.CityStorageTradeDialog.storage", new Object[]{}, locale.getCurrentLocal());
header.add(new StaticTextTableCell(s));
header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
s = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.church.ChurchFeedingDialog.donation", new Object[]{}, locale.getCurrentLocal());
header.add(new StaticTextTableCell(s));
header.setAligenment(0, HPos.LEFT);
header.setAligenment(1, HPos.CENTER);
for (final EWare ware : MATERIALS) {
  final TableRow row = new TableRow();
  row.add(new StaticTextTableCell(translator.getLocalDisplayName(ware)));
origin: ch.sahits.game/OpenPatricianDisplay

header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TavernWeaponsDealerDialog.weaponType", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TavernWeaponsDealerDialog.dealer", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.BaseTradeDialog.buy", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.BaseTradeDialog.sell", new Object[]{}, locale.getCurrentLocal())));
Text storageHeader = new Text();
storageHeader.getStyleClass().add("dialogText");
  row.add(new StaticTextTableCell(translator.getLocalDisplayName(weapon)));
  Text dealerAmount = new Text();
  dealerAmount.getStyleClass().add("dialogText");
origin: ch.sahits.game/OpenPatricianDisplay

header.add(new StaticTextTableCell(""));
header.add(new StaticTextTableCell(""));
tableModel.setHeader(header);
tableModel.setColumnWidth(300, 100);
row.add(new StaticTextTableCell(template));
CoinPriceAlwaysVisible control = new CoinPriceAlwaysVisible();
control.amountProperty().bind(treasury.paidTaxesProperty().asString());
row.add(new StaticTextTableCell(template));
control = new CoinPriceAlwaysVisible();
control.amountProperty().bind(treasury.paidSpecialTaxesProperty().asString());
row.add(new StaticTextTableCell(template));
control = new CoinPriceAlwaysVisible();
control.amountProperty().bind(treasury.donationsProperty().asString());
row.add(new StaticTextTableCell(template));
control = new CoinPriceAlwaysVisible();
control.amountProperty().bind(treasury.cityGuardCostsProperty().asString());
row.add(new StaticTextTableCell(template));
control = new CoinPriceAlwaysVisible();
control.amountProperty().bind(treasury.buildingCostsProperty().asString());
row.add(new StaticTextTableCell(template));
control = new CoinPriceAlwaysVisible();
control.amountProperty().bind(treasury.outriggerCostsProperty().asString());
origin: ch.sahits.game/OpenPatricianDisplay

Table model = new Table();
TableHeader header = new TableHeader(5);
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.ShipyardConstructionDialogV2.materials", new Object[]{}, locale.getCurrentLocal())), ECellConstraint.COLSPAN2);
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.ShipyardConstructionDialogV2.stored", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.ShipyardConstructionDialogV2.buy", new Object[]{}, locale.getCurrentLocal())));
header.add(new StaticTextTableCell(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.ShipyardConstructionDialogV2.costs", new Object[]{}, locale.getCurrentLocal())));
header.setAligenment(0, HPos.CENTER);
header.setAligenment(2, HPos.CENTER);
  row.add(new StaticTextTableCell(translator.getLocalDisplayName(ware)));
ch.sahits.game.openpatrician.javafx.modelStaticTextTableCell

Javadoc

Table cell containing a static text value.

Most used methods

  • <init>
  • getValue

Popular in Java

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Collectors (java.util.stream)
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now