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

Fix issue 5152, tooltip and icon added to group cell #5191

Merged
merged 3 commits into from
Aug 18, 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
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class MainTableColumnFactory {
private final CellFactory cellFactory;
private final UndoManager undoManager;
private final DialogService dialogService;


public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences preferences, ExternalFileTypes externalFileTypes, UndoManager undoManager, DialogService dialogService) {
this.database = Objects.requireNonNull(database);
Expand All @@ -77,6 +77,8 @@ public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences pre
}

public List<TableColumn<BibEntryTableViewModel, ?>> createColumns() {


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkstyle is failing because of one empty line after another

List<TableColumn<BibEntryTableViewModel, ?>> columns = new ArrayList<>();

columns.add(createGroupColumn());
Expand Down Expand Up @@ -116,8 +118,11 @@ public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences pre

private TableColumn<BibEntryTableViewModel, ?> createGroupColumn() {
TableColumn<BibEntryTableViewModel, List<AbstractGroup>> column = new TableColumn<>();
column.getStyleClass().add(GROUP_COLUMN);
setExactWidth(column, 20);
Node headerGraphic = IconTheme.JabRefIcons.DEFAULT_GROUP_ICON.getGraphicNode();
Tooltip.install(headerGraphic, new Tooltip(Localization.lang("Group color")));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to put the key "Group color" into the english language resource file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers for your feedback. I just wonder why codecov/project test failed on the second attempt.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codecov is also a mystery to me. It somehow displays the test coverage of the code, but I have no clue how it calculates. I had an PR where i just changed one line and the coverage changed for about 0.07% from fail to pass. But I think it can be ignored for the most gui-stuff. At least the core developers did not bring it up yet. 😁

column.setGraphic(headerGraphic);
column.getStyleClass().add(ICON_COLUMN);
setExactWidth(column, GUIGlobals.WIDTH_ICON_COL);
column.setCellValueFactory(cellData -> cellData.getValue().getMatchedGroups(database));
new ValueTableCellFactory<BibEntryTableViewModel, List<AbstractGroup>>()
.withGraphic(this::createGroupColorRegion)
Expand Down