Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorderable columns in maintable for groups, URI, file and eprint #5544

Merged
merged 17 commits into from
Nov 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed bug in persistent view
calixtus committed Nov 1, 2019
commit 18af53512f10a1dbd24206f7ba349523da73fb35
Original file line number Diff line number Diff line change
@@ -47,6 +47,11 @@ public static Type parse(String text) {
case "field":
default: return NORMALFIELD;
}
/* try {
return Type.valueOf(text);
} catch (IllegalArgumentException iae) {
return NORMALFIELD;
} */
}
}

Original file line number Diff line number Diff line change
@@ -26,8 +26,10 @@ public PersistenceVisualStateTable(final MainTable mainTable, JabRefPreferences
this.preferences = preferences;

mainTable.getColumns().addListener(this::onColumnsChanged);
mainTable.getColumns().forEach(col -> col.sortTypeProperty().addListener(obs ->
updateColumnSortType(col.getText(), col.getSortType())));
mainTable.getColumns().forEach(col -> {
MainTableColumn column = (MainTableColumn) col;
col.sortTypeProperty().addListener(obs -> updateColumnSortType(column.getModel().toString(), column.getSortType()));
});
mainTable.getColumns().forEach(col -> col.widthProperty().addListener(obs -> updateColumnPreferences()));

}
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ public void fillColumnList() {
private void insertSpecialFieldColumns() {
EnumSet.allOf(SpecialField.class).stream()
.map(Field::getName).map(name -> new MainTableColumnModel(MainTableColumnModel.Type.SPECIALFIELD, name))
.forEach(item -> availableColumnsProperty.getValue().add(3, item));
.forEach(item -> availableColumnsProperty.getValue().add(0, item));
}

private void removeSpecialFieldColumns() {