Class FilterDialog
- 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.FilterDialog
-
- All Implemented Interfaces:
java.awt.event.AWTEventListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,DataSetListener,Helpful,MapFrame.MapModeChangeListener,ShowHideButtonListener,PreferenceChangedListener,Destroyable
public class FilterDialog extends ToggleDialog implements DataSetListener, MapFrame.MapModeChangeListener
The filter dialog displays a list of filters that are active on the current edit layer.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classFilterDialog.AbstractFilterActionprivate classFilterDialog.AddAction(package private) static classFilterDialog.BooleanRendererprivate classFilterDialog.DeleteActionprivate classFilterDialog.EditActionprivate classFilterDialog.EnableFilterActionprivate classFilterDialog.FilterActionprivate classFilterDialog.HidingFilterActionprivate classFilterDialog.MoveDownActionprivate classFilterDialog.MoveUpActionprivate classFilterDialog.ReverseActionprivate classFilterDialog.SortAction(package private) static classFilterDialog.StringRenderer(package private) static classFilterDialog.UserTable-
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
-
-
Field Summary
Fields Modifier and Type Field Description private FilterDialog.AddActionaddActionprivate static java.lang.String[]COLUMN_TOOLTIPSprivate FilterDialog.DeleteActiondeleteActionprivate FilterDialog.EditActioneditActionprivate static ShortcutENABLE_FILTER_SHORTCUTprivate FilterDialog.EnableFilterActionenableFilterActionprivate FilterTableModelfilterModelprivate static ShortcutHIDING_FILTER_SHORTCUTprivate FilterDialog.HidingFilterActionhidingFilterActionprivate FilterDialog.MoveDownActionmoveDownActionprivate FilterDialog.MoveUpActionmoveUpActionprivate FilterDialog.ReverseActionreverseActionprivate FilterDialog.SortActionsortActionprivate javax.swing.JTableuserTable-
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 FilterDialog()Constructs a newFilterDialog
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuild()Builds the GUI.voiddataChanged(DataChangedEvent event)Called after big changes in dataset.voiddestroy()Called when the object has been destroyed.voiddrawOSDText(java.awt.Graphics2D g)Draws a text on the map display that indicates that filters are active.FilterTableModelgetFilterModel()This method is intended for Plugins getting the filtermodel and using .addFilter() to add a new filter.voidhideNotify()Called when toggle dialog is hidden (collapsed, removed, MapFrame is removed, ...).voidmapModeChange(MapMode oldMapMode, MapMode newMapMode)Trigerred when map mode changes.voidnodeMoved(NodeMovedEvent event)A node's coordinates were modified.voidotherDatasetChange(AbstractDatasetChangedEvent event)Minor dataset change, currently only changeset id changed is supported, but can be extended in future.voidprimitivesAdded(PrimitivesAddedEvent event)A bunch of primitives were added into the DataSet, or existing deleted/invisible primitives were resurrected.voidprimitivesRemoved(PrimitivesRemovedEvent event)A bunch of primitives were removed from the DataSet, or preexisting primitives were marked as deleted.voidrelationMembersChanged(RelationMembersChangedEvent event)A relation's members have changed.voidshowNotify()Called when toggle dialog is shown (after it was created or expanded).voidtagsChanged(TagsChangedEvent event)There was some change in the tag set of a primitive.voidupdateDialogHeader()Updates the headline of this dialog to display the number of active filters.voidwayNodesChanged(WayNodesChangedEvent event)A way's node list was changed.-
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, helpTopic, hideDialog, isDialogInCollapsedView, isDialogInDefaultView, isDialogShowing, preferenceChanged, 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, setVisible, 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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.osm.event.DataSetListener
dataChangedIndividualEvents
-
-
-
-
Field Detail
-
userTable
private javax.swing.JTable userTable
-
filterModel
private final FilterTableModel filterModel
-
addAction
private final FilterDialog.AddAction addAction
-
editAction
private final FilterDialog.EditAction editAction
-
deleteAction
private final FilterDialog.DeleteAction deleteAction
-
moveUpAction
private final FilterDialog.MoveUpAction moveUpAction
-
moveDownAction
private final FilterDialog.MoveDownAction moveDownAction
-
sortAction
private final FilterDialog.SortAction sortAction
-
reverseAction
private final FilterDialog.ReverseAction reverseAction
-
enableFilterAction
private final FilterDialog.EnableFilterAction enableFilterAction
-
hidingFilterAction
private final FilterDialog.HidingFilterAction hidingFilterAction
-
ENABLE_FILTER_SHORTCUT
private static final Shortcut ENABLE_FILTER_SHORTCUT
-
HIDING_FILTER_SHORTCUT
private static final Shortcut HIDING_FILTER_SHORTCUT
-
COLUMN_TOOLTIPS
private static final java.lang.String[] COLUMN_TOOLTIPS
-
-
Constructor Detail
-
FilterDialog
public FilterDialog()
Constructs a newFilterDialog
-
-
Method Detail
-
showNotify
public void showNotify()
Description copied from class:ToggleDialogCalled 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:
showNotifyin classToggleDialog
-
hideNotify
public void hideNotify()
Description copied from class:ToggleDialogCalled when toggle dialog is hidden (collapsed, removed, MapFrame is removed, ...). Good place to unregister listeners- Overrides:
hideNotifyin classToggleDialog
-
build
protected void build()
Builds the GUI.
-
destroy
public void destroy()
Description copied from interface:DestroyableCalled when the object has been destroyed.- Specified by:
destroyin interfaceDestroyable- Overrides:
destroyin classToggleDialog
-
updateDialogHeader
public void updateDialogHeader()
Updates the headline of this dialog to display the number of active filters.
-
drawOSDText
public void drawOSDText(java.awt.Graphics2D g)
Draws a text on the map display that indicates that filters are active.- Parameters:
g- The graphics to draw that text on.
-
dataChanged
public void dataChanged(DataChangedEvent event)
Description copied from interface:DataSetListenerCalled after big changes in dataset. Usually other events are stopped using Dataset.beginUpdate() and after operation is completed (Dataset.endUpdate()),DataSetListener.dataChanged(DataChangedEvent event)is called.- Specified by:
dataChangedin interfaceDataSetListener- Parameters:
event- data change event
-
nodeMoved
public void nodeMoved(NodeMovedEvent event)
Description copied from interface:DataSetListenerA node's coordinates were modified.- Specified by:
nodeMovedin interfaceDataSetListener- Parameters:
event- The event for the node that was moved.
-
otherDatasetChange
public void otherDatasetChange(AbstractDatasetChangedEvent event)
Description copied from interface:DataSetListenerMinor dataset change, currently only changeset id changed is supported, but can be extended in future.- Specified by:
otherDatasetChangein interfaceDataSetListener- Parameters:
event- the event for data modification
-
primitivesAdded
public void primitivesAdded(PrimitivesAddedEvent event)
Description copied from interface:DataSetListenerA bunch of primitives were added into the DataSet, or existing deleted/invisible primitives were resurrected.- Specified by:
primitivesAddedin interfaceDataSetListener- Parameters:
event- An event for an collection of newly-visible primitives
-
primitivesRemoved
public void primitivesRemoved(PrimitivesRemovedEvent event)
Description copied from interface:DataSetListenerA bunch of primitives were removed from the DataSet, or preexisting primitives were marked as deleted.- Specified by:
primitivesRemovedin interfaceDataSetListener- Parameters:
event- An event for an collection of newly-invisible primitives
-
relationMembersChanged
public void relationMembersChanged(RelationMembersChangedEvent event)
Description copied from interface:DataSetListenerA relation's members have changed.- Specified by:
relationMembersChangedin interfaceDataSetListener- Parameters:
event- The event for the relation that was modified.
-
tagsChanged
public void tagsChanged(TagsChangedEvent event)
Description copied from interface:DataSetListenerThere was some change in the tag set of a primitive. It can have been a tag addition, tag removal or change in tag value.- Specified by:
tagsChangedin interfaceDataSetListener- Parameters:
event- the event for the primitive, whose tags were affected.
-
wayNodesChanged
public void wayNodesChanged(WayNodesChangedEvent event)
Description copied from interface:DataSetListenerA way's node list was changed.- Specified by:
wayNodesChangedin interfaceDataSetListener- Parameters:
event- The event for the way that was modified.
-
mapModeChange
public void mapModeChange(MapMode oldMapMode, MapMode newMapMode)
Description copied from interface:MapFrame.MapModeChangeListenerTrigerred when map mode changes.- Specified by:
mapModeChangein interfaceMapFrame.MapModeChangeListener- Parameters:
oldMapMode- old map modenewMapMode- new map mode
-
getFilterModel
public FilterTableModel getFilterModel()
This method is intended for Plugins getting the filtermodel and using .addFilter() to add a new filter.- Returns:
- the filtermodel
-
-