com.sshtools.common.keygen
Class KeygenPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.sshtools.common.keygen.KeygenPanel
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.DocumentListener

public class KeygenPanel
extends javax.swing.JPanel
implements javax.swing.event.DocumentListener, java.awt.event.ActionListener

Version:
$Revision: 1.1 $
Author:
$author$
See Also:
Serialized Form

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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JComboBox action
           
private  NumericTextField bits
           
private  javax.swing.JLabel bitsLabel
           
private  javax.swing.JButton browseInput
           
private  javax.swing.JButton browseOutput
           
static int CHANGE_PASSPHRASE
           
static int CONVERT_IETF_SECSH_TO_OPENSSH
           
static int CONVERT_OPENSSH_TO_IETF_SECSH
           
static int GENERATE_KEY_PAIR
           
private  XTextField inputFile
           
private  javax.swing.JLabel inputFileLabel
           
private  javax.swing.JPasswordField newPassphrase
           
private  javax.swing.JLabel newPassphraseLabel
           
private  javax.swing.JPasswordField oldPassphrase
           
private  javax.swing.JLabel oldPassphraseLabel
           
private  XTextField outputFile
           
private  javax.swing.JLabel outputFileLabel
           
private  javax.swing.JProgressBar strength
           
private  javax.swing.JComboBox type
           
private  javax.swing.JLabel typeLabel
           
 
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
KeygenPanel()
          Creates a new KeygenPanel object.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
private  void calculateStrength()
           
 void changedUpdate(javax.swing.event.DocumentEvent e)
           
 int getAction()
           
 int getBits()
           
 java.lang.String getInputFilename()
           
 char[] getNewPassphrase()
           
 char[] getOldPassphrase()
           
 java.lang.String getOutputFilename()
           
 java.lang.String getType()
           
 void insertUpdate(javax.swing.event.DocumentEvent e)
           
 void removeUpdate(javax.swing.event.DocumentEvent e)
           
private  void setAvailableActions()
           
 
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, 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, 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, transferFocusBackward, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GENERATE_KEY_PAIR

public static final int GENERATE_KEY_PAIR
See Also:
Constant Field Values

CONVERT_IETF_SECSH_TO_OPENSSH

public static final int CONVERT_IETF_SECSH_TO_OPENSSH
See Also:
Constant Field Values

CONVERT_OPENSSH_TO_IETF_SECSH

public static final int CONVERT_OPENSSH_TO_IETF_SECSH
See Also:
Constant Field Values

CHANGE_PASSPHRASE

public static final int CHANGE_PASSPHRASE
See Also:
Constant Field Values

browseInput

private javax.swing.JButton browseInput

browseOutput

private javax.swing.JButton browseOutput

action

private javax.swing.JComboBox action

type

private javax.swing.JComboBox type

bitsLabel

private javax.swing.JLabel bitsLabel

inputFileLabel

private javax.swing.JLabel inputFileLabel

newPassphraseLabel

private javax.swing.JLabel newPassphraseLabel

oldPassphraseLabel

private javax.swing.JLabel oldPassphraseLabel

outputFileLabel

private javax.swing.JLabel outputFileLabel

typeLabel

private javax.swing.JLabel typeLabel

newPassphrase

private javax.swing.JPasswordField newPassphrase

oldPassphrase

private javax.swing.JPasswordField oldPassphrase

strength

private javax.swing.JProgressBar strength

inputFile

private XTextField inputFile

outputFile

private XTextField outputFile

bits

private NumericTextField bits
Constructor Detail

KeygenPanel

public KeygenPanel()
Creates a new KeygenPanel object.

Method Detail

getAction

public int getAction()
Returns:

getBits

public int getBits()
Returns:

getInputFilename

public java.lang.String getInputFilename()
Returns:

getNewPassphrase

public char[] getNewPassphrase()
Returns:

getOldPassphrase

public char[] getOldPassphrase()
Returns:

getOutputFilename

public java.lang.String getOutputFilename()
Returns:

getType

public java.lang.String getType()
Returns:

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt -

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent e)
Specified by:
changedUpdate in interface javax.swing.event.DocumentListener
Parameters:
e -

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent e)
Specified by:
insertUpdate in interface javax.swing.event.DocumentListener
Parameters:
e -

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent e)
Specified by:
removeUpdate in interface javax.swing.event.DocumentListener
Parameters:
e -

setAvailableActions

private void setAvailableActions()

calculateStrength

private void calculateStrength()