public class ValidatorDialog extends ToggleDialog implements DataSelectionListener, MainLayerManager.ActiveLayerChangeListener, DataSetListenerAdapter.Listener
| Modifier and Type | Class and Description |
|---|---|
private static class |
ValidatorDialog.AutofixCommand |
(package private) class |
ValidatorDialog.FixTask
Task for fixing a collection of
TestErrors. |
(package private) static class |
ValidatorDialog.IgnorelistManagementAction
The action to manage the ignore list.
|
(package private) class |
ValidatorDialog.LookupAction
The action to lookup the selection in the error tree.
|
(package private) class |
ValidatorDialog.MouseEventHandler
Watches for double clicks and launches the popup menu.
|
class |
ValidatorDialog.SelectionWatch
Watches for tree selection.
|
static class |
ValidatorDialog.ValidatorBoundingXYVisitor
A visitor that is used to compute the bounds of an error.
|
ToggleDialog.ButtonHidingType, ToggleDialog.TitleBar, ToggleDialog.ToggleDialogActionjavax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponentjava.awt.Container.AccessibleAWTContainerjava.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyDataSelectionListener.AbstractSelectionEvent, DataSelectionListener.SelectionAddEvent, DataSelectionListener.SelectionChangeEvent, DataSelectionListener.SelectionRemoveEvent, DataSelectionListener.SelectionReplaceEvent, DataSelectionListener.SelectionToggleEvent| Modifier and Type | Field and Description |
|---|---|
private DataSetListenerAdapter |
dataChangedAdapter |
private javax.swing.Action |
fixAction
The fix action
|
private javax.swing.Action |
ignoreAction
The ignore action
|
private JosmAction |
ignoreForNowAction |
private javax.swing.Action |
ignorelistManagementAction
The ignore-list management action
|
private javax.swing.tree.DefaultMutableTreeNode |
lastSelectedNode
Last selected element
|
private ValidatorDialog.LookupAction |
lookupAction
The lookup action
|
private javax.swing.JPopupMenu |
popupMenu |
private PopupMenuHandler |
popupMenuHandler |
private javax.swing.Action |
selectAction
The select action
|
ValidatorTreePanel |
tree
The display tree
|
static ValidateAction |
validateAction
The validate action
|
button, buttonHiding, detachedDialog, dialogsPanel, isCollapsed, isDocked, isShowing, name, preferenceClass, preferencePrefix, PROP_DYNAMIC_BUTTONS, titleBar, toggleAction, windowMenuItemlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
ValidatorDialog()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Called whenever the active or edit layer changed.
|
void |
addTreeSelectionListener(javax.swing.event.TreeSelectionListener listener)
Add a tree selection listener to the validator tree.
|
void |
destroy()
Called when the object has been destroyed.
|
private void |
fixErrors()
Fix selected errors
|
PopupMenuHandler |
getPopupMenuHandler()
Replies the popup menu handler.
|
TestError |
getSelectedError()
Replies the currently selected error, or
null. |
void |
hideNotify()
Called when toggle dialog is hidden (collapsed, removed, MapFrame is removed, ...).
|
private void |
ignoreErrors()
Set selected errors to ignore state
|
private static void |
invalidateValidatorLayers() |
void |
processDatasetEvent(AbstractDatasetChangedEvent event)
Called when notified about any type of dataset change event.
|
void |
removeTreeSelectionListener(javax.swing.event.TreeSelectionListener listener)
Remove the given tree selection listener from the validator tree.
|
void |
selectionChanged(DataSelectionListener.SelectionChangeEvent event)
Called whenever the selection is changed.
|
private void |
setSelectedItems()
Sets the selection of the map to the current selected items.
|
private boolean |
setSelection(java.util.Collection<OsmPrimitive> sel,
boolean addSelected)
Checks for fixes in selected element and, if needed, adds to the sel
parameter all selected elements
|
void |
setVisible(boolean v) |
void |
showNotify()
Called when toggle dialog is shown (after it was created or expanded).
|
void |
updateSelection(java.util.Collection<? extends OsmPrimitive> newSelection)
Called when the selection was changed to update the list of displayed errors
|
buttonHidden, buttonShown, closeDetachedDialog, collapse, createLayout, createLayout, detach, dock, dockWhenClosingDetachedDlg, eventDispatched, expand, getButton, getDefaultDetachedSize, getLastHeight, getName, getPreferencePrefix, getPreferredHeight, getToggleAction, helpTopic, hideDialog, isDialogInCollapsedView, isDialogInDefaultView, isDialogShowing, preferenceChanged, registerInWindowMenu, rememberHeight, setButton, setContentVisible, setDialogsPanel, setIsButtonHiding, setIsCollapsed, setIsDocked, setIsShowing, setTitle, showDialog, stateChanged, toggleButtonHook, toString, unfurlDialoggetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, unregisterKeyboardAction, updateadd, 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, validateTreeaction, 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, getParent, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCyclepublic final ValidatorTreePanel tree
public static final ValidateAction validateAction
private final transient javax.swing.Action fixAction
private final transient javax.swing.Action ignoreAction
private final transient javax.swing.Action ignorelistManagementAction
private final transient javax.swing.Action selectAction
private final transient ValidatorDialog.LookupAction lookupAction
private final transient JosmAction ignoreForNowAction
private final javax.swing.JPopupMenu popupMenu
private final transient PopupMenuHandler popupMenuHandler
private final transient DataSetListenerAdapter dataChangedAdapter
private javax.swing.tree.DefaultMutableTreeNode lastSelectedNode
public ValidatorDialog()
public void showNotify()
ToggleDialogshowNotify in class ToggleDialogpublic void hideNotify()
ToggleDialoghideNotify in class ToggleDialogpublic void setVisible(boolean v)
setVisible in class javax.swing.JComponentprivate void fixErrors()
private void ignoreErrors()
private void setSelectedItems()
private boolean setSelection(java.util.Collection<OsmPrimitive> sel, boolean addSelected)
sel - The collection where to add all selected elementsaddSelected - if true, add all selected elements to collectionpublic void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
MainLayerManager.ActiveLayerChangeListenerYou can be sure that this layer is still contained in this set.
Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
activeOrEditLayerChanged in interface MainLayerManager.ActiveLayerChangeListenere - The change event.public void addTreeSelectionListener(javax.swing.event.TreeSelectionListener listener)
listener - the TreeSelectionListenerpublic void removeTreeSelectionListener(javax.swing.event.TreeSelectionListener listener)
listener - the TreeSelectionListenerpublic PopupMenuHandler getPopupMenuHandler()
public TestError getSelectedError()
null.public void updateSelection(java.util.Collection<? extends OsmPrimitive> newSelection)
newSelection - The new selectionpublic void selectionChanged(DataSelectionListener.SelectionChangeEvent event)
DataSelectionListenerselectionChanged in interface DataSelectionListenerevent - The selection change event.DataSelectionListener.SelectionChangeEventprivate static void invalidateValidatorLayers()
public void processDatasetEvent(AbstractDatasetChangedEvent event)
DataSetListenerAdapter.ListenerprocessDatasetEvent in interface DataSetListenerAdapter.Listenerevent - dataset change eventpublic void destroy()
Destroyabledestroy in interface Destroyabledestroy in class ToggleDialog