public class UploadDialog extends AbstractUploadDialog implements java.beans.PropertyChangeListener, Preferences.PreferenceChangedListener
Modifier and Type | Class and Description |
---|---|
(package private) class |
UploadDialog.CancelAction
Action for canceling the dialog
|
(package private) class |
UploadDialog.UploadAction
Handles an upload
|
(package private) class |
UploadDialog.WindowEventHandler
Listens to window closing events and processes them as cancel events.
|
javax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private javax.swing.JButton |
btnUpload
the upload button
|
private ChangesetCommentModel |
changesetCommentModel
the changeset comment model keeping the state of the changeset comment
|
private ChangesetCommentModel |
changesetSourceModel |
private static java.util.Collection<java.awt.Component> |
customComponents
List of custom components that can be added by plugins at JOSM startup.
|
private BasicUploadSettingsPanel |
pnlBasicUploadSettings |
private ChangesetManagementPanel |
pnlChangesetManagement
the panel to select the changeset used
|
private TagSettingsPanel |
pnlTagSettings
checkbox for selecting whether an atomic upload is to be used
|
private UploadedObjectsSummaryPanel |
pnlUploadedObjects
the panel with the objects to upload
|
private UploadStrategySelectionPanel |
pnlUploadStrategySelectionPanel |
private javax.swing.JTabbedPane |
tpConfigPanels
the tabbed pane used below of the list of primitives
|
private static UploadDialog |
uploadDialog
the unique instance of the upload dialog
|
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
UploadDialog()
constructor
|
Modifier and Type | Method and Description |
---|---|
static boolean |
addCustomComponent(java.awt.Component c)
Adds a custom component to this dialog.
|
protected void |
build()
builds the gui
|
protected javax.swing.JPanel |
buildActionPanel()
builds the panel with the OK and CANCEL buttons
|
protected javax.swing.JPanel |
buildContentPanel()
builds the content panel for the upload dialog
|
Changeset |
getChangeset()
Replies the current changeset
|
java.util.Map<java.lang.String,java.lang.String> |
getDefaultChangesetTags() |
java.lang.String |
getLastChangesetCommentFromHistory() |
java.lang.String |
getLastChangesetSourceFromHistory() |
private static java.lang.String |
getLastChangesetTagFromHistory(java.lang.String historyKey,
java.util.List<java.lang.String> def) |
protected java.lang.String |
getUploadComment()
Returns the current value for the upload comment
|
static UploadDialog |
getUploadDialog()
Replies the unique instance of the upload dialog
|
protected java.lang.String |
getUploadSource()
Returns the current value for the changeset source
|
UploadStrategySpecification |
getUploadStrategySpecification()
Replies the
UploadStrategySpecification the user entered in the dialog. |
void |
preferenceChanged(Preferences.PreferenceChangeEvent e) |
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
void |
rememberUserInput()
Remembers the user input in the preference settings
|
void |
setDefaultChangesetTags(java.util.Map<java.lang.String,java.lang.String> tags) |
void |
setSelectedChangesetForNextUpload(Changeset cs) |
void |
setUploadedPrimitives(APIDataSet toUpload)
Sets the collection of primitives to upload
|
void |
setVisible(boolean visible) |
void |
startUserInput()
Initializes the panel for user input
|
isCanceled, setCanceled
addImpl, 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, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
addPropertyChangeListener, addPropertyChangeListener, 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, toFront
add, 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, validateTree
action, 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, 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, transferFocusUpCycle
private static UploadDialog uploadDialog
private static final java.util.Collection<java.awt.Component> customComponents
private UploadedObjectsSummaryPanel pnlUploadedObjects
private ChangesetManagementPanel pnlChangesetManagement
private BasicUploadSettingsPanel pnlBasicUploadSettings
private UploadStrategySelectionPanel pnlUploadStrategySelectionPanel
private TagSettingsPanel pnlTagSettings
private javax.swing.JTabbedPane tpConfigPanels
private javax.swing.JButton btnUpload
private final transient ChangesetCommentModel changesetCommentModel
private final transient ChangesetCommentModel changesetSourceModel
public UploadDialog()
public static UploadDialog getUploadDialog()
protected javax.swing.JPanel buildContentPanel()
protected javax.swing.JPanel buildActionPanel()
protected void build()
public void setUploadedPrimitives(APIDataSet toUpload)
toUpload
- the dataset with the objects to upload. If null, assumes the empty
set of objects to uploadpublic void rememberUserInput()
AbstractUploadDialog
rememberUserInput
in class AbstractUploadDialog
public void startUserInput()
public Changeset getChangeset()
public void setSelectedChangesetForNextUpload(Changeset cs)
public java.util.Map<java.lang.String,java.lang.String> getDefaultChangesetTags()
public void setDefaultChangesetTags(java.util.Map<java.lang.String,java.lang.String> tags)
public UploadStrategySpecification getUploadStrategySpecification()
UploadStrategySpecification
the user entered in the dialog.UploadStrategySpecification
the user entered in the dialog.protected java.lang.String getUploadComment()
protected java.lang.String getUploadSource()
public void setVisible(boolean visible)
setVisible
in class java.awt.Dialog
public static boolean addCustomComponent(java.awt.Component c)
c
- The custom component to add. If null
, this method does nothing.true
if the collection of custom components changed as a result of the callpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public void preferenceChanged(Preferences.PreferenceChangeEvent e)
preferenceChanged
in interface Preferences.PreferenceChangedListener
private static java.lang.String getLastChangesetTagFromHistory(java.lang.String historyKey, java.util.List<java.lang.String> def)
public java.lang.String getLastChangesetCommentFromHistory()
public java.lang.String getLastChangesetSourceFromHistory()