sat.awt
Class TextFieldDateSAT

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.TextComponent
              |
              +--java.awt.TextField
                    |
                    +--sat.awt.TextFieldDateSAT
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable

public class TextFieldDateSAT
extends java.awt.TextField
implements java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener

See Also:
Serialized Form

Inner classes inherited from class java.awt.TextField
java.awt.TextField.AccessibleAWTTextField
 
Inner classes inherited from class java.awt.TextComponent
java.awt.TextComponent.AccessibleAWTTextComponent
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected  java.lang.String FORMAT
           
 
Fields inherited from class java.awt.TextComponent
textListener
 
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
TextFieldDateSAT()
          Construye un nuevo TextFieldDateSAT.
TextFieldDateSAT(java.lang.String FORMAT)
          Construye un nuevo TextFieldDateSAT.
 
Method Summary
 void focusGained(java.awt.event.FocusEvent Ev)
          Se invoca cuando se ha ganado el foco.
 void focusLost(java.awt.event.FocusEvent Ev)
          Se invoca cuando se ha perdido el foco.
 java.lang.String getFormat()
          Obtener el formato de fecha del texto.
 void keyPressed(java.awt.event.KeyEvent Ev)
          Se invoca cuando se ha pulsado una tecla.
 void keyReleased(java.awt.event.KeyEvent Ev)
          Se invoca cuando se ha dejado de pulsar una tecla.
 void keyTyped(java.awt.event.KeyEvent Ev)
           
 void mouseClicked(java.awt.event.MouseEvent Ev)
           
 void mouseEntered(java.awt.event.MouseEvent Ev)
           
 void mouseExited(java.awt.event.MouseEvent Ev)
           
 void mousePressed(java.awt.event.MouseEvent Ev)
           
 void mouseReleased(java.awt.event.MouseEvent Ev)
          Se invoca cuando se ha soltado un botón del ratón.
 void setEnabled(boolean ENABLED)
          Habilita o deshabilita el TextFieldDateSAT.
 void setFormat(java.lang.String FORMAT)
          Seleccionar el formato de fecha del texto.
 
Methods inherited from class java.awt.TextField
addActionListener, addNotify, echoCharIsSet, getAccessibleContext, getColumns, getEchoChar, getListeners, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, minimumSize, minimumSize, paramString, preferredSize, preferredSize, processActionEvent, processEvent, removeActionListener, setColumns, setEchoChar, setEchoCharacter, setText
 
Methods inherited from class java.awt.TextComponent
addTextListener, enableInputMethods, getBackground, getCaretPosition, getSelectedText, getSelectionEnd, getSelectionStart, getText, isEditable, processTextEvent, removeNotify, removeTextListener, select, selectAll, setBackground, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORMAT

protected java.lang.String FORMAT
Constructor Detail

TextFieldDateSAT

public TextFieldDateSAT()
Construye un nuevo TextFieldDateSAT.

TextFieldDateSAT

public TextFieldDateSAT(java.lang.String FORMAT)
Construye un nuevo TextFieldDateSAT.
Parameters:
FORMAT - Formato de fecha del texto.
Method Detail

focusGained

public void focusGained(java.awt.event.FocusEvent Ev)
Se invoca cuando se ha ganado el foco. Desplaza el cursor de inserción de texto al final del mismo.
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent Ev)
Se invoca cuando se ha perdido el foco. Quita los espacios en blanco innecesarios.
Specified by:
focusLost in interface java.awt.event.FocusListener

getFormat

public java.lang.String getFormat()
Obtener el formato de fecha del texto. El valor por omisión es una cadena de caracteres vacía.
Returns:
Un objeto String correspondiente al formato de fecha del texto.

keyPressed

public void keyPressed(java.awt.event.KeyEvent Ev)
Se invoca cuando se ha pulsado una tecla. No permite cortar ni pegar texto. Transfiere el foco cuando se pulsa "enter". Solo permite caracteres de acuerdo a un arreglo de caracteres permitidos, y una longitud de texto que sea menor o igual al tamaño máximo permitido.
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent Ev)
Se invoca cuando se ha dejado de pulsar una tecla. Inserta diagonales en el texto de acuerdo al formato de fecha.
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent Ev)
Specified by:
keyTyped in interface java.awt.event.KeyListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent Ev)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent Ev)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent Ev)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent Ev)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent Ev)
Se invoca cuando se ha soltado un botón del ratón. No permite el uso de menus popup.
Specified by:
mouseReleased in interface java.awt.event.MouseListener

setEnabled

public void setEnabled(boolean ENABLED)
Habilita o deshabilita el TextFieldDateSAT. Cambia el color de fondo cuando se habilita o deshabilita el TextFieldDateSAT.
Overrides:
setEnabled in class java.awt.Component
Parameters:
ENABLED - Un boolean que indica si se habilita o deshabilita el TextFieldDateSAT.

setFormat

public void setFormat(java.lang.String FORMAT)
Seleccionar el formato de fecha del texto. Si se recibe un formato de fecha no permitido como argumento, se asignará una cadena de caracteres vacía como valor. Estos son los formatos de fecha permitidos: "yyyy", "ddyyyy", "yyyydd", "MMyyyy", "yyyyMM", "ddMMyyyy", "MMddyyyy", "yyMMdd", "yyyyMMdd", "yyyyddMM", "ddyyyyMM", "MMyyyydd", "dd/yyyy", "yyyy/dd", "MM/yyyy", "yyyy/MM", "dd/MM/yyyy", "MM/dd/yyyy", "yyyy/MM/dd", "yyyy/dd/MM", "dd/yyyy/MM" y "MM/yyyy/dd". [dd = día][MM = mes][yyyy = año].
Parameters:
FORMAT - Formato de fecha del texto.