public class PropertiesDialog extends ToggleDialog implements DataSelectionListener, MainLayerManager.ActiveLayerChangeListener, DataSetListenerAdapter.Listener
Modifier and Type | Class and 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.
|
(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 columns
|
private 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 |
ToggleDialog.ButtonHidingType, ToggleDialog.TitleBar, ToggleDialog.ToggleDialogAction
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
java.awt.Container.AccessibleAWTContainer
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
DataSelectionListener.AbstractSelectionEvent, DataSelectionListener.SelectionAddEvent, DataSelectionListener.SelectionChangeEvent, DataSelectionListener.SelectionRemoveEvent, DataSelectionListener.SelectionReplaceEvent, DataSelectionListener.SelectionToggleEvent
Modifier and Type | Field and Description |
---|---|
private PropertiesDialog.AddAction |
addAction |
private javax.swing.JPopupMenu |
blankSpaceMenu |
private PopupMenuHandler |
blankSpaceMenuHandler |
private javax.swing.JPanel |
bothTables
JPanel containing both previous tables
|
private 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 tags
|
private HelpAction |
helpRelAction |
private HelpAction |
helpTagAction |
private HighlightHelper |
highlightHelper |
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 dialog
|
private PreferenceChangedListener |
preferenceListener |
private TaggingPresetHandler |
presetHandler |
private PresetListPanel |
presets
Matching preset display class
|
private static BooleanProperty |
PROP_AUTORESIZE_TAGS_TABLE |
private 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 |
taginfoAction |
private java.util.Collection<TaginfoAction> |
taginfoNationalActions |
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 |
button, buttonHiding, detachedDialog, dialogsPanel, isCollapsed, isDocked, isShowing, name, preferenceClass, preferencePrefix, PROP_DYNAMIC_BUTTONS, titleBar, toggleAction, windowMenuItem
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
PropertiesDialog()
Create a new PropertiesDialog
|
Modifier and Type | Method and 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 an
RelationEditor 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.
|
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 |
processDatasetEvent(AbstractDatasetChangedEvent event)
Called when notified about any type of dataset change event.
|
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) |
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).
|
private void |
updateSelection()
Update selection status, call @{link #selectionChanged} function.
|
buttonHidden, buttonShown, closeDetachedDialog, collapse, createLayout, createLayout, detach, dock, dockWhenClosingDetachedDlg, eventDispatched, expand, getButton, getDefaultDetachedSize, getLastHeight, getName, getPreferencePrefix, getPreferredHeight, getToggleAction, hideDialog, isDialogInCollapsedView, isDialogInDefaultView, isDialogShowing, preferenceChanged, registerInWindowMenu, rememberHeight, setButton, setContentVisible, setDialogsPanel, setIsButtonHiding, setIsCollapsed, setIsDocked, setIsShowing, setTitle, showDialog, stateChanged, toggleButtonHook, toString, unfurlDialog
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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
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
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, 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, transferFocusUpCycle
public static final javax.swing.JPanel pluginHook
private final PropertiesDialog.ReadOnlyTableModel tagData
private final PropertiesCellRenderer cellRenderer
private final transient javax.swing.table.TableRowSorter<PropertiesDialog.ReadOnlyTableModel> tagRowSorter
private final JosmTextField tagTableFilter
private final javax.swing.table.DefaultTableModel membershipData
private final javax.swing.JTable tagTable
private final javax.swing.JTable membershipTable
private final javax.swing.JPanel bothTables
private final javax.swing.JPopupMenu tagMenu
private final javax.swing.JPopupMenu membershipMenu
private final javax.swing.JPopupMenu blankSpaceMenu
private final transient PopupMenuHandler tagMenuHandler
private final transient PopupMenuHandler membershipMenuHandler
private final transient PopupMenuHandler blankSpaceMenuHandler
private final java.util.List<javax.swing.JMenuItem> tagMenuTagInfoNatItems
private final java.util.List<javax.swing.JMenuItem> membershipMenuTagInfoNatItems
private final transient java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> valueCount
private final transient TagEditHelper editHelper
private final transient DataSetListenerAdapter dataChangedAdapter
private final HelpAction helpTagAction
private final HelpAction helpRelAction
private final TaginfoAction taginfoAction
private final java.util.Collection<TaginfoAction> taginfoNationalActions
private final PropertiesDialog.PasteValueAction pasteValueAction
private final CopyValueAction copyValueAction
private final CopyKeyValueAction copyKeyValueAction
private final CopyAllKeyValueAction copyAllKeyValueAction
private final PropertiesDialog.SearchAction searchActionSame
private final PropertiesDialog.SearchAction searchActionAny
private final PropertiesDialog.AddAction addAction
private final PropertiesDialog.EditAction editAction
private final PropertiesDialog.DeleteAction deleteAction
private final JosmAction[] josmActions
private final transient HighlightHelper highlightHelper
private final SideButton btnAdd
private final SideButton btnEdit
private final SideButton btnDel
private final PresetListPanel presets
private final javax.swing.JLabel selectSth
private final PreferenceChangedListener preferenceListener
private final transient TaggingPresetHandler presetHandler
private static final BooleanProperty PROP_AUTORESIZE_TAGS_TABLE
public PropertiesDialog()
public java.lang.String helpTopic()
Helpful
helpTopic
in interface Helpful
helpTopic
in class ToggleDialog
private void buildTagsTable()
private void buildMembershipTable()
private void setupBlankSpaceMenu()
private void destroyTaginfoNationalActions()
private void setupTaginfoNationalActions(java.util.Collection<? extends IPrimitive> newSel)
private void setupMembershipMenu()
private void setupTagsMenu()
public void setFilter(SearchCompiler.Match filter)
private void setupKeyboardShortcuts()
private JosmTextField setupFilter()
private void editMembership(int row)
RelationEditor
for the relation shown; everything else
is the editor's business.row
- positionprivate static int findViewRow(javax.swing.JTable table, javax.swing.table.TableModel model, java.lang.Object value)
private void updateSelection()
public void showNotify()
ToggleDialog
showNotify
in class ToggleDialog
public void hideNotify()
ToggleDialog
hideNotify
in class ToggleDialog
public void setVisible(boolean b)
setVisible
in class javax.swing.JComponent
public void destroy()
Destroyable
destroy
in interface Destroyable
destroy
in class ToggleDialog
public void selectionChanged(DataSelectionListener.SelectionChangeEvent event)
DataSelectionListener
selectionChanged
in interface DataSelectionListener
event
- The selection change event.DataSelectionListener.SelectionChangeEvent
private void autoresizeTagTable()
public void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
MainLayerManager.ActiveLayerChangeListener
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.
activeOrEditLayerChanged
in interface MainLayerManager.ActiveLayerChangeListener
e
- The change event.public void processDatasetEvent(AbstractDatasetChangedEvent event)
DataSetListenerAdapter.Listener
processDatasetEvent
in interface DataSetListenerAdapter.Listener
event
- dataset change eventpublic PopupMenuHandler getPropertyPopupMenuHandler()
public Tag getSelectedProperty()
public Tags getSelectedProperties()
public PopupMenuHandler getMembershipPopupMenuHandler()
public IRelation<?> getSelectedMembershipRelation()
public void addCustomPropertiesCellRenderer(javax.swing.table.TableCellRenderer renderer)
TableCellRenderer.getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)
,
it should return null
to fall back to the
default implementation
.renderer
- the renderer to addpublic void removeCustomPropertiesCellRenderer(javax.swing.table.TableCellRenderer renderer)
renderer
- the renderer to removestatic SearchSetting createSearchSetting(java.lang.String key, java.util.Collection<? extends IPrimitive> sel, boolean sameType)