|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.openstreetmap.josm.gui.dialogs.ToggleDialog
org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog
public class PropertiesDialog
This dialog displays the properties of the current selected primitives. If no object is selected, the dialog list is empty. If only one is selected, all properties of this object are selected. If more than one object are selected, the sum of all properties are displayed. If the different objects share the same property, 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 property button to edit the table selection value. The command is applied to all selected entries.
Nested Class Summary | |
---|---|
(package private) class |
PropertiesDialog.AbstractCopyAction
|
(package private) static class |
PropertiesDialog.AbstractRelationAction
|
(package private) class |
PropertiesDialog.AddAction
Action handling add button press in properties dialog. |
(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.DownloadIncompleteMembersAction
Action for downloading incomplete members of selected relation |
(package private) class |
PropertiesDialog.EditAction
Action handling edit button press in properties dialog. |
(package private) class |
PropertiesDialog.HelpAction
|
(package private) static class |
PropertiesDialog.MemberInfo
|
class |
PropertiesDialog.MouseClickWatch
Watches for mouse clicks |
static interface |
PropertiesDialog.RelationRelated
|
(package private) class |
PropertiesDialog.SearchAction
|
(package private) static class |
PropertiesDialog.SelectRelationAction
|
(package private) class |
PropertiesDialog.SelectRelationMembersAction
Sets the current selection to the members of selected relation |
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.dialogs.ToggleDialog |
---|
ToggleDialog.ButtonHiddingType, 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 |
Field Summary | |
---|---|
private PropertiesDialog.AddAction |
addAction
|
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 PropertiesDialog.CopyAllKeyValueAction |
copyAllKeyValueAction
|
private PropertiesDialog.CopyKeyValueAction |
copyKeyValueAction
|
private PropertiesDialog.CopyValueAction |
copyValueAction
|
private DataSetListenerAdapter |
dataChangedAdapter
|
static int |
DEFAULT_LRU_TAGS_NUMBER
|
(package private) java.util.Comparator<AutoCompletionListItem> |
defaultACItemComparator
|
private PropertiesDialog.DeleteAction |
deleteAction
|
private PropertiesDialog.EditAction |
editAction
|
private PropertiesDialog.HelpAction |
helpAction
|
private JosmAction[] |
josmActions
|
private static java.lang.String |
lastAddKey
|
private static java.lang.String |
lastAddValue
|
static int |
MAX_LRU_TAGS_NUMBER
|
private javax.swing.table.DefaultTableModel |
membershipData
The membership data of selected objects. |
private javax.swing.JPopupMenu |
membershipMenu
|
private javax.swing.JTable |
membershipTable
The membership table. |
private java.lang.String |
objKey
|
static javax.swing.JPanel |
pluginHook
|
private PresetListPanel.PresetHandler |
presetHandler
|
private PresetListPanel |
presets
Matching preset display class |
private javax.swing.table.DefaultTableModel |
propertyData
The property data of selected objects. |
private javax.swing.JPopupMenu |
propertyMenu
|
private javax.swing.JTable |
propertyTable
The properties table. |
private static java.util.Map<Tag,java.lang.Void> |
recentTags
|
private PropertiesDialog.SearchAction |
searchActionAny
|
private PropertiesDialog.SearchAction |
searchActionSame
|
private javax.swing.JLabel |
selectSth
Text to display when nothing selected. |
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, preferencePrefix, titleBar, toggleAction, windowMenuItem |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
PropertiesDialog(MapFrame mapFrame)
Create a new PropertiesDialog |
Method Summary | |
---|---|
private java.awt.event.FocusAdapter |
addFocusAdapter(AutoCompletingComboBox keys,
AutoCompletingComboBox values,
AutoCompletionManager autocomplete,
java.util.Comparator<AutoCompletionListItem> comparator)
Create a focus handling adapter and apply in to the editor component of value autocompletion box. |
javax.swing.JMenuItem |
addMembershipPopupMenuAction(javax.swing.Action a)
|
void |
addMembershipPopupMenuListener(javax.swing.event.PopupMenuListener l)
|
void |
addMembershipPopupMenuSeparator()
|
private void |
addProperty()
Open the add selection dialog and add a new key/value to the table (and to the dataset, of course). |
javax.swing.JMenuItem |
addPropertyPopupMenuAction(javax.swing.Action a)
|
void |
addPropertyPopupMenuListener(javax.swing.event.PopupMenuListener l)
|
void |
addPropertyPopupMenuSeparator()
|
void |
destroy()
|
void |
editLayerChanged(OsmDataLayer oldLayer,
OsmDataLayer newLayer)
|
private void |
editMembership(int row)
This simply fires up an RelationEditor for the relation shown; everything else
is the editor's business. |
private void |
editProperty(int row)
Edit the value in the properties table row |
private int |
findRow(javax.swing.table.TableModel model,
java.lang.Object value)
|
private static java.util.List<java.lang.String> |
getAutocompletionKeys(java.lang.String key)
For a given key k, return a list of keys which are used as keys for auto-completing values to increase the search space. |
IRelation |
getSelectedMembershipRelation()
|
Tag |
getSelectedProperty()
|
void |
hideNotify()
Called when toggle dialog is hidden (collapsed, removed, MapFrame is removed, ...). |
void |
processDatasetEvent(AbstractDatasetChangedEvent event)
|
void |
removeMembershipPopupMenuListener(javax.swing.event.PopupMenuListener l)
|
void |
removePropertyPopupMenuListener(javax.swing.event.PopupMenuListener l)
|
void |
selectionChanged(java.util.Collection<? extends OsmPrimitive> newSelection)
Informs the listener that the selection in the dataset has changed. |
void |
setVisible(boolean b)
|
void |
showNotify()
Called when toggle dialog is shown (after it was created or expanded). |
private void |
suggestRecentlyAddedTags(javax.swing.JPanel p,
AutoCompletingComboBox keys,
AutoCompletingComboBox values,
java.util.List<JosmAction> tagsActions,
int tagsToShow,
java.awt.event.FocusAdapter focus)
|
private void |
updateSelection()
Update selection status, call @{link #selectionChanged} function. |
Methods inherited from class org.openstreetmap.josm.gui.dialogs.ToggleDialog |
---|
buttonHidden, buttonShown, closeDetachedDialog, collapse, createLayout, createLayout, detach, dock, dockWhenClosingDetachedDlg, eventDispatched, expand, getButton, getDefaultDetachedSize, getDetachedGeometry, getName, getPreferencePrefix, getPreferredHeight, getToggleAction, helpTopic, hideDialog, isDialogInCollapsedView, isDialogInDefaultView, isDialogShowing, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final javax.swing.JPanel pluginHook
private javax.swing.JPopupMenu propertyMenu
private javax.swing.JPopupMenu membershipMenu
private final java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Integer>> valueCount
java.util.Comparator<AutoCompletionListItem> defaultACItemComparator
private final DataSetListenerAdapter dataChangedAdapter
private final PropertiesDialog.HelpAction helpAction
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 static java.lang.String lastAddKey
private static java.lang.String lastAddValue
public static final int DEFAULT_LRU_TAGS_NUMBER
public static final int MAX_LRU_TAGS_NUMBER
private static final java.util.Map<Tag,java.lang.Void> recentTags
private java.lang.String objKey
private final javax.swing.table.DefaultTableModel propertyData
private final javax.swing.table.DefaultTableModel membershipData
private final javax.swing.JTable propertyTable
private final javax.swing.JTable membershipTable
private final SideButton btnAdd
private final SideButton btnEdit
private final SideButton btnDel
private final PresetListPanel presets
private final javax.swing.JLabel selectSth
private PresetListPanel.PresetHandler presetHandler
Constructor Detail |
---|
public PropertiesDialog(MapFrame mapFrame)
Method Detail |
---|
public void showNotify()
ToggleDialog
showNotify
in class ToggleDialog
public void hideNotify()
ToggleDialog
hideNotify
in class ToggleDialog
private void editProperty(int row)
row
- The row of the table from which the value is edited.private static java.util.List<java.lang.String> getAutocompletionKeys(java.lang.String key)
key
- the key k
private void editMembership(int row)
RelationEditor
for the relation shown; everything else
is the editor's business.
row
- private void addProperty()
private void suggestRecentlyAddedTags(javax.swing.JPanel p, AutoCompletingComboBox keys, AutoCompletingComboBox values, java.util.List<JosmAction> tagsActions, int tagsToShow, java.awt.event.FocusAdapter focus)
private java.awt.event.FocusAdapter addFocusAdapter(AutoCompletingComboBox keys, AutoCompletingComboBox values, AutoCompletionManager autocomplete, java.util.Comparator<AutoCompletionListItem> comparator)
keys
- Box for keys entering and autocompletionvalues
- Box for values entering and autocompletionautocomplete
- Manager handling the autocompletioncomparator
- Class to decide what values are offered on autocompletion
public void setVisible(boolean b)
setVisible
in class javax.swing.JComponent
private int findRow(javax.swing.table.TableModel model, java.lang.Object value)
public void selectionChanged(java.util.Collection<? extends OsmPrimitive> newSelection)
SelectionChangedListener
selectionChanged
in interface SelectionChangedListener
newSelection
- The new selection.private void updateSelection()
public void editLayerChanged(OsmDataLayer oldLayer, OsmDataLayer newLayer)
editLayerChanged
in interface MapView.EditLayerChangeListener
public void processDatasetEvent(AbstractDatasetChangedEvent event)
processDatasetEvent
in interface DataSetListenerAdapter.Listener
public void addPropertyPopupMenuSeparator()
public javax.swing.JMenuItem addPropertyPopupMenuAction(javax.swing.Action a)
public void addPropertyPopupMenuListener(javax.swing.event.PopupMenuListener l)
public void removePropertyPopupMenuListener(javax.swing.event.PopupMenuListener l)
public Tag getSelectedProperty()
public void addMembershipPopupMenuSeparator()
public javax.swing.JMenuItem addMembershipPopupMenuAction(javax.swing.Action a)
public void addMembershipPopupMenuListener(javax.swing.event.PopupMenuListener l)
public void removeMembershipPopupMenuListener(javax.swing.event.PopupMenuListener l)
public IRelation getSelectedMembershipRelation()
public void destroy()
destroy
in class ToggleDialog
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |