Top Inners Fields Constructors Methods
org.jabref.gui.sidepane

public Class SidePaneViewModel

extends AbstractViewModel
Class Inheritance
Imports
java.util.ArrayList, .Collections, .Comparator, .HashMap, .List, .Map, java.util.stream.IntStream, javax.swing.undo.UndoManager, javafx.collections.ListChangeListener, .ObservableList, org.jabref.gui.AbstractViewModel, .ClipBoardManager, .DialogService, .LibraryTabContainer, .StateManager, org.jabref.gui.actions.SimpleCommand, org.jabref.gui.util.TaskExecutor, org.jabref.logic.journals.JournalAbbreviationRepository, org.jabref.model.entry.BibEntryTypesManager, org.jabref.model.util.FileUpdateMonitor, org.jabref.preferences.PreferencesService, .SidePanePreferences, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class
private class
private class
protected static class
SidePaneViewModel.PreferredIndexSort

Helper class for sorting visible side panes based on their preferred position.

Field Summary

Modifier and TypeField and Description
private final DialogService
private static final Logger
private final PreferencesService
private final Map<SidePaneType, SidePaneComponent>
private final SidePaneContentFactory
private final StateManager

Constructor Summary

AccessConstructor and Description
public
SidePaneViewModel(LibraryTabContainer tabContainer, PreferencesService preferencesService, JournalAbbreviationRepository abbreviationRepository, StateManager stateManager, TaskExecutor taskExecutor, DialogService dialogService, FileUpdateMonitor fileUpdateMonitor, BibEntryTypesManager entryTypesManager, ClipBoardManager clipBoardManager, UndoManager undoManager)

Method Summary

Modifier and TypeMethod and Description
private ObservableList<SidePaneType>
protected SidePaneComponent
public void
public void
private void
private <T> void
swap(ObservableList<T> observableList, int i, int j)

private void
updatePreferredPositions()

Stores the current configuration of visible panes in the preferences, so that we show panes at the preferred position next time.

Field Detail

dialogServiceback to summary
private final DialogService dialogService
LOGGERback to summary
private static final Logger LOGGER
preferencesServiceback to summary
private final PreferencesService preferencesService
sidePaneComponentLookupback to summary
private final Map<SidePaneType, SidePaneComponent> sidePaneComponentLookup
sidePaneContentFactoryback to summary
private final SidePaneContentFactory sidePaneContentFactory
stateManagerback to summary
private final StateManager stateManager

Constructor Detail

SidePaneViewModelback to summary
public SidePaneViewModel(LibraryTabContainer tabContainer, PreferencesService preferencesService, JournalAbbreviationRepository abbreviationRepository, StateManager stateManager, TaskExecutor taskExecutor, DialogService dialogService, FileUpdateMonitor fileUpdateMonitor, BibEntryTypesManager entryTypesManager, ClipBoardManager clipBoardManager, UndoManager undoManager)

Method Detail

getPanesback to summary
private ObservableList<SidePaneType> getPanes()
getSidePaneComponentback to summary
protected SidePaneComponent getSidePaneComponent(SidePaneType pane)
moveDownback to summary
public void moveDown(SidePaneType pane)
moveUpback to summary
public void moveUp(SidePaneType pane)
showback to summary
private void show(SidePaneType pane)
swapback to summary
private <T> void swap(ObservableList<T> observableList, int i, int j)
updatePreferredPositionsback to summary
private void updatePreferredPositions()

Stores the current configuration of visible panes in the preferences, so that we show panes at the preferred position next time.

org.jabref.gui.sidepane back to summary

public Class SidePaneViewModel.ClosePaneAction

extends SimpleCommand
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final SidePaneType
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

toClosePaneback to summary
private final SidePaneType toClosePane

Constructor Detail

ClosePaneActionback to summary
public ClosePaneAction(SidePaneType toClosePane)

Method Detail

executeback to summary
public void execute()
Annotations
@Override
org.jabref.gui.sidepane back to summary

private Class SidePaneViewModel.MoveDownAction

extends SimpleCommand
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final SidePaneType
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public
MoveDownAction(SidePaneType toMoveDownPane)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

toMoveDownPaneback to summary
private final SidePaneType toMoveDownPane

Constructor Detail

MoveDownActionback to summary
public MoveDownAction(SidePaneType toMoveDownPane)

Method Detail

executeback to summary
public void execute()
Annotations
@Override
org.jabref.gui.sidepane back to summary

private Class SidePaneViewModel.MoveUpAction

extends SimpleCommand
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final SidePaneType
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public
MoveUpAction(SidePaneType toMoveUpPane)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

toMoveUpPaneback to summary
private final SidePaneType toMoveUpPane

Constructor Detail

MoveUpActionback to summary
public MoveUpAction(SidePaneType toMoveUpPane)

Method Detail

executeback to summary
public void execute()
Annotations
@Override
org.jabref.gui.sidepane back to summary

protected Class SidePaneViewModel.PreferredIndexSort

extends Object
implements Comparator<SidePaneType>
Class Inheritance
All Implemented Interfaces
java.util.Comparator

Helper class for sorting visible side panes based on their preferred position.

Field Summary

Modifier and TypeField and Description
private final Map<SidePaneType, Integer>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
compare(SidePaneType
the first object to be compared.
type1
,
SidePaneType
the second object to be compared.
type2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

preferredPositionsback to summary
private final Map<SidePaneType, Integer> preferredPositions

Constructor Detail

PreferredIndexSortback to summary
public PreferredIndexSort(SidePanePreferences sidePanePreferences)

Method Detail

compareback to summary
public int compare(SidePaneType type1, SidePaneType type2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
type1:SidePaneType

the first object to be compared.

type2:SidePaneType

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override