use of com.android.tools.idea.editors.strings.table.StringResourceTable in project android by JetBrains.
the class TranslationsEditorTest method setModel.
@Test
public void setModel() {
StringResourceTable table = (StringResourceTable) myTranslationsEditor.getTable().target();
OptionalInt optionalWidth = table.getKeyColumnPreferredWidth();
TableColumnModel model = table.getColumnModel();
assertTrue(optionalWidth.isPresent());
assertEquals(optionalWidth.getAsInt(), model.getColumn(KEY_COLUMN).getPreferredWidth());
optionalWidth = table.getDefaultValueAndLocaleColumnPreferredWidths();
int width = optionalWidth.getAsInt();
assertTrue(optionalWidth.isPresent());
IntStream.range(DEFAULT_VALUE_COLUMN, table.getColumnCount()).mapToObj(model::getColumn).forEach(column -> assertEquals(width, column.getPreferredWidth()));
}
use of com.android.tools.idea.editors.strings.table.StringResourceTable in project android by JetBrains.
the class StringResourceViewPanel method createUIComponents.
private void createUIComponents() {
myTable = new StringResourceTable();
createDefaultValueTextField();
createTranslationTextField();
}
Aggregations