Class InputPasswordSmartcardDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
es.gob.jmulticard.ui.passwordcallback.gui.AbstractJAccessibilityCustomDialog
es.gob.jmulticard.ui.passwordcallback.gui.InputPasswordSmartcardDialog
- All Implemented Interfaces:
ActionListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,RootPaneContainer
,WindowConstants
public final class InputPasswordSmartcardDialog
extends AbstractJAccessibilityCustomDialog
implements ActionListener
Componente diálogo que solicita una contraseña al usuario.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class es.gob.jmulticard.ui.passwordcallback.gui.AbstractJAccessibilityCustomDialog
AbstractJAccessibilityCustomDialog.ButtonAbstractAction
Nested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialog
Nested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.Type
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Respuesta al mensajeprivate JPanel
Panel de botones.private static JButton
Botón de cancelar.private static String
Texto para el botónprivate JSecurePasswordLabel
Campo de texto o campo de contraseña.private final IconLabel
Etiqueta que contiene el icono de la alerta.private InfoLabel
Etiqueta con la informaciñn de la alerta.private JPanel
Panel principal.private static JButton
Botón de aceptar.private static final int
private static final int
private static final long
UID.private JCheckBox
Indica si se muestra o no la casilla de "No volver a preguntar" (cacheo del PIN).Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
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
ConstructorsModifierConstructorDescriptionprivate
InputPasswordSmartcardDialog
(Component componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Constructor.private
InputPasswordSmartcardDialog
(JDialog componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Constructor.private
InputPasswordSmartcardDialog
(JFrame componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Acción correspondiente a los botones de las alertas.(package private) void
Panel que contiene los botones principales de las alerta.private int
private JButton
Crea un botón.(package private) static JButton
(package private) JSecurePasswordLabel
(package private) static InputPasswordSmartcardDialog
getInstanceInputPasswordDialog
(Component componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Devuelve una instancia deCustomDialog
.int
Relación mínima que se aplica para la redimensión de los componentes.(package private) static JButton
protected void
initComponents
(String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Inicializa los componentes de la alerta.protected void
setIconLabel
(String iconPath) Asigna el icono a la etiqueta.static PasswordResult
showInputPasswordDialog
(Component componentParent, boolean modal, String message, int mnemonic, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Muestra un diálogo de solicitud de contraseña.Methods inherited from class es.gob.jmulticard.ui.passwordcallback.gui.AbstractJAccessibilityCustomDialog
createAccessibilityButtonsPanel, getActualHeight, getActualPositionX, getActualPositionY, getActualWidth, getInitialHeight, getInitialWidth, getMaxHeight, getMaxWidth, isBigSizeDefault, maximizarActionPerformed, restaurarActionPerformed, setActualHeight, setActualPositionX, setActualPositionY, setActualWidth, setBigSizeDefault
Methods inherited from class javax.swing.JDialog
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
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, 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, 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
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, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUID.- See Also:
-
PIN_MIN_LENGTH
private static final int PIN_MIN_LENGTH- See Also:
-
PIN_MAX_LENGTH
private static final int PIN_MAX_LENGTH- See Also:
-
okButton
Botón de aceptar. -
cancelButton
Botón de cancelar. -
cancellText
Texto para el botón -
infoLabel
Etiqueta con la informaciñn de la alerta. -
buttonsPanel
Panel de botones. -
mainPanel
Panel principal. -
component
Campo de texto o campo de contraseña. -
useCacheCheckBox
Indica si se muestra o no la casilla de "No volver a preguntar" (cacheo del PIN). -
iconLabel
Etiqueta que contiene el icono de la alerta. -
answer
private transient int answerRespuesta al mensaje
-
-
Constructor Details
-
InputPasswordSmartcardDialog
private InputPasswordSmartcardDialog(JDialog componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Constructor.- Parameters:
componentParent
- Componente padre para la modalidad.modal
-true
si el diálogo debe ser modal,false
en caso contrario.message
- Mensaje del diálogo.title
- Título del diálogo.iconPath
- Ruta hacia el recurso de fichero de icono.allowUseCache
- Hace mostrarse la casilla para seleccionar el cacheo del PIN.defaultUseCache
- Valor por defecto de la opción de cacheo de PIN.
-
InputPasswordSmartcardDialog
private InputPasswordSmartcardDialog(Component componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Constructor.- Parameters:
componentParent
- Componente padre para la modalidad.modal
-true
si el diálogo debe ser modal,false
en caso contrario.message
- Mensaje del diálogo.title
- Título del diálogo.iconPath
- Ruta hacia el recurso de fichero de icono.allowUseCache
- Hace mostrarse la casilla para seleccionar el cacheo del PIN.defaultUseCache
- Valor por defecto de la opción de cacheo de PIN.
-
InputPasswordSmartcardDialog
private InputPasswordSmartcardDialog(JFrame componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Constructor.- Parameters:
componentParent
- Componente padre para la modalidad.modal
-true
si el diálogo debe ser modal,false
en caso contrario.message
- Mensaje del diálogo.title
- Título del diálogo.iconPath
- Ruta hacia el recurso de fichero de icono.allowUseCache
- Hace mostrarse la casilla para seleccionar el cacheo del PIN.defaultUseCache
- Valor por defecto de la opción de cacheo de PIN.
-
-
Method Details
-
getOkButton
-
getCancelButton
-
initComponents
protected void initComponents(String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Inicializa los componentes de la alerta.- Parameters:
message
- Mensaje del diálogo.title
- Título del diálogo.iconPath
- Ruta hacia el recurso de fichero de icono.allowUseCache
- Hace mostrarse la casilla para seleccionar el cacheo del PIN.defaultUseCache
- Valor por defecto de la opción de cacheo de PIN.
-
setIconLabel
Asigna el icono a la etiqueta.- Parameters:
iconPath
- Ruta hacia el recurso de fichero de icono.
-
createMainButtonsPanel
void createMainButtonsPanel()Panel que contiene los botones principales de las alerta. -
showInputPasswordDialog
public static PasswordResult showInputPasswordDialog(Component componentParent, boolean modal, String message, int mnemonic, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Muestra un diálogo de solicitud de contraseña.- Parameters:
componentParent
- Componente padre para la modalidadmodal
-true
si se desea que el diálogo sea modal,false
en caso contrario.message
- Mensaje a mostrar.mnemonic
- Atajo de teclado.title
- Título del diálogo.iconPath
- Ruta hacia el icono del diálogo.allowUseCache
- Hace mostrarse la casilla para seleccionar el cacheo del PIN.defaultUseCache
- Valor por defecto de la opción de cacheo de PIN.- Returns:
- Contraseña introducida por el usuario.
-
getButton
Crea un botón. Si el botón corresponde al de cancelar, se le asigna la tecla escape.- Parameters:
text
- Texto del botón.mnemonic
- Atajo.- Returns:
- Botón creado.
-
getMinimumRelation
public int getMinimumRelation()Description copied from class:AbstractJAccessibilityCustomDialog
Relación mínima que se aplica para la redimensión de los componentes. Cuanto menor es este número menor es la redimensión aplicada.- Specified by:
getMinimumRelation
in classAbstractJAccessibilityCustomDialog
- Returns:
- int Relación mínima
-
getAnswer
private int getAnswer() -
getComponent
JSecurePasswordLabel getComponent() -
getInstanceInputPasswordDialog
static InputPasswordSmartcardDialog getInstanceInputPasswordDialog(Component componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Devuelve una instancia deCustomDialog
.- Parameters:
componentParent
- Componente padre para la modalidad.modal
-true
si el diálogo debe ser modal,false
en caso contrario.message
- Mensaje del diálogo.title
- Título del diálogo.iconPath
- Ruta hacia el recurso de fichero de icono.allowUseCache
- Hace mostrarse la casilla para seleccionar el cacheo del PIN.defaultUseCache
- Valor por defecto de la opción de cacheo de PIN.- Returns:
- Instancia del diálogo.
-
actionPerformed
Acción correspondiente a los botones de las alertas.- Specified by:
actionPerformed
in interfaceActionListener
-