public class GenericRelationEditor extends RelationEditor
JDialog.AccessibleJDialogDialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeWindow.AccessibleAWTWindow, Window.TypeContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
private MemberTable |
memberTable
the member table
|
private MemberTableModel |
memberTableModel |
private ReferringRelationsBrowser |
referrerBrowser |
private ReferringRelationsBrowserModel |
referrerModel |
private SelectionTable |
selectionTable
the model for the selection table
|
private SelectionTableModel |
selectionTableModel |
private JButton |
sortBelowButton
Button for performing the
GenericRelationEditor.SortBelowAction. |
private TagEditorPanel |
tagEditorPanel
the tag table and its model
|
private AutoCompletingTextField |
tfRole |
private JMenuItem |
windowMenuItem
the menu item in the windows menu.
|
RELATION_PROP, RELATION_SNAPSHOT_PROPbuttons, contentInsets, defaultButton, DialogClosedOtherwiseaccessibleContext, rootPane, rootPaneCheckingEnabledDEFAULT_MODALITY_TYPEBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSEABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
GenericRelationEditor(OsmDataLayer layer,
Relation relation,
Collection<RelationMember> selectedMembers)
Creates a new relation editor for the given relation.
|
| Modifier and Type | Method and Description |
|---|---|
static Command |
addPrimitivesToRelation(Relation orig,
Collection<? extends OsmPrimitive> primitivesToAdd)
Adds primitives to a given relation.
|
protected void |
addToWindowMenu()
adds current relation editor to the windows menu (in the "volatile" group) o
|
protected JToolBar |
buildLeftButtonPanel()
build the panel with the buttons on the left
|
protected JPanel |
buildMemberEditorPanel()
builds the panel for the relation member editor
|
protected JPanel |
buildOkCancelButtonPanel()
builds the panel with the OK and the Cancel button
|
protected JToolBar |
buildSelectionControlButtonPanel()
build the panel with the buttons for adding or removing the current selection
|
protected JPanel |
buildSelectionTablePanel()
builds the panel with the table displaying the currently selected primitives
|
protected JSplitPane |
buildSplitPane()
builds the
JSplitPane which divides the editor in an upper and a lower half |
protected JPanel |
buildTagEditorPanel()
builds the panel with the tag editor
|
protected JToolBar |
buildToolBar()
Creates the toolbar
|
protected void |
cleanSelfReferences()
checks whether the current relation has members referring to itself.
|
(package private) static boolean |
confirmAddingPrimitive(OsmPrimitive primitive) |
protected Dimension |
findMaxDialogSize()
Tries to find a good value of how large the dialog should be
|
protected static Set<String> |
findSuggestedRoles(Collection<TaggingPreset> presets,
OsmPrimitive p) |
private void |
registerCopyPasteAction(AbstractAction action,
Object actionName,
KeyStroke shortcut) |
void |
setVisible(boolean visible)
Override setVisible to be able to save the window geometry if required
|
(package private) static void |
warnOfCircularReferences(OsmPrimitive primitive) |
addPropertyChangeListener, getEditor, getLayer, getRelation, getRelationSnapshot, isDirtyRelation, registerRelationEditor, removePropertyChangeListener, setRelation, setRelationSnapshot, updateTitlebuttonAction, configureContextsensitiveHelp, getValue, initWindowGeometry, rememberWindowGeometry, setButtonIcons, setButtonIcons, setCancelButton, setContent, setContent, setContent, setDefaultButton, setFocusOnDefaultButton, setIcon, setIcon, setRememberWindowGeometry, setToolTipTexts, setupDialog, showDialog, toggleCheckState, toggleDisable, toggleEnable, toggleSaveStateaddImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackaddPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprivate final TagEditorPanel tagEditorPanel
private final ReferringRelationsBrowser referrerBrowser
private final ReferringRelationsBrowserModel referrerModel
private MemberTable memberTable
private final MemberTableModel memberTableModel
private SelectionTable selectionTable
private final SelectionTableModel selectionTableModel
private AutoCompletingTextField tfRole
private JMenuItem windowMenuItem
private JButton sortBelowButton
GenericRelationEditor.SortBelowAction.public GenericRelationEditor(OsmDataLayer layer, Relation relation, Collection<RelationMember> selectedMembers)
layer - the OsmDataLayer the new or edited relation belongs torelation - relation to edit, or null to create a new one.selectedMembers - a collection of members which shall be selected initiallyprotected JToolBar buildToolBar()
protected JPanel buildOkCancelButtonPanel()
protected JPanel buildTagEditorPanel()
protected JPanel buildMemberEditorPanel()
protected JPanel buildSelectionTablePanel()
protected JSplitPane buildSplitPane()
JSplitPane which divides the editor in an upper and a lower halfprotected JToolBar buildLeftButtonPanel()
protected JToolBar buildSelectionControlButtonPanel()
protected Dimension findMaxDialogSize()
ExtendedDialogfindMaxDialogSize in class ExtendedDialogpublic void setVisible(boolean visible)
ExtendedDialogsetVisible in class ExtendedDialogprotected void addToWindowMenu()
protected void cleanSelfReferences()
private void registerCopyPasteAction(AbstractAction action, Object actionName, KeyStroke shortcut)
static boolean confirmAddingPrimitive(OsmPrimitive primitive) throws GenericRelationEditor.AddAbortException
static void warnOfCircularReferences(OsmPrimitive primitive)
public static Command addPrimitivesToRelation(Relation orig, Collection<? extends OsmPrimitive> primitivesToAdd)
orig - The relation to modifyprimitivesToAdd - The primitives to add as relation membersIllegalArgumentException - if orig is nullprotected static Set<String> findSuggestedRoles(Collection<TaggingPreset> presets, OsmPrimitive p)