Class AbstractListMerger<T extends PrimitiveId,C extends ConflictResolveCommand>
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- org.openstreetmap.josm.gui.conflict.pair.AbstractListMerger<T,C>
-
- Type Parameters:
T
- the type of the entriesC
- the type of conflict resolution command
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,PropertyChangeListener
,Serializable
,EventListener
,Accessible
,ChangeListener
,IConflictResolver
- Direct Known Subclasses:
NodeListMerger
,RelationMemberMerger
public abstract class AbstractListMerger<T extends PrimitiveId,C extends ConflictResolveCommand> extends JPanel implements PropertyChangeListener, ChangeListener, IConflictResolver
A UI component for resolving conflicts in two lists of entries of type T.- Since:
- 1631
- See Also:
AbstractListMergeModel
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
AbstractListMerger.CopyAction
Base class of all other Copy* inner classes.(package private) class
AbstractListMerger.CopyAfterCurrentLeftAction
Action for copying selected nodes in the list of my nodes to the list of merged nodes.(package private) class
AbstractListMerger.CopyAfterCurrentRightAction
(package private) class
AbstractListMerger.CopyAllLeft
(package private) class
AbstractListMerger.CopyAllRight
(package private) class
AbstractListMerger.CopyBeforeCurrentLeftAction
Action for copying selected nodes in the list of my nodes to the list of merged nodes.(package private) class
AbstractListMerger.CopyBeforeCurrentRightAction
(package private) class
AbstractListMerger.CopyEndLeftAction
Action for copying selected nodes in the list of my nodes to the list of merged nodes.(package private) class
AbstractListMerger.CopyEndRightAction
(package private) class
AbstractListMerger.CopyStartLeftAction
Action for copying selected nodes in the list of my nodes to the list of merged nodes.(package private) class
AbstractListMerger.CopyStartRightAction
private class
AbstractListMerger.FreezeAction
Action for freezing the current state of the list mergerprivate static interface
AbstractListMerger.FreezeActionProperties
(package private) class
AbstractListMerger.MoveDownMergedAction
Action for moving the currently selected entries in the list of merged entries one position down(package private) class
AbstractListMerger.MoveUpMergedAction
(package private) class
AbstractListMerger.RemoveMergedAction
Action for removing the selected entries in the list of merged entries from the list of merged entries.-
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractListMerger(AbstractListMergeModel<T,C> model)
Constructs a newListMerger
.
-
Method Summary
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.gui.conflict.pair.IConflictResolver
deletePrimitive, populate
-
-
-
-
Field Detail
-
myEntriesTable
protected OsmPrimitivesTable myEntriesTable
-
mergedEntriesTable
protected OsmPrimitivesTable mergedEntriesTable
-
theirEntriesTable
protected OsmPrimitivesTable theirEntriesTable
-
model
protected transient AbstractListMergeModel<T extends PrimitiveId,C extends ConflictResolveCommand> model
-
copyStartLeftAction
private AbstractListMerger.CopyStartLeftAction copyStartLeftAction
-
copyBeforeCurrentLeftAction
private AbstractListMerger.CopyBeforeCurrentLeftAction copyBeforeCurrentLeftAction
-
copyAfterCurrentLeftAction
private AbstractListMerger.CopyAfterCurrentLeftAction copyAfterCurrentLeftAction
-
copyEndLeftAction
private AbstractListMerger.CopyEndLeftAction copyEndLeftAction
-
copyAllLeft
private AbstractListMerger.CopyAllLeft copyAllLeft
-
copyStartRightAction
private AbstractListMerger.CopyStartRightAction copyStartRightAction
-
copyBeforeCurrentRightAction
private AbstractListMerger.CopyBeforeCurrentRightAction copyBeforeCurrentRightAction
-
copyAfterCurrentRightAction
private AbstractListMerger.CopyAfterCurrentRightAction copyAfterCurrentRightAction
-
copyEndRightAction
private AbstractListMerger.CopyEndRightAction copyEndRightAction
-
copyAllRight
private AbstractListMerger.CopyAllRight copyAllRight
-
moveUpMergedAction
private AbstractListMerger.MoveUpMergedAction moveUpMergedAction
-
moveDownMergedAction
private AbstractListMerger.MoveDownMergedAction moveDownMergedAction
-
removeMergedAction
private AbstractListMerger.RemoveMergedAction removeMergedAction
-
freezeAction
private AbstractListMerger.FreezeAction freezeAction
-
adjustmentSynchronizer
private transient AdjustmentSynchronizer adjustmentSynchronizer
-
lblMyVersion
private JLabel lblMyVersion
-
lblMergedVersion
private JLabel lblMergedVersion
-
lblTheirVersion
private JLabel lblTheirVersion
-
lblFrozenState
private JLabel lblFrozenState
-
-
Constructor Detail
-
AbstractListMerger
protected AbstractListMerger(AbstractListMergeModel<T,C> model)
Constructs a newListMerger
.- Parameters:
model
- list merger model
-
-
Method Detail
-
buildMyElementsTable
protected abstract JScrollPane buildMyElementsTable()
-
buildMergedElementsTable
protected abstract JScrollPane buildMergedElementsTable()
-
buildTheirElementsTable
protected abstract JScrollPane buildTheirElementsTable()
-
embedInScrollPane
protected JScrollPane embedInScrollPane(JTable table)
-
wireActionsToSelectionModels
protected void wireActionsToSelectionModels()
-
buildLeftButtonPanel
protected JPanel buildLeftButtonPanel()
-
buildRightButtonPanel
protected JPanel buildRightButtonPanel()
-
buildMergedListControlButtons
protected JPanel buildMergedListControlButtons()
-
buildAdjustmentLockControlPanel
protected JPanel buildAdjustmentLockControlPanel(JCheckBox cb)
-
buildComparePairSelectionPanel
protected JPanel buildComparePairSelectionPanel()
-
buildFrozeStateControlPanel
protected JPanel buildFrozeStateControlPanel()
-
build
protected final void build()
-
handlePropertyChangeFrozen
protected void handlePropertyChangeFrozen(boolean newValue)
-
propertyChange
public void propertyChange(PropertyChangeEvent evt)
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
getModel
public AbstractListMergeModel<T,C> getModel()
Returns the model.- Returns:
- the model
-
stateChanged
public void stateChanged(ChangeEvent e)
- Specified by:
stateChanged
in interfaceChangeListener
-
registerListeners
public void registerListeners()
Adds all registered listeners by this merger- Since:
- 10454
- See Also:
unregisterListeners()
-
unregisterListeners
public void unregisterListeners()
Removes all registered listeners by this merger- Since:
- 10454
-
findLayerFor
protected final <P extends OsmPrimitive> OsmDataLayer findLayerFor(P primitive)
-
decideRemaining
public void decideRemaining(MergeDecisionType decision)
- Specified by:
decideRemaining
in interfaceIConflictResolver
-
-