Class NotesDialog
- java.lang.Object
- 
- java.awt.Component
- 
- java.awt.Container
- 
- javax.swing.JComponent
- 
- javax.swing.JPanel
- 
- org.openstreetmap.josm.gui.dialogs.ToggleDialog
- 
- org.openstreetmap.josm.gui.dialogs.NotesDialog
 
 
 
 
 
 
- 
- All Implemented Interfaces:
- java.awt.event.AWTEventListener,- java.awt.image.ImageObserver,- java.awt.MenuContainer,- java.io.Serializable,- java.util.EventListener,- javax.accessibility.Accessible,- NoteData.NoteDataUpdateListener,- Helpful,- LayerManager.LayerChangeListener,- ShowHideButtonListener,- PreferenceChangedListener,- Destroyable
 
 public class NotesDialog extends ToggleDialog implements LayerManager.LayerChangeListener, NoteData.NoteDataUpdateListener Dialog to display and manipulate notes.- Since:
- 7852 (renaming), 7608 (creation)
- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description (package private) classNotesDialog.AddCommentActionThe action to add a new comment to OSM(package private) classNotesDialog.CloseActionClose a note(package private) classNotesDialog.NewActionCreate a new note(package private) static classNotesDialog.NoteRenderer(package private) classNotesDialog.NoteTableModel(package private) classNotesDialog.OpenInBrowserActionOpen the note in a browser(package private) classNotesDialog.ReopenActionReopen a note(package private) classNotesDialog.SortActionSort notes- 
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.dialogs.ToggleDialogToggleDialog.ButtonHidingType, ToggleDialog.TitleBar, ToggleDialog.ToggleDialogAction
 - 
Nested classes/interfaces inherited from class javax.swing.JPaneljavax.swing.JPanel.AccessibleJPanel
 - 
Nested classes/interfaces inherited from class javax.swing.JComponentjavax.swing.JComponent.AccessibleJComponent
 
- 
 - 
Field SummaryFields Modifier and Type Field Description private NotesDialog.AddCommentActionaddCommentActionprivate NotesDialog.CloseActioncloseActionprivate javax.swing.JList<Note>displayListprivate DownloadNotesInViewActiondownloadNotesInViewActionprivate JosmTextFieldfilterprivate NotesDialog.NoteTableModelmodelprivate NotesDialog.NewActionnewActionprivate NoteDatanoteDataprivate NotesDialog.OpenInBrowserActionopenInBrowserActionprivate NotesDialog.ReopenActionreopenActionprivate NotesDialog.SortActionsortActionprivate UploadNotesActionuploadAction- 
Fields inherited from class org.openstreetmap.josm.gui.dialogs.ToggleDialogbutton, buttonHiding, detachedDialog, dialogsPanel, isCollapsed, isDocked, isShowing, name, preferenceClass, preferencePrefix, PROP_DYNAMIC_BUTTONS, titleBar, toggleAction, windowMenuItem
 - 
Fields inherited from class javax.swing.JComponentlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
- 
 - 
Constructor SummaryConstructors Constructor Description NotesDialog()Creates a new toggle dialog for notes
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidbuildDialog()voiddestroy()Called when the object has been destroyed.(package private) static java.util.List<java.lang.String>getRelatedChangesetUrls(long noteId)Get a list of changeset urls that may have fixed a noteNotegetSelectedNote()Returns the currently selected note, if any.voidlayerAdded(LayerManager.LayerAddEvent e)Notifies this listener that a layer has been added.voidlayerOrderChanged(LayerManager.LayerOrderChangeEvent e)Notifies this listener that the order of layers was changed.voidlayerRemoving(LayerManager.LayerRemoveEvent e)Notifies this listener that a layer was just removed.(package private) static booleanmatchesNote(java.lang.String filter, Note note)voidnoteDataUpdated(NoteData data)Called when the note data is updatedvoidselectedNoteChanged(NoteData noteData)The selected node was changedvoidselectionChanged()Notify the dialog that the note selection has changed.voidsetNotes(java.util.Collection<Note> noteList)Sets the list of notes to be displayed in the dialog.private JosmTextFieldsetupFilter()private voidupdateButtonStates()- 
Methods inherited from class org.openstreetmap.josm.gui.dialogs.ToggleDialogbuttonHidden, buttonShown, clearButtonActions, closeDetachedDialog, collapse, createLayout, createLayout, detach, dock, dockWhenClosingDetachedDlg, eventDispatched, expand, getButton, getDefaultDetachedSize, getLastHeight, getName, getPreferencePrefix, getPreferredHeight, getToggleAction, helpTopic, hideDialog, hideNotify, isDialogInCollapsedView, isDialogInDefaultView, isDialogShowing, preferenceChanged, registerInWindowMenu, rememberHeight, setButton, setContentVisible, setDialogsPanel, setIsButtonHiding, setIsCollapsed, setIsDocked, setIsShowing, setTitle, showDialog, showNotify, stateChanged, toggleButtonHook, toString, unfurlDialog
 - 
Methods inherited from class javax.swing.JPanelgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 - 
Methods inherited from class javax.swing.JComponentaddAncestorListener, 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.Containeradd, 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.Componentaction, 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, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
 
- 
 
- 
- 
- 
Field Detail- 
modelprivate NotesDialog.NoteTableModel model 
 - 
displayListprivate javax.swing.JList<Note> displayList 
 - 
filterprivate final JosmTextField filter 
 - 
addCommentActionprivate final NotesDialog.AddCommentAction addCommentAction 
 - 
closeActionprivate final NotesDialog.CloseAction closeAction 
 - 
downloadNotesInViewActionprivate final DownloadNotesInViewAction downloadNotesInViewAction 
 - 
newActionprivate final NotesDialog.NewAction newAction 
 - 
reopenActionprivate final NotesDialog.ReopenAction reopenAction 
 - 
sortActionprivate final NotesDialog.SortAction sortAction 
 - 
openInBrowserActionprivate final NotesDialog.OpenInBrowserAction openInBrowserAction 
 - 
uploadActionprivate final UploadNotesAction uploadAction 
 
- 
 - 
Constructor Detail- 
NotesDialogpublic NotesDialog() Creates a new toggle dialog for notes
 
- 
 - 
Method Detail- 
buildDialogprivate void buildDialog() 
 - 
updateButtonStatesprivate void updateButtonStates() 
 - 
layerAddedpublic void layerAdded(LayerManager.LayerAddEvent e) Description copied from interface:LayerManager.LayerChangeListenerNotifies this listener that a layer has been added.Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method. - Specified by:
- layerAddedin interface- LayerManager.LayerChangeListener
- Parameters:
- e- The new added layer event
 
 - 
layerRemovingpublic void layerRemoving(LayerManager.LayerRemoveEvent e) Description copied from interface:LayerManager.LayerChangeListenerNotifies this listener that a layer was just removed.Listeners are called in the EDT thread after the layer was removed. Use LayerManager.LayerRemoveEvent.scheduleRemoval(Collection)to remove more layers. You should not do blocking or long-running tasks in this method.- Specified by:
- layerRemovingin interface- LayerManager.LayerChangeListener
- Parameters:
- e- The layer to be removed (as event)
 
 - 
layerOrderChangedpublic void layerOrderChanged(LayerManager.LayerOrderChangeEvent e) Description copied from interface:LayerManager.LayerChangeListenerNotifies this listener that the order of layers was changed.Listeners are called in the EDT thread. You should not do blocking or long-running tasks in this method. - Specified by:
- layerOrderChangedin interface- LayerManager.LayerChangeListener
- Parameters:
- e- The order change event.
 
 - 
noteDataUpdatedpublic void noteDataUpdated(NoteData data) Description copied from interface:NoteData.NoteDataUpdateListenerCalled when the note data is updated- Specified by:
- noteDataUpdatedin interface- NoteData.NoteDataUpdateListener
- Parameters:
- data- The data that was changed
 
 - 
selectedNoteChangedpublic void selectedNoteChanged(NoteData noteData) Description copied from interface:NoteData.NoteDataUpdateListenerThe selected node was changed- Specified by:
- selectedNoteChangedin interface- NoteData.NoteDataUpdateListener
- Parameters:
- noteData- The data of which the selected node was changed
 
 - 
setNotespublic void setNotes(java.util.Collection<Note> noteList) Sets the list of notes to be displayed in the dialog. The dialog should match the notes displayed in the note layer.- Parameters:
- noteList- List of notes to display
 
 - 
selectionChangedpublic void selectionChanged() Notify the dialog that the note selection has changed. Causes it to update or clear its selection in the UI.
 - 
getSelectedNotepublic Note getSelectedNote() Returns the currently selected note, if any.- Returns:
- currently selected note, or null
- Since:
- 8475
 
 - 
setupFilterprivate JosmTextField setupFilter() 
 - 
matchesNotestatic boolean matchesNote(java.lang.String filter, Note note) 
 - 
destroypublic void destroy() Description copied from interface:DestroyableCalled when the object has been destroyed.- Specified by:
- destroyin interface- Destroyable
- Overrides:
- destroyin class- ToggleDialog
 
 - 
getRelatedChangesetUrlsstatic java.util.List<java.lang.String> getRelatedChangesetUrls(long noteId) Get a list of changeset urls that may have fixed a note- Parameters:
- noteId- The note ID to look for
- Returns:
- A list of changeset URLs
 
 
- 
 
-