use of org.eclipse.scout.rt.client.ui.basic.cell.Cell in project scout.rt by eclipse.
the class AbstractProposalColumn2 method updateDisplayText.
@Override
public void updateDisplayText(ITableRow row, LOOKUP_TYPE value) {
Cell cell = row.getCellForUpdate(this);
updateDisplayText(row, cell, (String) value);
}
use of org.eclipse.scout.rt.client.ui.basic.cell.Cell in project scout.rt by eclipse.
the class AbstractSmartColumn2 method applyLookupResult.
protected void applyLookupResult(ITableRow tableRow, List<? extends ILookupRow<?>> result) {
// disable row changed trigger on row
try {
tableRow.setRowChanging(true);
//
Cell cell = tableRow.getCellForUpdate(this);
String separator = getResultRowSeparator();
List<String> texts = CollectionUtility.emptyArrayList();
List<String> tooltipTexts = CollectionUtility.emptyArrayList();
for (ILookupRow<?> row : result) {
texts.add(row.getText());
tooltipTexts.add(row.getTooltipText());
}
cell.setText(StringUtility.join(separator, texts));
cell.setTooltipText(StringUtility.join(separator, tooltipTexts));
} finally {
tableRow.setRowPropertiesChanged(false);
tableRow.setRowChanging(false);
}
}
use of org.eclipse.scout.rt.client.ui.basic.cell.Cell in project scout.rt by eclipse.
the class TableRow method setCell.
@Override
public void setCell(int columnIndex, ICell cell) {
if (cell != null) {
getCellForUpdate(columnIndex);
m_cells.set(columnIndex, new Cell(null, cell));
}
}
use of org.eclipse.scout.rt.client.ui.basic.cell.Cell in project scout.rt by eclipse.
the class AbstractBigIntegerColumnTest method testFormattingInDecorateCellInternal.
@Test
public void testFormattingInDecorateCellInternal() {
ITableRow row = Mockito.mock(ITableRow.class);
Cell cell = new Cell();
BigInteger testValue = BigInteger.valueOf(-123456789);
cell.setValue(testValue);
DecimalFormat df = BEANS.get(NumberFormatProvider.class).getNumberInstance(Locale.CANADA_FRENCH);
setFormat(df);
updateDisplayText(row, cell);
assertEquals("cell text not formatted as expected", df.format(testValue), cell.getText());
}
use of org.eclipse.scout.rt.client.ui.basic.cell.Cell in project scout.rt by eclipse.
the class AbstractPage method initPage.
/*
* Runtime
*/
@Override
public void initPage() {
setInitializing(true);
try {
Cell cell = getCellForUpdate();
if (cell.getText() == null && getConfiguredTitle() != null) {
cell.setText(getConfiguredTitle());
}
if (cell.getIconId() == null && getConfiguredIconId() != null) {
cell.setIconId(getConfiguredIconId());
}
interceptInitPage();
// early permission check is done on initialization
if (!doCalculateVisibleLate()) {
calculateVisibleInternal();
}
fireAfterPageInit();
} finally {
setInitializing(false);
}
}
Aggregations