use of ivorius.reccomplex.gui.table.cell.TableCellString in project RecurrentComplex by Ivorforce.
the class TableDataSourceItemCollectionComponent method cellForIndexInSegment.
@Override
public TableCell cellForIndexInSegment(GuiTable table, int index, int segment) {
if (segment == 0) {
TableCellString cell = new TableCellString(null, key);
cell.setShowsValidityState(true);
cell.setValidityState(currentKeyState());
cell.addPropertyConsumer(val -> {
key = val;
cell.setValidityState(currentKeyState());
});
return new TitledCell(IvTranslations.get("reccomplex.gui.inventorygen.componentid"), cell).withTitleTooltip(IvTranslations.formatLines("reccomplex.gui.inventorygen.componentid.tooltip"));
} else if (segment == 2) {
TableCellString cell = new TableCellString(null, component.inventoryGeneratorID);
cell.setShowsValidityState(true);
cell.setValidityState(currentGroupIDState());
cell.addPropertyConsumer(val -> {
component.inventoryGeneratorID = val;
cell.setValidityState(currentGroupIDState());
});
return new TitledCell(IvTranslations.get("reccomplex.gui.inventorygen.groupid"), cell).withTitleTooltip(IvTranslations.formatLines("reccomplex.gui.inventorygen.groupid.tooltip"));
}
return super.cellForIndexInSegment(table, index, segment);
}
use of ivorius.reccomplex.gui.table.cell.TableCellString in project RecurrentComplex by Ivorforce.
the class TableDataSourceBlockPatternIngredient method cellForIndexInSegment.
@Override
public TableCell cellForIndexInSegment(GuiTable table, int index, int segment) {
if (segment == 0) {
TableCellString cell = new TableCellString("", ingredient.identifier);
cell.addPropertyConsumer(s -> ingredient.identifier = s);
return new TitledCell(IvTranslations.get("reccomplex.blockpattern.ingredient.identifier"), cell);
} else if (segment == 2) {
TableCellBoolean cell = new TableCellBoolean("", ingredient.delete);
cell.addPropertyConsumer(d -> ingredient.delete = d);
return new TitledCell(IvTranslations.get("reccomplex.blockpattern.ingredient.delete"), cell);
}
return super.cellForIndexInSegment(table, index, segment);
}
use of ivorius.reccomplex.gui.table.cell.TableCellString in project RecurrentComplex by Ivorforce.
the class TableDataSourceExpression method cellForIndex.
@Override
public TableCell cellForIndex(GuiTable table, int index) {
if (index == 0) {
expressionCell = new TableCellString("expression", e.getExpression());
expressionCell.setTooltip(expressionTooltip);
expressionCell.setEnabled(canEdit());
expressionCell.setShowsValidityState(true);
expressionCell.setValidityState(getValidityState(e, u));
expressionCell.addPropertyConsumer(val -> {
e.setExpression(val);
expressionCell.setValidityState(getValidityState(e, u));
});
expressionCell.setChangeListener(() -> {
if (parsed != null)
parsed.setDisplayString(parsedString());
});
return new TitledCell(title, expressionCell).withTitleTooltip(tooltip);
} else if (index == 1) {
parsed = new TableCellTitle("parsedExpression", parsedString());
parsed.setPositioning(TableCellTitle.Positioning.TOP);
return new TitledCell(parsed);
}
return null;
}
use of ivorius.reccomplex.gui.table.cell.TableCellString in project RecurrentComplex by Ivorforce.
the class TableDataSourceBTNatural method cellForBlock.
public static TableCellString cellForBlock(String id, String block) {
TableCellString cell = new TableCellString(id, block);
cell.setShowsValidityState(true);
setStateForBlockTextfield(cell);
return cell;
}
use of ivorius.reccomplex.gui.table.cell.TableCellString in project RecurrentComplex by Ivorforce.
the class TableDataSourceConnector method cellForIndex.
@Override
public TableCell cellForIndex(GuiTable table, int index) {
TableCellString cell = new TableCellString("connectorID", connector.id);
cell.addPropertyConsumer(val -> connector.id = val);
return new TitledCell(title, cell).withTitleTooltip(IvTranslations.formatLines("reccomplex.maze.connector.tooltip"));
}
Aggregations