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 AbstractJAccessibilityCustomDialog
AbstractJAccessibilityCustomDialog.ButtonAbstractActionNested classes/interfaces inherited from class JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intRespuesta al mensajeprivate JPanelPanel de botones.private static JButtonBotón de cancelar.private static StringTexto para el botónprivate JSecurePasswordLabelCampo de texto o campo de contraseña.private final IconLabelEtiqueta que contiene el icono de la alerta.private InfoLabelEtiqueta con la informaciñn de la alerta.private JPanelPanel principal.private static JButtonBotón de aceptar.private static final intprivate static final intprivate static final longUID.private JCheckBoxIndica si se muestra o no la casilla de "No volver a preguntar" (cacheo del PIN).Fields inherited from class JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class Dialog
DEFAULT_MODALITY_TYPEFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInputPasswordSmartcardDialog(Component componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Constructor.privateInputPasswordSmartcardDialog(JDialog componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Constructor.privateInputPasswordSmartcardDialog(JFrame componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAcción correspondiente a los botones de las alertas.(package private) voidPanel que contiene los botones principales de las alerta.private intprivate JButtonCrea un botón.(package private) static JButton(package private) JSecurePasswordLabel(package private) static InputPasswordSmartcardDialoggetInstanceInputPasswordDialog(Component componentParent, boolean modal, String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Devuelve una instancia deCustomDialog.intRelación mínima que se aplica para la redimensión de los componentes.(package private) static JButtonprotected voidinitComponents(String message, String title, String iconPath, boolean allowUseCache, boolean defaultUseCache) Inicializa los componentes de la alerta.protected voidsetIconLabel(String iconPath) Asigna el icono a la etiqueta.static PasswordResultshowInputPasswordDialog(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 AbstractJAccessibilityCustomDialog
createAccessibilityButtonsPanel, getActualHeight, getActualPositionX, getActualPositionY, getActualWidth, getInitialHeight, getInitialWidth, getMaxHeight, getMaxWidth, isBigSizeDefault, maximizarActionPerformed, restaurarActionPerformed, setActualHeight, setActualPositionX, setActualPositionY, setActualWidth, setBigSizeDefaultMethods inherited from class 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, updateMethods inherited from class Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackMethods inherited from class 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, toFrontMethods inherited from class 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, validateTreeMethods inherited from class 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-truesi el diálogo debe ser modal,falseen 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-truesi el diálogo debe ser modal,falseen 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-truesi el diálogo debe ser modal,falseen 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-truesi se desea que el diálogo sea modal,falseen 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
-
getMinimumRelation
public int getMinimumRelation()Description copied from class:AbstractJAccessibilityCustomDialogRelació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:
getMinimumRelationin 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-truesi el diálogo debe ser modal,falseen 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:
actionPerformedin interfaceActionListener
-