|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.peace_tools.generic.GenericWizardPage
org.peace_tools.core.server.ServerInfoWizardPage
public class ServerInfoWizardPage
This class serves as the second interactive page in a ServerWizard. This page permits the user to enter additional information about the server on which PEACE is to be configured and installed. When the "Next >" button is clicked this wizard verifies that the directory for installing PEACE does not exist on the remote machine.
Note: This page does the same operation for both local and remote servers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private javax.swing.JButton |
browse
The browse button to be enabled only for local installs. |
private javax.swing.JTextArea |
description
Field to read and edit a brief description about the server. |
private static java.lang.String |
ErrorMsg
Just a simple error message that is displayed when install on a server/remote host could not be successfully verified. |
private javax.swing.JComponent[] |
fixedMsgs
These labels are created in the constructor but one of them remains hidden. |
private javax.swing.JTextField |
installPath
Field to read/display the install path where PEACE is (or has been) installed on the given server. |
private boolean |
lockPath
If this flag is set to true, then this wizard permits the user only to change the install path on the server. |
private static java.lang.String |
NO_MPI_MSG
A warning message that is displayed when mpicc is unavailable on the remote machine on which PEACE is being installed. |
private static java.lang.String |
NO_SPACE_MSG
A simple message that is displayed to the user to indicate we don't accept spaces in installation path. |
private javax.swing.JSpinner |
pollTime
Field to read/display the polling time. |
(package private) javax.swing.JProgressBar |
progressBar
A roving progress bar to show the user we are doing some work. |
private static long |
serialVersionUID
A serialization UID to keep the compiler happy. |
private Server |
server
Information about the actual server entry being edited. |
private ServerSession |
serverSession
This instance variable is used to manage the connection to the server just for testing purposes. |
private WizardDialog |
wizard
A reference to the wizard dialog that logically owns this page. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 |
Constructor Summary | |
---|---|
ServerInfoWizardPage(WizardDialog wizard,
Server server,
boolean lockPath)
The constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent arg0)
This method handles the tasks performed when the "Browse" button is clicked. |
private javax.swing.JPanel |
createInfoPanel()
This is a refactored utility method to create informational labels. |
void |
pageChanged(WizardDialog dialog,
int currPage,
int prevPage)
This method is called just before this page is to be displayed. |
boolean |
pageChanging(WizardDialog dialog,
int currPage,
int nextPage)
Method to veto a page change (if needed). |
void |
run()
This method is invoked from a separate thread from the pageChanging() method. |
Methods inherited from class org.peace_tools.generic.GenericWizardPage |
---|
getPage, getSubTitle, getTitle, setTitle |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final WizardDialog wizard
private final Server server
private javax.swing.JTextField installPath
private javax.swing.JTextArea description
private javax.swing.JSpinner pollTime
private javax.swing.JComponent[] fixedMsgs
javax.swing.JProgressBar progressBar
private boolean lockPath
private ServerSession serverSession
private javax.swing.JButton browse
private static final java.lang.String ErrorMsg
private static final java.lang.String NO_MPI_MSG
private static final java.lang.String NO_SPACE_MSG
private static final long serialVersionUID
Constructor Detail |
---|
public ServerInfoWizardPage(WizardDialog wizard, Server server, boolean lockPath)
wizard
- The wizard that logically owns this page.server
- The in-memory server object that contains the
core information about the server.lockPath
- Flag to indicate if this page must permit the
user to edit the install path.Method Detail |
---|
private javax.swing.JPanel createInfoPanel()
public void pageChanged(WizardDialog dialog, int currPage, int prevPage)
pageChanged
in interface WizardPage
pageChanged
in class GenericWizardPage
dialog
- The wizard dialog that is invoking this method.currPage
- The logical (zero-based) index of the current
page in the sequence of pages in the wizard that is going to
be displayed.prevPage
- The logical (zero-based) index of the previous
page that was displayed. For the first page this value is
-1.public boolean pageChanging(WizardDialog dialog, int currPage, int nextPage)
GenericWizardPage
pageChanging
in interface WizardPage
pageChanging
in class GenericWizardPage
dialog
- The wizard dialog that is invoking this method.currPage
- The logical (zero-based) index of the current
page in the sequence of pages in the wizard.nextPage
- The logical (zero-based) index of the next
page that is going to be displayed.
public void run()
Note: The process of connecting to the remote machine is performed from a separate thread because of the way Ganymede SSH has been implemented. The call backs provided by Ganymede do not occur on the Swing's EventDispatch thread (but from an generic thread). Consequently, the GUI will be unresponsive (in most cases call backs result in a blank window being displayed and the whole GUI hangs) if the main EventDispatch thread is blocked. Consequently, the connection is performed from a separate thread. When this thread completes, it posts the necessary information back to the main EventDispatch thread for updates.
run
in interface java.lang.Runnable
public void actionPerformed(java.awt.event.ActionEvent arg0)
actionPerformed
in interface java.awt.event.ActionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |