public class SaveLayersDialog extends javax.swing.JDialog implements javax.swing.event.TableModelListener
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
SaveLayersDialog.CancelAction |
(package private) class |
SaveLayersDialog.DiscardAndProceedAction |
private static class |
SaveLayersDialog.LayerListWarningMessagePanel |
static class |
SaveLayersDialog.Reason
The cause for requesting an action on unsaved modifications
|
(package private) class |
SaveLayersDialog.SaveAndProceedAction |
protected class |
SaveLayersDialog.SaveAndUploadTask
This is the asynchronous task which uploads modified layers to the server and
saves them to files, if requested by the user.
|
(package private) class |
SaveLayersDialog.SaveSessionAction |
private static class |
SaveLayersDialog.UserAction |
(package private) class |
SaveLayersDialog.WindowClosingAdapter |
javax.swing.JDialog.AccessibleJDialogjava.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityTypejava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type| Modifier and Type | Field and Description |
|---|---|
private SaveLayersDialog.UserAction |
action |
private SaveLayersDialog.CancelAction |
cancelAction |
private SaveLayersDialog.DiscardAndProceedAction |
discardAndProceedAction |
private SaveLayersModel |
model |
private UploadAndSaveProgressRenderer |
pnlUploadLayers |
private SaveLayersDialog.SaveAndProceedAction |
saveAndProceedAction |
private javax.swing.JButton |
saveAndProceedActionButton |
private SaveLayersDialog.SaveAndUploadTask |
saveAndUploadTask |
private SaveLayersDialog.SaveSessionAction |
saveSessionAction |
accessibleContext, rootPane, rootPaneCheckingEnabledBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
SaveLayersDialog(java.awt.Component parent)
Constructs a new
SaveLayersDialog. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
build()
builds the GUI
|
protected javax.swing.JPanel |
buildButtonRow()
builds the button row
|
protected void |
cancelSafeAndUploadTask() |
void |
closeDialog()
Closes this dialog and frees all native screen resources.
|
(package private) static boolean |
confirmSaveLayerInfosOK(SaveLayersModel model) |
SaveLayersModel |
getModel() |
SaveLayersDialog.UserAction |
getUserAction() |
protected void |
launchSafeAndUploadTask() |
void |
prepareForSavingAndUpdatingLayers(SaveLayersDialog.Reason reason) |
static boolean |
saveUnsavedModifications(java.lang.Iterable<? extends Layer> selectedLayers,
SaveLayersDialog.Reason reason)
Asks user to perform "save layer" operations (save on disk and/or upload data to server) before data layers deletion.
|
protected void |
setUserAction(SaveLayersDialog.UserAction action) |
void |
tableChanged(javax.swing.event.TableModelEvent e) |
private static void |
warn(java.lang.String msg,
java.util.List<SaveLayerInfo> infos,
java.lang.String title) |
protected static void |
warnLayersWithConflictsAndUploadRequest(java.util.List<SaveLayerInfo> infos) |
protected static void |
warnLayersWithIllegalFilesAndSaveRequest(java.util.List<SaveLayerInfo> infos) |
protected static void |
warnLayersWithoutFilesAndSaveRequest(java.util.List<SaveLayerInfo> infos) |
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, updateaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackaddPropertyChangeListener, 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, 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, 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 SaveLayersModel model
private SaveLayersDialog.UserAction action
private final UploadAndSaveProgressRenderer pnlUploadLayers
private final SaveLayersDialog.SaveAndProceedAction saveAndProceedAction
private final SaveLayersDialog.SaveSessionAction saveSessionAction
private final SaveLayersDialog.DiscardAndProceedAction discardAndProceedAction
private final SaveLayersDialog.CancelAction cancelAction
private transient SaveLayersDialog.SaveAndUploadTask saveAndUploadTask
private final javax.swing.JButton saveAndProceedActionButton
public SaveLayersDialog(java.awt.Component parent)
SaveLayersDialog.parent - parent componentpublic static boolean saveUnsavedModifications(java.lang.Iterable<? extends Layer> selectedLayers, SaveLayersDialog.Reason reason)
selectedLayers - The layers to check. Only instances of AbstractModifiableLayer are considered.reason - the cause for requesting an action on unsaved modificationstrue if there was nothing to save, or if the user wants to proceed to save operations.
false if the user cancels.protected void build()
protected javax.swing.JPanel buildButtonRow()
public void prepareForSavingAndUpdatingLayers(SaveLayersDialog.Reason reason)
public SaveLayersDialog.UserAction getUserAction()
public SaveLayersModel getModel()
protected void launchSafeAndUploadTask()
protected void cancelSafeAndUploadTask()
private static void warn(java.lang.String msg, java.util.List<SaveLayerInfo> infos, java.lang.String title)
protected static void warnLayersWithConflictsAndUploadRequest(java.util.List<SaveLayerInfo> infos)
protected static void warnLayersWithoutFilesAndSaveRequest(java.util.List<SaveLayerInfo> infos)
protected static void warnLayersWithIllegalFilesAndSaveRequest(java.util.List<SaveLayerInfo> infos)
static boolean confirmSaveLayerInfosOK(SaveLayersModel model)
protected void setUserAction(SaveLayersDialog.UserAction action)
public void closeDialog()
public void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged in interface javax.swing.event.TableModelListener