public class UploadDialog extends AbstractUploadDialog implements 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.
|
JDialog.AccessibleJDialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private JButton |
btnUpload
the upload button
|
private ChangesetCommentModel |
changesetCommentModel
the changeset comment model keeping the state of the changeset comment
|
private ChangesetCommentModel |
changesetSourceModel |
private static Collection<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 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
DEFAULT_MODALITY_TYPE
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
UploadDialog()
constructor
|
Modifier and Type | Method and Description |
---|---|
static boolean |
addCustomComponent(Component c)
Adds a custom component to this dialog.
|
protected void |
build()
builds the gui
|
protected JPanel |
buildActionPanel()
builds the panel with the OK and CANCEL buttons
|
protected JPanel |
buildContentPanel()
builds the content panel for the upload dialog
|
Changeset |
getChangeset()
Replies the current changeset
|
Map<String,String> |
getDefaultChangesetTags() |
String |
getLastChangesetCommentFromHistory() |
String |
getLastChangesetSourceFromHistory() |
private String |
getLastChangesetTagFromHistory(String historyKey) |
protected String |
getUploadComment()
Returns the current value for the upload comment
|
static UploadDialog |
getUploadDialog()
Replies the unique instance of the upload dialog
|
protected 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(PropertyChangeEvent evt) |
void |
rememberUserInput()
Remembers the user input in the preference settings
|
void |
setDefaultChangesetTags(Map<String,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 Collection<Component> customComponents
private UploadedObjectsSummaryPanel pnlUploadedObjects
private ChangesetManagementPanel pnlChangesetManagement
private BasicUploadSettingsPanel pnlBasicUploadSettings
private UploadStrategySelectionPanel pnlUploadStrategySelectionPanel
private TagSettingsPanel pnlTagSettings
private JTabbedPane tpConfigPanels
private final ChangesetCommentModel changesetCommentModel
private final ChangesetCommentModel changesetSourceModel
public UploadDialog()
public static UploadDialog getUploadDialog()
protected JPanel buildContentPanel()
protected 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 Map<String,String> getDefaultChangesetTags()
public void setDefaultChangesetTags(Map<String,String> tags)
public UploadStrategySpecification getUploadStrategySpecification()
UploadStrategySpecification
the user entered in the dialog.UploadStrategySpecification
the user entered in the dialog.protected String getUploadComment()
protected String getUploadSource()
public void setVisible(boolean visible)
setVisible
in class Dialog
public static boolean addCustomComponent(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(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public void preferenceChanged(Preferences.PreferenceChangeEvent e)
preferenceChanged
in interface Preferences.PreferenceChangedListener
private String getLastChangesetTagFromHistory(String historyKey)
public String getLastChangesetCommentFromHistory()
public String getLastChangesetSourceFromHistory()