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:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.event.ChangeListener
,IConflictResolver
- Direct Known Subclasses:
NodeListMerger
,RelationMemberMerger
public abstract class AbstractListMerger<T extends PrimitiveId,C extends ConflictResolveCommand> extends javax.swing.JPanel implements java.beans.PropertyChangeListener, javax.swing.event.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
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractListMerger(AbstractListMergeModel<T,C> model)
Constructs a newListMerger
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
build()
protected javax.swing.JPanel
buildAdjustmentLockControlPanel(javax.swing.JCheckBox cb)
protected javax.swing.JPanel
buildComparePairSelectionPanel()
protected javax.swing.JPanel
buildFrozeStateControlPanel()
protected javax.swing.JPanel
buildLeftButtonPanel()
protected abstract javax.swing.JScrollPane
buildMergedElementsTable()
protected javax.swing.JPanel
buildMergedListControlButtons()
protected abstract javax.swing.JScrollPane
buildMyElementsTable()
protected javax.swing.JPanel
buildRightButtonPanel()
protected abstract javax.swing.JScrollPane
buildTheirElementsTable()
void
decideRemaining(MergeDecisionType decision)
protected javax.swing.JScrollPane
embedInScrollPane(javax.swing.JTable table)
protected <P extends OsmPrimitive>
OsmDataLayerfindLayerFor(P primitive)
AbstractListMergeModel<T,C>
getModel()
Returns the model.protected void
handlePropertyChangeFrozen(boolean newValue)
void
propertyChange(java.beans.PropertyChangeEvent evt)
void
registerListeners()
Adds all registered listeners by this mergervoid
stateChanged(javax.swing.event.ChangeEvent e)
void
unregisterListeners()
Removes all registered listeners by this mergerprotected void
wireActionsToSelectionModels()
-
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 javax.swing.JLabel lblMyVersion
-
lblMergedVersion
private javax.swing.JLabel lblMergedVersion
-
lblTheirVersion
private javax.swing.JLabel lblTheirVersion
-
lblFrozenState
private javax.swing.JLabel lblFrozenState
-
-
Constructor Detail
-
AbstractListMerger
protected AbstractListMerger(AbstractListMergeModel<T,C> model)
Constructs a newListMerger
.- Parameters:
model
- list merger model
-
-
Method Detail
-
buildMyElementsTable
protected abstract javax.swing.JScrollPane buildMyElementsTable()
-
buildMergedElementsTable
protected abstract javax.swing.JScrollPane buildMergedElementsTable()
-
buildTheirElementsTable
protected abstract javax.swing.JScrollPane buildTheirElementsTable()
-
embedInScrollPane
protected javax.swing.JScrollPane embedInScrollPane(javax.swing.JTable table)
-
wireActionsToSelectionModels
protected void wireActionsToSelectionModels()
-
buildLeftButtonPanel
protected javax.swing.JPanel buildLeftButtonPanel()
-
buildRightButtonPanel
protected javax.swing.JPanel buildRightButtonPanel()
-
buildMergedListControlButtons
protected javax.swing.JPanel buildMergedListControlButtons()
-
buildAdjustmentLockControlPanel
protected javax.swing.JPanel buildAdjustmentLockControlPanel(javax.swing.JCheckBox cb)
-
buildComparePairSelectionPanel
protected javax.swing.JPanel buildComparePairSelectionPanel()
-
buildFrozeStateControlPanel
protected javax.swing.JPanel buildFrozeStateControlPanel()
-
build
protected final void build()
-
handlePropertyChangeFrozen
protected void handlePropertyChangeFrozen(boolean newValue)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
getModel
public AbstractListMergeModel<T,C> getModel()
Returns the model.- Returns:
- the model
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
-
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
-
-