public class DownloadDialog extends TextDialog
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 |
---|---|
protected URL |
browseUrl
Input parameter by the caller: where to read the documentation online.
|
protected @Opt byte[] |
curDigest
Local value: last checksum of DEnS during this dialog.
|
protected @Opt File |
curPosition
Local value: last successful storage of DEnS during this dialog.
|
static String |
defaultLang
Current language, if none is given to the constructor call.
|
protected String |
DEnS_dir_name
Input parameter by the caller: name of the DEnS directory, fixed per application.
|
protected String |
docu_start_filename
Input parameter by the caller: relative start for HTML-browing relative to
DEnS_dir_name . |
protected URL |
downloadUrl
Input parameter by the caller: where to download the ZIP file.
|
protected CatalogByString |
mulicat
Dictionary of all translations.
|
protected @Opt byte[] |
newDigest
Output value: last checksum of DEnS during this dialog.
|
protected @Opt File |
newPosition
Output value: last successful storage of DEnS during this dialog.
|
protected @Opt byte[] |
oldDigest
Input parameter by the caller: last checksum d of DEnS, if any.
|
protected @Opt File |
oldPosition
Input parameter by the caller: last local store positon of DEnS, if any.
|
protected File |
selected_DEnS_Path
Temporary storage during dialog, between choosing and confirmation.
|
protected boolean |
tampered
Output value: whether the current/new downloaded data has been locally altered.
|
answer, defaultSize, DIGITS, epane, firstPara, hasShortcuts, icon, keylistener, lf, linklistener, nonSelectedLink, shortcutlist, stepNum
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 |
---|
DownloadDialog(@Opt JFrame frame,
@Opt String title,
String DEnS_dir_name,
URL downloadUrl,
URL browseUrl,
String docu_start_filename,
boolean modal,
@Opt String lang,
@Opt File oldPosition,
@Opt byte[] oldDigest,
@Opt String serviceEmail,
@Opt Dimension windowsize)
After creation the (inherited) message runDialog() must be called.
|
Modifier and Type | Method and Description |
---|---|
protected void |
appendAlternatives()
Create text which describes the possible alternatives
download/download anew browse online browse local IFF local loaded |
protected void |
appendStatusText()
Create text which describes the current information status, and which
will appear as first.
|
protected String |
closeDialogLink()
Text building block.
|
@Opt byte[] |
get_newDigest()
Output parameter: Is != null iff
get_newPosition() != null. |
@Opt File |
get_newPosition()
Output parameter: Only set != null when a new position has been entered by the user and
the download succeeded.
|
boolean |
get_tampered()
Output parameter: whether the current/new downloaded data has been locally altered.
|
protected String |
muli(String key,
List<String> translations)
Definition of a new translation at the place of its application.
|
protected String |
muli(String key,
List<String> translations,
Object... args)
Definition of a new translation at the place of its application.
|
protected String |
muli(String key,
String... pairs)
Definition of a new translation at the place of its application.
|
protected void |
react()
Reactions on situation/alternative texts:
answer = "download" ===> file chooser =======> result = abort ====> restart loop =======> result = selected ====> safety question =======> answer = cancel ====> restart loop =======> answer = okay ====> start download, iff okay, calculate new checksum, set values of curPosition , curDigest and tampered . |
appendText, appendTextLine, finished, runDialog, transformLinks, wrapError, wrapTT
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, setVisible, 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
public static final String defaultLang
protected final String DEnS_dir_name
protected final URL downloadUrl
protected final URL browseUrl
protected final String docu_start_filename
DEnS_dir_name
.@Opt protected final @Opt File oldPosition
@Opt protected @Opt File curPosition
@Opt protected @Opt File newPosition
@Opt protected final @Opt byte[] oldDigest
@Opt protected @Opt byte[] curDigest
@Opt protected @Opt byte[] newDigest
protected boolean tampered
protected CatalogByString mulicat
protected File selected_DEnS_Path
public DownloadDialog(@Opt @Opt JFrame frame, @Opt @Opt String title, String DEnS_dir_name, URL downloadUrl, URL browseUrl, String docu_start_filename, boolean modal, @Opt @Opt String lang, @Opt @Opt File oldPosition, @Opt @Opt byte[] oldDigest, @Opt @Opt String serviceEmail, @Opt @Opt Dimension windowsize)
frame
- OPT, window of application, MAY be used by Swing
for positioning, etc.title
- OPT, window title for dialog pop-up windowmulicat
- Translation object into which the in situ translations wil be
stored and in which further languages can be prepared.DEnS_dir_name
- file name of the one(1) directory which will
be created on the local machine for storing all Do+X+S-files
This must be also the only(1) top-level dir in the installed zipfile.
When for the position of download is asked, and a directory with this name
is selected, than the effect is the same as if its parent were selected.browseUrl
- the url where the net browsing will startdocu_start_filename
- file name of the entry point for local browsing,
relative to the download position (something like "doc/user/index.html")modal
- whether the dialog is a modal onelang
- OPT preferred language, defaults to defaultLang
.oldPosition
- OPT file position of previous, memorized download of
DEnS-filesoldDigest
- OPT checksum for oldPosition. Both must be null, or not-null.windowsize
- OPT for the dialog window@Opt public @Opt File get_newPosition()
@Opt public @Opt byte[] get_newDigest()
get_newPosition()
!= null.public boolean get_tampered()
protected String muli(String key, List<String> translations, Object... args)
protected String muli(String key, List<String> translations)
protected String muli(String key, String... pairs)
protected void appendStatusText()
protected void appendAlternatives()
protected String closeDialogLink()
protected void react()
curPosition
, curDigest
and tampered
.
react
in class TextDialog
see also the complete user documentation .