public class VFSConnectionDialog extends javax.swing.JDialog implements java.awt.event.ActionListener, javax.swing.event.DocumentListener, ConfigurableUnit, java.awt.event.ItemListener, javax.swing.event.ListSelectionListener
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 |
---|---|
protected boolean |
autoSelect
Has the connector been selected automatically (not by user interaction)?
|
static int |
BUTTON_CANCEL
The user decided to cancel the dialog, also when escaped.
|
static int |
BUTTON_CONNECT
The user decided to connect to selection and quit.
|
static int |
BUTTON_OK
The user made wants to save the configuration.
|
protected javax.swing.JButton |
buttonAdd_I18N |
protected javax.swing.JButton |
buttonClone_I18N |
protected javax.swing.JButton |
buttonDown_I18N |
protected javax.swing.JButton |
buttonRemove_I18N |
protected javax.swing.JButton |
buttonUp_I18N |
protected java.util.Hashtable<java.lang.String,VFSConnectionPanel> |
cachePanels
The recycled panels showing custom connector settings.
|
protected ComboBoxItem |
comboItemChoose
The first item "Please choose".
|
protected java.util.Vector<VFSConnection> |
connections
The connections currently managed.
|
protected VFSConnection |
currentConnection
The connection currently used.
|
protected VFSConnectionPanel |
currentPanel
The data area component currently displayed.
|
protected DockingManager |
dockingManager
The docking manager for running background tasks (optional).
|
protected int |
exitButton
Remembers the exit button.
|
protected java.lang.String |
helpID
Identifier to call the help system (optional).
|
static java.net.URL |
ICON_CHECK
Icon for check dialog.
|
static java.net.URL |
ICON_VFS
Icon for dialog.
|
protected java.awt.event.HierarchyBoundsListener |
resizeListener
Displays the dimension if resized.
|
protected VFSFileSystemManager |
vfsManager
The local manager for the VFS protocols.
|
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
VFSConnectionDialog()
Constructor method for i18n purposes only.
|
VFSConnectionDialog(java.awt.Dialog owner,
VFSFileSystemManager vfsmanager)
Constructor method for the dialog.
|
VFSConnectionDialog(java.awt.Frame owner,
VFSFileSystemManager vfsmanager)
Constructor method for the dialog.
|
VFSConnectionDialog(VFSFileSystemManager vfsmanager)
Constructor method for the dialog (modeless).
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Reacts on component interaction.
|
protected void |
addConnection()
Creates a fresh new connection for the selection.
|
void |
allowEscapeOnKeyStroke(int strokeval)
Adds a keyboard action to escape (close) the dialog (e.g. on escape).
|
void |
changedUpdate(javax.swing.event.DocumentEvent e)
Gives notification that an attribute or set of attributes changed.
|
static void |
clearPasswords(java.util.Vector<VFSConnection> connections)
Clears the connection data the way that unwanted passwords are removed now.
|
void |
configureUnit(java.lang.String id,
Configuration config)
Restores values from persistent data stores.
|
protected java.util.Hashtable<java.lang.String,java.lang.String> |
convertForCheck()
Extracts the connection names currently managed.
|
protected void |
copyConnection()
Creates a connection clone.
|
protected void |
deleteConnections()
Removes the selected entries from the connection list.
|
protected void |
finalize()
Clean-up method to help the gc.
|
protected VFSConnection |
findConnectionByID(java.lang.String id)
Searches the connection container for a certain connection identifier.
|
protected VFSConnection |
findConnectionByName(java.lang.String name)
Searches the connection container for a certain connection name.
|
javax.swing.JButton |
getButtonOK()
Provides the OK button.
|
protected VFSConnectionPanel |
getConnectionPanel(java.lang.String clazz)
Provides the panel to display the custom settings of a VFS connection.
|
java.util.Vector<VFSConnection> |
getConnections()
Provides the connection data.
|
int |
getExitButton()
Provides the exit button.
|
VFSConnection[] |
getSelectedConnections()
Provides the current selection.
|
java.lang.String |
getSelectedProtocol()
Sets the selection of the protocol combo.
|
javax.swing.JToggleButton |
getToggleButtonSort()
Provides the toggle button to enable/disable sorting.
|
void |
insertUpdate(javax.swing.event.DocumentEvent e)
Gives notification that there was an insert into the document.
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
Called whenever the value of the selection changes.
|
void |
removeUpdate(javax.swing.event.DocumentEvent e)
Gives notification that a portion of the document has been removed.
|
protected void |
saveConfiguration()
Saves the component values to be restored.
|
void |
setConnections(java.util.Vector<VFSConnection> connections)
Sets the connection data.
|
void |
setDockingManager(DockingManager manager)
Sets the docking manager for running background tasks (optional).
|
void |
setHelpID(java.lang.String helpid)
Sets the optional help link to call the help system.
|
void |
setSelectedConnection(java.lang.String id)
Selects one single connection after the connection data has been set.
|
void |
setSelectedProtocol(java.lang.String protocol)
Provides the selection of the protocol combo.
|
void |
setVisible(boolean visible)
Activates or deactivates the dialog.
|
void |
storeUnit(java.lang.String id,
Configuration config)
Stores the current configuration values persistently.
|
void |
unitRegistered(ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was registered with a model.
|
void |
unitUnregistered(ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was unregistered with a model.
|
protected void |
updateButtons()
Updates the dialog button states.
|
protected void |
updateComponents()
Updates the component states (except buttons).
|
protected void |
updateDataArea()
Updates the area showing the connection specific settings.
|
protected void |
updateList()
Updates the connection list items.
|
void |
valueChanged(javax.swing.event.ListSelectionEvent e)
Called whenever the value of the list selection changes.
|
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
public static java.net.URL ICON_VFS
public static java.net.URL ICON_CHECK
public static final int BUTTON_OK
public static final int BUTTON_CONNECT
public static final int BUTTON_CANCEL
protected VFSConnectionPanel currentPanel
protected VFSConnection currentConnection
protected java.util.Hashtable<java.lang.String,VFSConnectionPanel> cachePanels
protected java.util.Vector<VFSConnection> connections
protected java.lang.String helpID
protected int exitButton
protected DockingManager dockingManager
protected boolean autoSelect
protected java.awt.event.HierarchyBoundsListener resizeListener
protected ComboBoxItem comboItemChoose
protected VFSFileSystemManager vfsManager
protected javax.swing.JButton buttonAdd_I18N
protected javax.swing.JButton buttonRemove_I18N
protected javax.swing.JButton buttonClone_I18N
protected javax.swing.JButton buttonUp_I18N
protected javax.swing.JButton buttonDown_I18N
public VFSConnectionDialog() throws java.lang.InstantiationException
I18NExtractor
).
java.lang.InstantiationException
- Error indicationpublic VFSConnectionDialog(VFSFileSystemManager vfsmanager)
vfsmanager
- The file system managerjava.lang.NullPointerException
- If a parameter is null
public VFSConnectionDialog(java.awt.Frame owner, VFSFileSystemManager vfsmanager)
owner
- The owner framevfsmanager
- The file system managerjava.lang.NullPointerException
- If a parameter is null
public VFSConnectionDialog(java.awt.Dialog owner, VFSFileSystemManager vfsmanager)
owner
- The owner dialogvfsmanager
- The file system managerjava.lang.NullPointerException
- If a parameter is null
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- Error indicationpublic void allowEscapeOnKeyStroke(int strokeval)
strokeval
- The desired escape key stroke like KeyEvent.VK_ESCAPE
public void configureUnit(java.lang.String id, Configuration config)
configureUnit
in interface ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic void storeUnit(java.lang.String id, Configuration config)
storeUnit
in interface ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic void unitRegistered(ApplicationModel model, java.lang.String id)
unitRegistered
in interface ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic void unitUnregistered(ApplicationModel model, java.lang.String id)
unitUnregistered
in interface ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic void setHelpID(java.lang.String helpid)
helpid
- The help system linkprotected void updateComponents()
protected void updateButtons()
protected void updateDataArea()
protected VFSConnectionPanel getConnectionPanel(java.lang.String clazz)
clazz
- The connection class in FQNnull
public void setVisible(boolean visible)
setVisible
in class java.awt.Dialog
visible
- The state of the dialogprotected void addConnection()
protected java.util.Hashtable<java.lang.String,java.lang.String> convertForCheck()
protected void updateList()
protected void deleteConnections()
protected void copyConnection()
protected VFSConnection findConnectionByName(java.lang.String name)
name
- The connection namenull
protected VFSConnection findConnectionByID(java.lang.String id)
id
- The connection idnull
protected void saveConfiguration()
public int getExitButton()
public java.util.Vector<VFSConnection> getConnections()
public void setConnections(java.util.Vector<VFSConnection> connections)
connections
- The connectionsjava.lang.NullPointerException
- If parameters are null
public void setSelectedConnection(java.lang.String id)
id
- The connection identifierjava.lang.NullPointerException
- If parameters are null
public VFSConnection[] getSelectedConnections()
public void setDockingManager(DockingManager manager)
manager
- The optional docking managerpublic javax.swing.JToggleButton getToggleButtonSort()
public java.lang.String getSelectedProtocol()
public void setSelectedProtocol(java.lang.String protocol)
protocol
- The protocolpublic static void clearPasswords(java.util.Vector<VFSConnection> connections)
connections
- The connectionsjava.lang.NullPointerException
- If parameters are null
public javax.swing.JButton getButtonOK()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- Event to be processedpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- Event object referencepublic void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate
in interface javax.swing.event.DocumentListener
e
- Event object referencepublic void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate
in interface javax.swing.event.DocumentListener
e
- Event object referencepublic void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate
in interface javax.swing.event.DocumentListener
e
- Event object referencepublic void valueChanged(javax.swing.event.ListSelectionEvent e)
valueChanged
in interface javax.swing.event.ListSelectionListener
e
- Event object referenceCopyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.