Package com.lf.digester.wizard.sync
Class SyncWizard
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.lf.commons.wizard.WizardDialog
com.lf.digester.wizard.sync.SyncWizard
- All Implemented Interfaces:
com.lf.commons.model.ConfigurableUnit
,ActionListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,RootPaneContainer
,WindowConstants
public class SyncWizard
extends com.lf.commons.wizard.WizardDialog
Wizard dialog to specify a source/target mapping to synchronize files/directories.
The wizard is a simple user interface with few pages to setup a standard sync process
with a few steps. With the first pages the user specifies the source and target files
and/or directories to be synchronized (data flow). On the next page the generate template
may be chosen, the few options are extracted from the template. Some required options
are presented here as well (e.g. if sub-directories should be processed). On the final
page, the user specified the digest algorithms and/or the PGP signature keys to use.
Remember, that signatures are compared byte for byte which could be problematic,
since signatures are never created identically even for the same PGP key! Message
digests are the best mechanism to synchronize files/folders. The Digester XML format
should be preferred to benefit from the available extra data portions included here
like the file size, timestamp etc.
- Since:
- 1.6
- Author:
- Axel Schwolow
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.ModalExclusionType, Dialog.ModalityType
Nested classes/interfaces inherited from class java.awt.Window
Window.Type
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
-
Field Summary
Fields inherited from class com.lf.commons.wizard.WizardDialog
BUTTON_BACK, BUTTON_CANCEL, BUTTON_FINISH, BUTTON_NEXT, MODE_DYNAMIC, MODE_STATIC
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
ConstructorDescriptionConstructor method for i18n purposes only.SyncWizard
(Frame owner) Constructor for the GUI component. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureUnit
(String id, com.lf.commons.config.Configuration config) Restores values from persistent data stores.com.lf.commons.config.Configuration
Assembles the page configurations so that the generation can be started based on settings.void
reset()
Resets the wizard pages for the next time this dialog is used.void
Stores the current configuration values persistently.void
unitRegistered
(com.lf.commons.model.ApplicationModel model, String id) Informs the configurable unit that it was registered with a model.void
unitUnregistered
(com.lf.commons.model.ApplicationModel model, String id) Informs the configurable unit that it was unregistered with a model.Methods inherited from class com.lf.commons.wizard.WizardDialog
actionPerformed, addWizardPageListener, allowConfirmOnKeyStroke, allowEscapeOnKeyStroke, clickButton, execute, getButtonBack, getButtonCancel, getButtonFinish, getButtonNext, getClickedButton, getCurrentPage, getExitButton, getPreviousPage, getPreviousPages, getStatusBar, isButtonEnabled, removeWizardPageListener, setButtonEnabled, setDividerLocation, setEnabledBack, setEnabledCancel, setEnabledFinish, setEnabledNext, setHelpID, setOverviewText, setStartingPage, setVisible, updatePageIcon
Methods inherited from class javax.swing.JDialog
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
Methods inherited from class java.awt.Window
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, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
Methods inherited from class java.awt.Container
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, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, 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, 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, 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, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
SyncWizard
Constructor method for i18n purposes only. Can only be used if beans design time is set (e.g. by external tools like theI18NExtractor
).- Throws:
InstantiationException
- Error indication- Since:
- 1.6
-
SyncWizard
Constructor for the GUI component.- Parameters:
owner
- The owner frame- Throws:
IllegalArgumentException
- If a parameter is missing- Since:
- 1.6
-
-
Method Details
-
getConfiguration
public com.lf.commons.config.Configuration getConfiguration()Assembles the page configurations so that the generation can be started based on settings.- Returns:
- The configuration,
null
if wizard has not been finished or error case - Since:
- 1.6
-
configureUnit
Restores values from persistent data stores.- Specified by:
configureUnit
in interfacecom.lf.commons.model.ConfigurableUnit
- Overrides:
configureUnit
in classcom.lf.commons.wizard.WizardDialog
- Parameters:
id
- The unique identifier for the instanceconfig
- The configuration- Since:
- 1.6
-
storeUnit
Stores the current configuration values persistently.- Specified by:
storeUnit
in interfacecom.lf.commons.model.ConfigurableUnit
- Overrides:
storeUnit
in classcom.lf.commons.wizard.WizardDialog
- Parameters:
id
- The unique identifier for the instanceconfig
- The configuration- Since:
- 1.6
-
unitRegistered
Informs the configurable unit that it was registered with a model.- Specified by:
unitRegistered
in interfacecom.lf.commons.model.ConfigurableUnit
- Overrides:
unitRegistered
in classcom.lf.commons.wizard.WizardDialog
- Parameters:
model
- The application modelid
- The unique identifier for the instance- Since:
- 1.6
-
unitUnregistered
Informs the configurable unit that it was unregistered with a model.- Specified by:
unitUnregistered
in interfacecom.lf.commons.model.ConfigurableUnit
- Overrides:
unitUnregistered
in classcom.lf.commons.wizard.WizardDialog
- Parameters:
model
- The application modelid
- The unique identifier for the instance- Since:
- 1.6
-
reset
public void reset()Resets the wizard pages for the next time this dialog is used.- Since:
- 1.6
-