Class PropertiesDialog
- 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.properties.PropertiesDialog
-
- All Implemented Interfaces:
java.awt.event.AWTEventListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,DataSelectionListener
,DataSetListenerAdapter.Listener
,Helpful
,MainLayerManager.ActiveLayerChangeListener
,PrimitiveHoverListener
,ShowHideButtonListener
,TaggingPresetListener
,PreferenceChangedListener
,Destroyable
public class PropertiesDialog extends ToggleDialog implements DataSelectionListener, MainLayerManager.ActiveLayerChangeListener, java.beans.PropertyChangeListener, DataSetListenerAdapter.Listener, TaggingPresetListener, PrimitiveHoverListener
This dialog displays the tags of the current selected primitives. If no object is selected, the dialog list is empty. If only one is selected, all tags of this object are selected. If more than one object is selected, the sum of all tags is displayed. If the different objects share the same tag, the shared value is displayed. If they have different values, all of them are put in a combo box and the string "<different>" is displayed in italic. Below the list, the user can click on an add, modify and delete tag button to edit the table selection value. The command is applied to all selected entries.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
PropertiesDialog.AddAction
Action handling add button press in properties dialog.(package private) static class
PropertiesDialog.BlankSpaceMenuLauncher
(package private) class
PropertiesDialog.DeleteAction
Action handling delete button press in properties dialog.(package private) class
PropertiesDialog.EditAction
Action handling edit button press in properties dialog.private class
PropertiesDialog.HoverPreviewPreferSelectionPropListener
private class
PropertiesDialog.HoverPreviewPropListener
(package private) static class
PropertiesDialog.MemberInfo
(package private) static class
PropertiesDialog.MemberOfCellRenderer
class
PropertiesDialog.MouseClickWatch
Class that watches for mouse clicks(package private) class
PropertiesDialog.PasteValueAction
(package private) static class
PropertiesDialog.PositionCellRenderer
static class
PropertiesDialog.ReadOnlyTableModel
Class that allows fast creation of read-only table model with String columnsprivate class
PropertiesDialog.RemoveHiddenSelection
Clears the row selection when it is filtered away by the row sorter.(package private) static class
PropertiesDialog.RoleCellRenderer
(package private) class
PropertiesDialog.SearchAction
(package private) static class
PropertiesDialog.TaggingPresetCommandHandler
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.dialogs.ToggleDialog
ToggleDialog.ButtonHidingType, ToggleDialog.TitleBar, ToggleDialog.ToggleDialogAction
-
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
-
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.data.osm.DataSelectionListener
DataSelectionListener.AbstractSelectionEvent, DataSelectionListener.SelectionAddEvent, DataSelectionListener.SelectionChangeEvent, DataSelectionListener.SelectionRemoveEvent, DataSelectionListener.SelectionReplaceEvent, DataSelectionListener.SelectionToggleEvent
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.PrimitiveHoverListener
PrimitiveHoverListener.PrimitiveHoverEvent
-
-
Field Summary
Fields Modifier and Type Field Description private PropertiesDialog.AddAction
addAction
private javax.swing.JPopupMenu
blankSpaceMenu
private PopupMenuHandler
blankSpaceMenuHandler
private javax.swing.JPanel
bothTables
JPanel containing both previous tablesprivate SideButton
btnAdd
The Add button (needed to be able to disable it)private SideButton
btnDel
The Delete button (needed to be able to disable it)private SideButton
btnEdit
The Edit button (needed to be able to disable it)private PropertiesCellRenderer
cellRenderer
private CopyAllKeyValueAction
copyAllKeyValueAction
private CopyKeyValueAction
copyKeyValueAction
private CopyValueAction
copyValueAction
private DataSetListenerAdapter
dataChangedAdapter
private PropertiesDialog.DeleteAction
deleteAction
private PropertiesDialog.EditAction
editAction
private TagEditHelper
editHelper
This sub-object is responsible for all adding and editing of tagsprivate HelpAction
helpRelAction
private HelpAction
helpTagAction
private HighlightHelper
highlightHelper
private PropertiesDialog.HoverPreviewPreferSelectionPropListener
hoverPreviewPrioritizeSelectionPropListener
private PropertiesDialog.HoverPreviewPropListener
hoverPreviewPropListener
private JosmAction[]
josmActions
private javax.swing.table.DefaultTableModel
membershipData
The membership data of selected objects.private javax.swing.JPopupMenu
membershipMenu
private PopupMenuHandler
membershipMenuHandler
private java.util.List<javax.swing.JMenuItem>
membershipMenuTagInfoNatItems
private javax.swing.JTable
membershipTable
The membership table.private PropertiesDialog.PasteValueAction
pasteValueAction
static javax.swing.JPanel
pluginHook
hook for roadsigns plugin to display a small button in the upper right corner of this dialogprivate PopupMenuLauncher
popupMenuLauncher
private TaggingPresetHandler
presetHandler
private PresetListPanel
presets
Matching preset display classprivate static BooleanProperty
PROP_AUTORESIZE_TAGS_TABLE
private static BooleanProperty
PROP_DISPLAY_DISCARDABLE_KEYS
static BooleanProperty
PROP_PREVIEW_ON_HOVER
Show tags and relation memberships of objects in the properties dialog when hovering over them with the mouse pointerstatic CachingProperty<java.lang.Boolean>
PROP_PREVIEW_ON_HOVER_PRIORITIZE_SELECTION
Always show information for selected objects when something is selected instead of the hovered objectprivate PropertiesDialog.SearchAction
searchActionAny
private PropertiesDialog.SearchAction
searchActionSame
private javax.swing.JLabel
selectSth
Text to display when nothing selected.private PropertiesDialog.ReadOnlyTableModel
tagData
The tag data of selected objects.private TaginfoAction
tagHistoryAction
private TaginfoAction
taginfoAction
private java.util.Collection<TaginfoAction>
taginfoNationalActions
private int
taginfoNationalHash
private javax.swing.JPopupMenu
tagMenu
private PopupMenuHandler
tagMenuHandler
private java.util.List<javax.swing.JMenuItem>
tagMenuTagInfoNatItems
private javax.swing.table.TableRowSorter<PropertiesDialog.ReadOnlyTableModel>
tagRowSorter
private javax.swing.JTable
tagTable
The tags table.private JosmTextField
tagTableFilter
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>>
valueCount
-
Fields inherited from class org.openstreetmap.josm.gui.dialogs.ToggleDialog
button, buttonHiding, detachedDialog, dialogsPanel, isCollapsed, isDocked, isShowing, name, preferenceClass, preferencePrefix, PROP_DYNAMIC_BUTTONS, titleBar, toggleAction, windowMenuItem
-
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 Constructor Description PropertiesDialog()
Create a new PropertiesDialog
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Called whenever the active or edit layer changed.void
addCustomPropertiesCellRenderer(javax.swing.table.TableCellRenderer renderer)
Adds a custom table cell renderer to render cells of the tags table.private void
autoresizeTagTable()
private void
buildMembershipTable()
private void
buildTagsTable()
(package private) static SearchSetting
createSearchSetting(java.lang.String key, java.util.Collection<? extends IPrimitive> sel, boolean sameType)
void
destroy()
Called when the object has been destroyed.private void
destroyTaginfoNationalActions()
private void
editMembership(int row)
This simply fires up anRelationEditor
for the relation shown; everything else is the editor's business.private static int
findViewRow(javax.swing.JTable table, javax.swing.table.TableModel model, java.lang.Object value)
PopupMenuHandler
getMembershipPopupMenuHandler()
Replies the membership popup menu handler.PopupMenuHandler
getPropertyPopupMenuHandler()
Replies the tag popup menu handler.IRelation<?>
getSelectedMembershipRelation()
Returns the selected relation membership.java.util.Collection<IRelation<?>>
getSelectedMembershipRelations()
Returns all selected relation memberships.Tags
getSelectedProperties()
Returns the selected tags.Tag
getSelectedProperty()
Returns the selected tag.java.lang.String
helpTopic()
Returns the help topic on JOSM wiki for this feature.void
hideNotify()
Called when toggle dialog is hidden (collapsed, removed, MapFrame is removed, ...).void
preferenceChanged(PreferenceChangeEvent e)
Reloads data when thedisplay.discardable-keys
preference changesvoid
primitiveHovered(PrimitiveHoverListener.PrimitiveHoverEvent e)
Method called when the primitive under the mouse pointer changes.void
processDatasetEvent(AbstractDatasetChangedEvent event)
Called when notified about any type of dataset change event.void
propertyChange(java.beans.PropertyChangeEvent e)
void
removeCustomPropertiesCellRenderer(javax.swing.table.TableCellRenderer renderer)
Removes a custom table cell renderer.void
selectionChanged(DataSelectionListener.SelectionChangeEvent event)
Called whenever the selection is changed.void
setFilter(SearchCompiler.Match filter)
Sets a filter to restrict the displayed properties.private void
setupBlankSpaceMenu()
Creates the popup menu @field blankSpaceMenu and its launcher on main panel.private JosmTextField
setupFilter()
private void
setupKeyboardShortcuts()
Assigns all needed keys like Enter and Spacebar to most important actions.private void
setupMembershipMenu()
Creates the popup menu @field membershipMenu and its launcher on membership table.private void
setupTaginfoNationalActions(java.util.Collection<? extends IPrimitive> newSel)
private void
setupTagsMenu()
Creates the popup menu @field tagMenu and its launcher on tag table.void
setVisible(boolean b)
void
showNotify()
Called when toggle dialog is shown (after it was created or expanded).void
taggingPresetsModified()
Updates the preset list when Presets preference changes.private void
updateActionsEnabledState()
private void
updateMembershipTableData(java.util.Collection<? extends IPrimitive> primitives)
private void
updateMembershipTableVisibility()
private void
updateSelection()
Update selection status, callselectionChanged(org.openstreetmap.josm.data.osm.DataSelectionListener.SelectionChangeEvent)
function.private void
updateTagTableData(java.util.Collection<? extends IPrimitive> primitives)
private void
updateTagTableVisibility(java.util.Collection<? extends IPrimitive> primitives)
private void
updateTitle(java.util.Collection<? extends IPrimitive> primitives)
private void
updateUi(java.util.Collection<? extends IPrimitive> primitives)
private void
updateUi(IPrimitive primitive)
void
visitSelectedProperties(KeyValueVisitor visitor)
Visits all combinations of the selected keys/values.-
Methods inherited from class org.openstreetmap.josm.gui.dialogs.ToggleDialog
buttonHidden, buttonShown, clearButtonActions, closeDetachedDialog, collapse, createLayout, createLayout, detach, dock, dockWhenClosingDetachedDlg, eventDispatched, expand, getButton, getDefaultDetachedSize, getLastHeight, getName, getPreferencePrefix, getPreferredHeight, getToggleAction, hideDialog, isDialogInCollapsedView, isDialogInDefaultView, isDialogShowing, registerInWindowMenu, rememberHeight, setButton, setContentVisible, setDialogsPanel, setIsButtonHiding, setIsCollapsed, setIsDocked, setIsShowing, setTitle, showDialog, stateChanged, toggleButtonHook, toString, unfurlDialog
-
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, 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, 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
-
PROP_DISPLAY_DISCARDABLE_KEYS
private static final BooleanProperty PROP_DISPLAY_DISCARDABLE_KEYS
-
pluginHook
public static final javax.swing.JPanel pluginHook
hook for roadsigns plugin to display a small button in the upper right corner of this dialog
-
tagData
private final PropertiesDialog.ReadOnlyTableModel tagData
The tag data of selected objects.
-
cellRenderer
private final PropertiesCellRenderer cellRenderer
-
tagRowSorter
private final transient javax.swing.table.TableRowSorter<PropertiesDialog.ReadOnlyTableModel> tagRowSorter
-
tagTableFilter
private final JosmTextField tagTableFilter
-
membershipData
private final javax.swing.table.DefaultTableModel membershipData
The membership data of selected objects.
-
tagTable
private final javax.swing.JTable tagTable
The tags table.
-
membershipTable
private final javax.swing.JTable membershipTable
The membership table.
-
bothTables
private final javax.swing.JPanel bothTables
JPanel containing both previous tables
-
tagMenu
private final javax.swing.JPopupMenu tagMenu
-
membershipMenu
private final javax.swing.JPopupMenu membershipMenu
-
blankSpaceMenu
private final javax.swing.JPopupMenu blankSpaceMenu
-
tagMenuHandler
private final transient PopupMenuHandler tagMenuHandler
-
membershipMenuHandler
private final transient PopupMenuHandler membershipMenuHandler
-
blankSpaceMenuHandler
private final transient PopupMenuHandler blankSpaceMenuHandler
-
tagMenuTagInfoNatItems
private final java.util.List<javax.swing.JMenuItem> tagMenuTagInfoNatItems
-
membershipMenuTagInfoNatItems
private final java.util.List<javax.swing.JMenuItem> membershipMenuTagInfoNatItems
-
valueCount
private final transient java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> valueCount
-
editHelper
private final transient TagEditHelper editHelper
This sub-object is responsible for all adding and editing of tags
-
dataChangedAdapter
private final transient DataSetListenerAdapter dataChangedAdapter
-
helpTagAction
private final HelpAction helpTagAction
-
helpRelAction
private final HelpAction helpRelAction
-
taginfoAction
private final TaginfoAction taginfoAction
-
tagHistoryAction
private final TaginfoAction tagHistoryAction
-
taginfoNationalActions
private final java.util.Collection<TaginfoAction> taginfoNationalActions
-
taginfoNationalHash
private transient int taginfoNationalHash
-
pasteValueAction
private final PropertiesDialog.PasteValueAction pasteValueAction
-
copyValueAction
private final CopyValueAction copyValueAction
-
copyKeyValueAction
private final CopyKeyValueAction copyKeyValueAction
-
copyAllKeyValueAction
private final CopyAllKeyValueAction copyAllKeyValueAction
-
searchActionSame
private final PropertiesDialog.SearchAction searchActionSame
-
searchActionAny
private final PropertiesDialog.SearchAction searchActionAny
-
addAction
private final PropertiesDialog.AddAction addAction
-
editAction
private final PropertiesDialog.EditAction editAction
-
deleteAction
private final PropertiesDialog.DeleteAction deleteAction
-
josmActions
private final JosmAction[] josmActions
-
highlightHelper
private final transient HighlightHelper highlightHelper
-
btnAdd
private final SideButton btnAdd
The Add button (needed to be able to disable it)
-
btnEdit
private final SideButton btnEdit
The Edit button (needed to be able to disable it)
-
btnDel
private final SideButton btnDel
The Delete button (needed to be able to disable it)
-
presets
private final PresetListPanel presets
Matching preset display class
-
selectSth
private final javax.swing.JLabel selectSth
Text to display when nothing selected.
-
presetHandler
private final transient TaggingPresetHandler presetHandler
-
popupMenuLauncher
private PopupMenuLauncher popupMenuLauncher
-
PROP_AUTORESIZE_TAGS_TABLE
private static final BooleanProperty PROP_AUTORESIZE_TAGS_TABLE
-
PROP_PREVIEW_ON_HOVER
public static final BooleanProperty PROP_PREVIEW_ON_HOVER
Show tags and relation memberships of objects in the properties dialog when hovering over them with the mouse pointer- Since:
- 18574
-
hoverPreviewPropListener
private final PropertiesDialog.HoverPreviewPropListener hoverPreviewPropListener
-
PROP_PREVIEW_ON_HOVER_PRIORITIZE_SELECTION
public static final CachingProperty<java.lang.Boolean> PROP_PREVIEW_ON_HOVER_PRIORITIZE_SELECTION
Always show information for selected objects when something is selected instead of the hovered object- Since:
- 18574
-
hoverPreviewPrioritizeSelectionPropListener
private final PropertiesDialog.HoverPreviewPreferSelectionPropListener hoverPreviewPrioritizeSelectionPropListener
-
-
Constructor Detail
-
PropertiesDialog
public PropertiesDialog()
Create a new PropertiesDialog
-
-
Method Detail
-
helpTopic
public java.lang.String helpTopic()
Description copied from interface:Helpful
Returns the help topic on JOSM wiki for this feature.- Specified by:
helpTopic
in interfaceHelpful
- Overrides:
helpTopic
in classToggleDialog
- Returns:
- the help topic on JOSM wiki for this feature
-
buildTagsTable
private void buildTagsTable()
-
buildMembershipTable
private void buildMembershipTable()
-
setupBlankSpaceMenu
private void setupBlankSpaceMenu()
Creates the popup menu @field blankSpaceMenu and its launcher on main panel.
-
destroyTaginfoNationalActions
private void destroyTaginfoNationalActions()
-
setupTaginfoNationalActions
private void setupTaginfoNationalActions(java.util.Collection<? extends IPrimitive> newSel)
-
setupMembershipMenu
private void setupMembershipMenu()
Creates the popup menu @field membershipMenu and its launcher on membership table.
-
setupTagsMenu
private void setupTagsMenu()
Creates the popup menu @field tagMenu and its launcher on tag table.
-
setFilter
public void setFilter(SearchCompiler.Match filter)
Sets a filter to restrict the displayed properties.- Parameters:
filter
- the filter- Since:
- 8980
-
setupKeyboardShortcuts
private void setupKeyboardShortcuts()
Assigns all needed keys like Enter and Spacebar to most important actions.
-
setupFilter
private JosmTextField setupFilter()
-
editMembership
private void editMembership(int row)
This simply fires up anRelationEditor
for the relation shown; everything else is the editor's business.- Parameters:
row
- position
-
findViewRow
private static int findViewRow(javax.swing.JTable table, javax.swing.table.TableModel model, java.lang.Object value)
-
updateSelection
private void updateSelection()
Update selection status, callselectionChanged(org.openstreetmap.josm.data.osm.DataSelectionListener.SelectionChangeEvent)
function.
-
showNotify
public void showNotify()
Description copied from class:ToggleDialog
Called when toggle dialog is shown (after it was created or expanded). Descendants may overwrite this method, it's a good place to register listeners needed to keep dialog updated- Overrides:
showNotify
in classToggleDialog
-
hideNotify
public void hideNotify()
Description copied from class:ToggleDialog
Called when toggle dialog is hidden (collapsed, removed, MapFrame is removed, ...). Good place to unregister listeners- Overrides:
hideNotify
in classToggleDialog
-
setVisible
public void setVisible(boolean b)
- Overrides:
setVisible
in classjavax.swing.JComponent
-
destroy
public void destroy()
Description copied from interface:Destroyable
Called when the object has been destroyed.- Specified by:
destroy
in interfaceDestroyable
- Overrides:
destroy
in classToggleDialog
-
selectionChanged
public void selectionChanged(DataSelectionListener.SelectionChangeEvent event)
Description copied from interface:DataSelectionListener
Called whenever the selection is changed. You get notified about the new selection, the elements that were added and removed and the layer that triggered the event.- Specified by:
selectionChanged
in interfaceDataSelectionListener
- Parameters:
event
- The selection change event.- See Also:
DataSelectionListener.SelectionChangeEvent
-
primitiveHovered
public void primitiveHovered(PrimitiveHoverListener.PrimitiveHoverEvent e)
Description copied from interface:PrimitiveHoverListener
Method called when the primitive under the mouse pointer changes.- Specified by:
primitiveHovered
in interfacePrimitiveHoverListener
- Parameters:
e
- Event object describing the hovered primitive and related information
-
autoresizeTagTable
private void autoresizeTagTable()
-
updateUi
private void updateUi(IPrimitive primitive)
-
updateUi
private void updateUi(java.util.Collection<? extends IPrimitive> primitives)
-
updateTagTableData
private void updateTagTableData(java.util.Collection<? extends IPrimitive> primitives)
-
updateMembershipTableData
private void updateMembershipTableData(java.util.Collection<? extends IPrimitive> primitives)
-
updateMembershipTableVisibility
private void updateMembershipTableVisibility()
-
updateTagTableVisibility
private void updateTagTableVisibility(java.util.Collection<? extends IPrimitive> primitives)
-
updateActionsEnabledState
private void updateActionsEnabledState()
-
updateTitle
private void updateTitle(java.util.Collection<? extends IPrimitive> primitives)
-
preferenceChanged
public void preferenceChanged(PreferenceChangeEvent e)
Reloads data when thedisplay.discardable-keys
preference changes- Specified by:
preferenceChanged
in interfacePreferenceChangedListener
- Overrides:
preferenceChanged
in classToggleDialog
- Parameters:
e
- the preference change event
-
taggingPresetsModified
public void taggingPresetsModified()
Updates the preset list when Presets preference changes.- Specified by:
taggingPresetsModified
in interfaceTaggingPresetListener
-
activeOrEditLayerChanged
public void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Description copied from interface:MainLayerManager.ActiveLayerChangeListener
Called whenever the active or edit layer changed.You 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.
- Specified by:
activeOrEditLayerChanged
in interfaceMainLayerManager.ActiveLayerChangeListener
- Parameters:
e
- The change event.
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
processDatasetEvent
public void processDatasetEvent(AbstractDatasetChangedEvent event)
Description copied from interface:DataSetListenerAdapter.Listener
Called when notified about any type of dataset change event.- Specified by:
processDatasetEvent
in interfaceDataSetListenerAdapter.Listener
- Parameters:
event
- dataset change event
-
getPropertyPopupMenuHandler
public PopupMenuHandler getPropertyPopupMenuHandler()
Replies the tag popup menu handler.- Returns:
- The tag popup menu handler
-
getSelectedProperty
public Tag getSelectedProperty()
Returns the selected tag. Value is empty if several tags are selected for a given key.- Returns:
- The current selected tag
-
getSelectedProperties
public Tags getSelectedProperties()
Returns the selected tags. Contains all values if several are selected for a given key.- Returns:
- The current selected tags
- Since:
- 15376
-
visitSelectedProperties
public void visitSelectedProperties(KeyValueVisitor visitor)
Visits all combinations of the selected keys/values.- Parameters:
visitor
- the visitor- Since:
- 15707
-
getMembershipPopupMenuHandler
public PopupMenuHandler getMembershipPopupMenuHandler()
Replies the membership popup menu handler.- Returns:
- The membership popup menu handler
-
getSelectedMembershipRelation
public IRelation<?> getSelectedMembershipRelation()
Returns the selected relation membership.- Returns:
- The current selected relation membership
-
getSelectedMembershipRelations
public java.util.Collection<IRelation<?>> getSelectedMembershipRelations()
Returns all selected relation memberships.- Returns:
- The selected relation memberships
- Since:
- 15707
-
addCustomPropertiesCellRenderer
public void addCustomPropertiesCellRenderer(javax.swing.table.TableCellRenderer renderer)
Adds a custom table cell renderer to render cells of the tags table. If the renderer is not capable performing aTableCellRenderer.getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)
, it should returnnull
to fall back to thedefault implementation
.- Parameters:
renderer
- the renderer to add- Since:
- 9149
-
removeCustomPropertiesCellRenderer
public void removeCustomPropertiesCellRenderer(javax.swing.table.TableCellRenderer renderer)
Removes a custom table cell renderer.- Parameters:
renderer
- the renderer to remove- Since:
- 9149
-
createSearchSetting
static SearchSetting createSearchSetting(java.lang.String key, java.util.Collection<? extends IPrimitive> sel, boolean sameType)
-
-