congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DynamicTextTableCell
Code IndexAdd Tabnine to your IDE (free)

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

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

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

TableRow row = new TableRow();
row.add(new StaticTextTableCell(translator.getLocalDisplayName(weapon)));
DynamicTextTableCell shipAmount = new DynamicTextTableCell();
IntegerBinding shipAmountBinding = shipAmount(weapon, ship);
shipAmount.valueProperty().bind(shipAmountBinding.asString());
toOffice.disableProperty().bind(shipAmountBinding.lessThan(1));
row.add(new ControlTableCell(toOffice)); // to office
DynamicTextTableCell officeAmount = new DynamicTextTableCell();
officeAmount.valueProperty().bind(storageAmount(weapon).asString());
row.add(officeAmount);
model.add(row);
origin: ch.sahits.game/OpenPatricianDisplay

ImageView imgView = new ImageView(img);
row.add(new ControlTableCell(imgView));
DynamicTextTableCell weaponAmountInArmory = new DynamicTextTableCell();
weaponAmountInArmory.valueProperty().bind(getAmountInArmoryAsStringBinding(weapon));
row.add(weaponAmountInArmory);
IntegerBinding weaponPrice = buyPriceBinding(weapon);
row.add(new ControlTableCell(prioView));
DynamicTextTableCell weaponsInStorage = new DynamicTextTableCell();
weaponsInStorage.valueProperty().bind(weaponStorage.getWeaponProperty(weapon).asString());
row.add(weaponsInStorage);
return row;
origin: ch.sahits.game/OpenPatricianDisplay

ImageView imgView = new ImageView(img);
row.add(new ControlTableCell(imgView));
DynamicTextTableCell weaponAmountInArmory = new DynamicTextTableCell();
weaponAmountInArmory.valueProperty().bind(getAmountInArmoryAsStringBinding(weapon));
row.add(weaponAmountInArmory);
DynamicTextTableCell weaponsInStorage = new DynamicTextTableCell();
weaponsInStorage.valueProperty().bind(weaponStorage.getWeaponProperty(weapon).asString());
row.add(weaponsInStorage);
return row;
ch.sahits.game.openpatrician.javafx.modelDynamicTextTableCell

Javadoc

Table vell containing a dynamic text that needs to be bound.

Most used methods

  • valueProperty
  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 21 Best Atom Packages for 2021
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