congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • 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