public class PropertiesDialog extends ToggleDialog implements SelectionChangedListener, MainLayerManager.ActiveLayerChangeListener, DataSetListenerAdapter.Listener
Modifier and Type | Class and Description |
---|---|
(package private) class |
PropertiesDialog.AbstractCopyAction |
(package private) class |
PropertiesDialog.AddAction
Action handling add button press in properties dialog.
|
(package private) static class |
PropertiesDialog.BlankSpaceMenuLauncher |
(package private) class |
PropertiesDialog.CopyAllKeyValueAction |
(package private) class |
PropertiesDialog.CopyKeyValueAction |
(package private) class |
PropertiesDialog.CopyValueAction |
(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) class |
PropertiesDialog.HelpAction |
(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 |
(package private) class |
PropertiesDialog.TaginfoAction |
ToggleDialog.ButtonHidingType, ToggleDialog.TitleBar, ToggleDialog.ToggleDialogAction
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
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 |
buildMembershipTable() |
private void |
buildTagsTable() |
(package private) static SearchAction.SearchSetting |
createSearchSetting(java.lang.String key,
java.util.Collection<OsmPrimitive> sel,
boolean sameType) |
void |
destroy()
Called when the object has been destroyed.
|
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.
|
Tag |
getSelectedProperty()
Returns the selected tag.
|
void |
hideNotify()
Called when toggle dialog is hidden (collapsed, removed, MapFrame is removed, ...).
|
void |
processDatasetEvent(AbstractDatasetChangedEvent event) |
void |
removeCustomPropertiesCellRenderer(javax.swing.table.TableCellRenderer renderer)
Removes a custom table cell renderer.
|
void |
selectionChanged(java.util.Collection<? extends OsmPrimitive> newSelection)
Informs the listener that the selection in the dataset has 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 |
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, getName, getPreferencePrefix, getPreferredHeight, getToggleAction, helpTopic, hideDialog, isDialogInCollapsedView, isDialogInDefaultView, isDialogShowing, preferenceChanged, registerInWindowMenu, 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 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 PropertiesDialog.HelpAction helpAction
private final PropertiesDialog.TaginfoAction taginfoAction
private final PropertiesDialog.PasteValueAction pasteValueAction
private final PropertiesDialog.CopyValueAction copyValueAction
private final PropertiesDialog.CopyKeyValueAction copyKeyValueAction
private final PropertiesDialog.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 SelectInRelationListAction setRelationSelectionAction
private final SelectRelationAction selectRelationAction
private final SelectRelationAction addRelationToSelectionAction
private final DownloadMembersAction downloadMembersAction
private final DownloadSelectedIncompleteMembersAction downloadSelectedIncompleteMembersAction
private final SelectMembersAction selectMembersAction
private final SelectMembersAction addMembersToSelectionAction
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 Preferences.PreferenceChangedListener preferenceListener
private final transient TaggingPresetHandler presetHandler
public PropertiesDialog()
private void buildTagsTable()
private void buildMembershipTable()
private void setupBlankSpaceMenu()
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(java.util.Collection<? extends OsmPrimitive> newSelection)
SelectionChangedListener
selectionChanged
in interface SelectionChangedListener
newSelection
- The new selection.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)
processDatasetEvent
in interface DataSetListenerAdapter.Listener
public PopupMenuHandler getPropertyPopupMenuHandler()
public Tag getSelectedProperty()
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 SearchAction.SearchSetting createSearchSetting(java.lang.String key, java.util.Collection<OsmPrimitive> sel, boolean sameType)