public class PGPKeyPanel
extends javax.swing.JPanel
implements javax.swing.event.ListSelectionListener, java.awt.event.ActionListener, javax.swing.event.PopupMenuListener, com.lf.commons.model.ConfigurableUnit
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JButton |
buttonAdd_I18N |
protected javax.swing.JButton |
buttonExport_I18N |
protected javax.swing.JButton |
buttonImport_I18N |
protected javax.swing.JButton |
buttonManage_I18N |
protected java.util.Hashtable<java.lang.String,com.didisoft.pgp.KeyPairInformation> |
cacheKeys
The keys (key is hex key identifier).
|
protected java.util.Hashtable<java.lang.String,java.lang.String> |
cacheURLs
The key download URLs (key is hex key identifier).
|
static java.net.URL |
ICON_URL
Represents a download URL.
|
protected javax.swing.JPopupMenu |
popupMenu
Context menu for the sources table.
|
protected javax.swing.JTable |
table |
protected java.lang.Class[] |
tableClasses
Column names of the sources list used by the model.
|
protected java.lang.String[] |
tableColumns
Column names of the sources list used by the model.
|
protected java.lang.Object[][] |
tableData
List of sources currently displayed by the list.
|
protected javax.swing.JToggleButton |
toggleButtonAdjust_I18N |
protected javax.swing.JToolBar |
toolBar |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
PGPKeyPanel()
Constructor method for i18n purposes and the GUI editing only.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Called whenever the one of the components was activated.
|
void |
configureUnit(java.lang.String id,
com.lf.commons.config.Configuration config)
Restores values from persistent data stores.
|
protected void |
finalize()
Clean-up method to help the gc.
|
javax.swing.JToggleButton |
getButtonAutoAdjust()
Provides the
JToggleButton adjusting the column widths. |
static java.lang.String[] |
getKeysFromTemplate(java.lang.String id,
com.lf.commons.config.Configuration config,
java.util.Hashtable<java.lang.String,java.lang.String> urls)
Extracts the signer keys and associated URLs from the template.
|
java.lang.String[] |
getSelectedKeyIDs()
Provides the key identifiers currently selected by this panel.
|
com.didisoft.pgp.KeyPairInformation[] |
getSelectedKeys()
Provides the entries currently selected by this panel.
|
javax.swing.JTable |
getTable()
Provides the
JTable showing the entries. |
java.util.Hashtable<java.lang.String,java.lang.String> |
getURLCache()
Provides the cache holding the network addresses to download the public keys.
|
protected javax.swing.JPanel |
getURLPanel()
Provides the panel to enter URLs.
|
void |
loadFromTemplate(java.lang.String id,
com.lf.commons.config.Configuration config)
Sets the selected keys and the URLs from the template.
|
void |
popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
Popup menu was cancelled.
|
void |
popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
Popup menu will become invisible.
|
void |
popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
Popup menu will become visible.
|
void |
setKeys(com.didisoft.pgp.KeyPairInformation[] keyinfo)
Sets the keys to be managed by this panel.
|
void |
setSelectedKeyIDs(java.lang.String[] keyids)
Sets the entries currently selected by this panel.
|
void |
storeToTemplate(java.lang.String id,
com.lf.commons.config.Configuration config)
Remembers the selected keys and the URLs in the template.
|
protected void |
storeToTemplate(java.lang.String id,
com.lf.commons.config.Configuration config,
com.didisoft.pgp.KeyPairInformation[] keyinfo)
Remembers the given keys and the URLs in the template.
|
void |
storeUnit(java.lang.String id,
com.lf.commons.config.Configuration config)
Stores the current configuration values persistently.
|
void |
unitRegistered(com.lf.commons.model.ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was registered with a model.
|
void |
unitUnregistered(com.lf.commons.model.ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was unregistered with a model.
|
void |
updateButtons()
Updates the table buttons (enabled/disabled).
|
void |
valueChanged(javax.swing.event.ListSelectionEvent event)
Reacts on table selection changes.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, isPaintingOrigin, 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
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
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
public static final java.net.URL ICON_URL
protected java.lang.String[] tableColumns
protected java.lang.Class[] tableClasses
protected java.lang.Object[][] tableData
protected javax.swing.JPopupMenu popupMenu
protected java.util.Hashtable<java.lang.String,com.didisoft.pgp.KeyPairInformation> cacheKeys
protected java.util.Hashtable<java.lang.String,java.lang.String> cacheURLs
protected javax.swing.JToolBar toolBar
protected javax.swing.JButton buttonAdd_I18N
protected javax.swing.JButton buttonImport_I18N
protected javax.swing.JButton buttonExport_I18N
protected javax.swing.JButton buttonManage_I18N
protected javax.swing.JToggleButton toggleButtonAdjust_I18N
protected javax.swing.JTable table
public PGPKeyPanel()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void setKeys(com.didisoft.pgp.KeyPairInformation[] keyinfo)
keyinfo
- The keys to showjava.lang.NullPointerException
- If a parameter is null
public com.didisoft.pgp.KeyPairInformation[] getSelectedKeys()
public java.lang.String[] getSelectedKeyIDs()
public void setSelectedKeyIDs(java.lang.String[] keyids)
keyids
- The selectionpublic java.util.Hashtable<java.lang.String,java.lang.String> getURLCache()
public void updateButtons()
public void configureUnit(java.lang.String id, com.lf.commons.config.Configuration config)
configureUnit
in interface com.lf.commons.model.ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic void storeUnit(java.lang.String id, com.lf.commons.config.Configuration config)
storeUnit
in interface com.lf.commons.model.ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic void unitRegistered(com.lf.commons.model.ApplicationModel model, java.lang.String id)
unitRegistered
in interface com.lf.commons.model.ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic void unitUnregistered(com.lf.commons.model.ApplicationModel model, java.lang.String id)
unitUnregistered
in interface com.lf.commons.model.ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic javax.swing.JTable getTable()
JTable
showing the entries.
public void loadFromTemplate(java.lang.String id, com.lf.commons.config.Configuration config)
id
- The variables prefixconfig
- The template datapublic static java.lang.String[] getKeysFromTemplate(java.lang.String id, com.lf.commons.config.Configuration config, java.util.Hashtable<java.lang.String,java.lang.String> urls)
id
- The variables prefixconfig
- The template dataurls
- The key URLs (optional)public void storeToTemplate(java.lang.String id, com.lf.commons.config.Configuration config)
id
- The variables prefixconfig
- The template dataprotected void storeToTemplate(java.lang.String id, com.lf.commons.config.Configuration config, com.didisoft.pgp.KeyPairInformation[] keyinfo)
id
- The variables prefixconfig
- The template datakeyinfo
- The keys to store insteadprotected javax.swing.JPanel getURLPanel()
public javax.swing.JToggleButton getButtonAutoAdjust()
JToggleButton
adjusting the column widths.
public void valueChanged(javax.swing.event.ListSelectionEvent event)
valueChanged
in interface javax.swing.event.ListSelectionListener
event
- The eventpublic void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- The event objectpublic void popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
popupMenuCanceled
in interface javax.swing.event.PopupMenuListener
e
- Event to be processedpublic void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
popupMenuWillBecomeInvisible
in interface javax.swing.event.PopupMenuListener
e
- Event to be processedpublic void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
popupMenuWillBecomeVisible
in interface javax.swing.event.PopupMenuListener
e
- Event to be processedCopyright © 2005-2015 Leisenfels UG. All rights reserved.