| Modifier and Type | Field and Description |
|---|---|
| private final AiService | |
| private final Comparator | |
| private final Comparator | |
| private final Comparator | |
| private final Comparator | |
| private Optional | |
| private final DialogService | |
| private final ObjectProperty | |
| private final StringProperty | |
| private final CustomLocalDragboard | |
| private @Nullable MetaData | |
| private final GuiPreferences | |
| private final ObjectProperty | |
| private final ListProperty | |
| private final StateManager | |
| private final TaskExecutor |
| Access | Constructor and Description |
|---|---|
| public | GroupTreeViewModel(@NonNull StateManager stateManager, @NonNull BibEntryTypesManager entryTypesManager, @NonNull GuiPreferences preferences, @NonNull DialogService dialogService, @NonNull AiService aiService, @NonNull CustomLocalDragboard localDragboard, @NonNull TaskExecutor taskExecutor)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addNewSubgroup(GroupNodeViewModel parent, GroupDialogHeader groupDialogHeader)
Opens "New Group Dialog" and adds the resulting group as subgroup to the specified group |
| public void | addSelectedEntries(GroupNodeViewModel group)
Todo warn before assigning to a group whose membership is written to a field other than
|
| public void | addSuggestedGroups(GroupNodeViewModel
The "All Entries" parent node. parent)Adds JabRef suggested groups under the "All Entries" parent node. |
| public void | |
| public void | |
| private void | |
| public void | editGroup(GroupNodeViewModel oldGroup)
Opens "Edit Group Dialog" and changes the given group to the edited one. |
| public ObjectProperty | |
| public StringProperty | |
| public void | |
| public void | |
| private boolean | |
| public void | listen(GroupUpdatedEvent event)
Rebuilds the displayed group tree when the group root was replaced underneath it -
e.g. applied from a shared database (see |
| private void | onActiveDatabaseChanged(Optional<BibDatabaseContext> newDatabase)
Gets invoked if the user changes the active database. |
| pack-priv boolean | Returns: true if just trivial modifications (e.g. color or description) or the relevant group properties are equal, false otherwiseOriginal Group oldGroup, AbstractGroup Edited group newGroup)Check if it is necessary to show a group modified, reassign entry dialog Group name change is handled separately |
| private void | onSelectedGroupChanged(ObservableList<GroupNodeViewModel> newValue)
Gets invoked if the user selects a different group. |
| private void | recordEntryChange(String name, Consumer<CompoundEdit> operation)
Records entry assignments as one undo step. |
| public void | recordTreeChange(String name, Consumer<CompoundEdit> operation)
Runs a group operation and records it as one undo step, tree and entries together. |
| public void | recordTreeChange(String name, Runnable operation)
For a gesture handler that has no changes of its own to hand over — see
|
| private void | |
| public void | removeGroupAndSubgroups(GroupNodeViewModel group)
Removes the specified group and its subgroups (after asking for confirmation). |
| public void | |
| public void | removeGroupNoSubgroups(GroupNodeViewModel group)
Removes the specified group (after asking for confirmation). |
| pack-priv void | removeGroupsAndSubGroupsFromEntries(GroupNodeViewModel group, CompoundEdit
collects the entry changes, so that undoing the removal puts the assignments back edit)
|
| public void | removeSelectedEntries(GroupNodeViewModel group)
See |
| public void | |
| public ObjectProperty | |
| public ListProperty | |
| public void | |
| public void | |
| public void | |
| public void | |
| private void | writeBackAndRecord(MetaData metaData, Optional<GroupTreeNode> before, CompoundEdit edit)
Writes the view models back to the metadata and records the tree change, if there is one. |
| public void | |
| private void |
| aiService | back to summary |
|---|---|
| private final AiService aiService | |
| compAlphabetIgnoreCase | back to summary |
|---|---|
| private final Comparator<GroupTreeNode> compAlphabetIgnoreCase | |
| compAlphabetIgnoreCaseReverse | back to summary |
|---|---|
| private final Comparator<GroupTreeNode> compAlphabetIgnoreCaseReverse | |
| compEntries | back to summary |
|---|---|
| private final Comparator<GroupTreeNode> compEntries | |
| compEntriesReverse | back to summary |
|---|---|
| private final Comparator<GroupTreeNode> compEntriesReverse | |
| currentDatabase | back to summary |
|---|---|
| private Optional<BibDatabaseContext> currentDatabase | |
| dialogService | back to summary |
|---|---|
| private final DialogService dialogService | |
| filterPredicate | back to summary |
|---|---|
| private final ObjectProperty<Predicate<GroupNodeViewModel>> filterPredicate | |
| filterText | back to summary |
|---|---|
| private final StringProperty filterText | |
| localDragboard | back to summary |
|---|---|
| private final CustomLocalDragboard localDragboard | |
| observedMetaData | back to summary |
|---|---|
| private @Nullable MetaData observedMetaData | |
| preferences | back to summary |
|---|---|
| private final GuiPreferences preferences | |
| rootGroup | back to summary |
|---|---|
| private final ObjectProperty<GroupNodeViewModel> rootGroup | |
| selectedGroups | back to summary |
|---|---|
| private final ListProperty<GroupNodeViewModel> selectedGroups | |
| stateManager | back to summary |
|---|---|
| private final StateManager stateManager | |
| taskExecutor | back to summary |
|---|---|
| private final TaskExecutor taskExecutor | |
| GroupTreeViewModel | back to summary |
|---|---|
| public GroupTreeViewModel(@NonNull StateManager stateManager, @NonNull BibEntryTypesManager entryTypesManager, @NonNull GuiPreferences preferences, @NonNull DialogService dialogService, @NonNull AiService aiService, @NonNull CustomLocalDragboard localDragboard, @NonNull TaskExecutor taskExecutor) | |
| addNewGroupToRoot | back to summary |
|---|---|
| public void addNewGroupToRoot() Opens "New Group Dialog" and add the resulting group to the root | |
| addNewSubgroup | back to summary |
|---|---|
| public void addNewSubgroup(GroupNodeViewModel parent, GroupDialogHeader groupDialogHeader) Opens "New Group Dialog" and adds the resulting group as subgroup to the specified group | |
| addSelectedEntries | back to summary |
|---|---|
| public void addSelectedEntries(GroupNodeViewModel group) Todo warn before assigning to a group whose membership is written to a field other than
| |
| addSuggestedGroups | back to summary |
|---|---|
| public void addSuggestedGroups(GroupNodeViewModel parent) Adds JabRef suggested groups under the "All Entries" parent node. Assumes the parent is already validated as "All Entries" by the caller.
| |
| chatWithGroup | back to summary |
|---|---|
| public void chatWithGroup(GroupNodeViewModel group) | |
| clearGroup | back to summary |
|---|---|
| public void clearGroup(GroupNodeViewModel group) | |
| disposeDisplayedGroups | back to summary |
|---|---|
| private void disposeDisplayedGroups() | |
| editGroup | back to summary |
|---|---|
| public void editGroup(GroupNodeViewModel oldGroup) Opens "Edit Group Dialog" and changes the given group to the edited one. | |
| filterPredicateProperty | back to summary |
|---|---|
| public ObjectProperty | |
| filterTextProperty | back to summary |
|---|---|
| public StringProperty filterTextProperty() | |
| generateEmbeddings | back to summary |
|---|---|
| public void generateEmbeddings(GroupNodeViewModel groupNode) | |
| generateSummaries | back to summary |
|---|---|
| public void generateSummaries(GroupNodeViewModel groupNode) | |
| isGroupTypeEqual | back to summary |
|---|---|
| private boolean isGroupTypeEqual(AbstractGroup oldGroup, AbstractGroup newGroup) | |
| listen | back to summary |
|---|---|
| public void listen(GroupUpdatedEvent event) Rebuilds the displayed group tree when the group root was replaced underneath it -
e.g. applied from a shared database (see
| |
| onActiveDatabaseChanged | back to summary |
|---|---|
| private void onActiveDatabaseChanged(Optional<BibDatabaseContext> newDatabase) Gets invoked if the user changes the active database. We need to get the new group tree and update the view | |
| onlyMinorChanges | back to summary |
|---|---|
| pack-priv boolean onlyMinorChanges(AbstractGroup oldGroup, AbstractGroup newGroup) Check if it is necessary to show a group modified, reassign entry dialog Group name change is handled separately
| |
| onSelectedGroupChanged | back to summary |
|---|---|
| private void onSelectedGroupChanged(ObservableList<GroupNodeViewModel> newValue) Gets invoked if the user selects a different group.
We need to notify the | |
| recordEntryChange | back to summary |
|---|---|
| private void recordEntryChange(String name, Consumer<CompoundEdit> operation) Records entry assignments as one undo step. The tree is untouched, so only the entries'
group fields are recorded — | |
| recordTreeChange | back to summary |
|---|---|
| public void recordTreeChange(String name, Consumer<CompoundEdit> operation) Runs a group operation and records it as one undo step, tree and entries together. Public because the gesture and the operation do not always belong to the same class: a drag moves several groups at once, and that is one step, opened here by the view that handles the drop. The tree is recorded as a whole because that is how every operation reaches the model: the
nodes are edited in place and the root is written back afterwards. Operations that also
change entries hand their The prior tree is copied before the operation runs — it is the very tree the operation is about to mutate. | |
| recordTreeChange | back to summary |
|---|---|
| public void recordTreeChange(String name, Runnable operation) For a gesture handler that has no changes of its own to hand over — see
| |
| refresh | back to summary |
|---|---|
| private void refresh() | |
| removeGroupAndSubgroups | back to summary |
|---|---|
| public void removeGroupAndSubgroups(GroupNodeViewModel group) Removes the specified group and its subgroups (after asking for confirmation). | |
| removeGroupKeepSubgroups | back to summary |
|---|---|
| public void removeGroupKeepSubgroups(GroupNodeViewModel group) | |
| removeGroupNoSubgroups | back to summary |
|---|---|
| public void removeGroupNoSubgroups(GroupNodeViewModel group) Removes the specified group (after asking for confirmation). | |
| removeGroupsAndSubGroupsFromEntries | back to summary |
|---|---|
pack-priv void removeGroupsAndSubGroupsFromEntries(GroupNodeViewModel group, CompoundEdit edit)
| |
| removeSelectedEntries | back to summary |
|---|---|
| public void removeSelectedEntries(GroupNodeViewModel group) See | |
| removeSubgroups | back to summary |
|---|---|
| public void removeSubgroups(GroupNodeViewModel group) | |
| rootGroupProperty | back to summary |
|---|---|
| public ObjectProperty | |
| selectedGroupsProperty | back to summary |
|---|---|
| public ListProperty | |
| sortAlphabeticallyRecursive | back to summary |
|---|---|
| public void sortAlphabeticallyRecursive(GroupTreeNode group) | |
| sortEntriesRecursive | back to summary |
|---|---|
| public void sortEntriesRecursive(GroupTreeNode group) | |
| sortReverseAlphabeticallyRecursive | back to summary |
|---|---|
| public void sortReverseAlphabeticallyRecursive(GroupTreeNode group) | |
| sortReverseEntriesRecursive | back to summary |
|---|---|
| public void sortReverseEntriesRecursive(GroupTreeNode group) | |
| writeBackAndRecord | back to summary |
|---|---|
| private void writeBackAndRecord(MetaData metaData, Optional<GroupTreeNode> before, CompoundEdit edit) Writes the view models back to the metadata and records the tree change, if there is one. Called also when the operation failed part-way: the tree holds what it managed to change, and a step that took back only the entry assignments would leave the library in a state nothing describes. The journal hands over a failed block's changes for the same reason. | |
| writeGroupChangesToMetaData | back to summary |
|---|---|
| public void writeGroupChangesToMetaData() | |
| writeGroupChangesToMetaData | back to summary |
|---|---|
| private void writeGroupChangesToMetaData(MetaDataChangeSource source) | |