use of org.talend.designer.neo4j.data.Index in project tbd-studio-se by Talend.
the class IndexTableView method createIndexUniqueColumn.
private void createIndexUniqueColumn(TableViewerCreator<Index> tableViewerCreator, Table table) {
TableViewerCreatorColumn<Index, Boolean> column = new TableViewerCreatorColumn<Index, Boolean>(tableViewerCreator);
column.setBeanPropertyAccessors(new IBeanPropertyAccessors<Index, Boolean>() {
@Override
public Boolean get(Index bean) {
return bean.isUnique();
}
@Override
public void set(Index bean, Boolean value) {
bean.setUnique(value);
}
});
column.setTitle("Unique");
column.setModifiable(true);
column.setWidth(60);
column.setImageProvider(new IColumnImageProvider<Index>() {
@Override
public Image getImage(Index bean) {
if (bean.isUnique()) {
return ImageProvider.getImage(EImage.CHECKED_ICON);
} else {
return ImageProvider.getImage(EImage.UNCHECKED_ICON);
}
}
});
column.setDisplayedValue("");
column.setCellEditor(new CheckboxCellEditor(table));
}
use of org.talend.designer.neo4j.data.Index in project tbd-studio-se by Talend.
the class IndexTableView method createIndexKeyColumn.
private void createIndexKeyColumn(TableViewerCreator<Index> tableViewerCreator, final Table table) {
TableViewerCreatorColumn<Index, String> column = new TableViewerCreatorColumn<Index, String>(tableViewerCreator);
// TODO: Internationalize this
column.setTitle("Key");
column.setModifiable(true);
column.setWidth(115);
column.setBeanPropertyAccessors(new IBeanPropertyAccessors<Index, String>() {
@Override
public String get(Index bean) {
return bean.getKey() == null ? "" : bean.getKey();
}
@Override
public void set(Index bean, String value) {
bean.setKey(value);
}
});
column.setCellEditor(new TextCellEditor(table));
}
Aggregations