sat.awt
Class TextFieldSAT

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.TextComponent
              |
              +--java.awt.TextField
                    |
                    +--sat.awt.TextFieldSAT
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
Direct Known Subclasses:
TextFieldUpperCaseSAT

public class TextFieldSAT
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, java.awt.Component.AWTTreeLock
 
Field Summary
protected  char[] CHAR_VALUES
          Caracteres permitidos para el texto.
protected  int MAX_SIZE
          Tamaño máximo del texto.
 
Fields inherited from class java.awt.TextField
actionListener, base, columns, echoChar, nameCounter, serialVersionUID, textFieldSerializedDataVersion
 
Fields inherited from class java.awt.TextComponent
backgroundSetByClientCode, canAccessClipboard, checkForEnableIM, editable, selectionEnd, selectionStart, text, textComponentSerializedDataVersion, textListener
 
Fields inherited from class java.awt.Component
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dbg, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TextFieldSAT()
          Construye un nuevo TextFieldSAT.
TextFieldSAT(char[] CHAR_VALUES, int MAX_SIZE)
          Construye un nuevo TextFieldSAT.
 
Method Summary
 void focusGained(java.awt.event.FocusEvent Ev)
          Método implementado por FocusListener.
 void focusLost(java.awt.event.FocusEvent Ev)
          Método implementado por FocusListener.
 char[] getCharValues()
          Obtener los caracteres permitidos para el texto.
 int getMaxSize()
          Obtener el tamaño máximo del texto.
 void keyPressed(java.awt.event.KeyEvent Ev)
          Método implementado por KeyListener.
 void keyReleased(java.awt.event.KeyEvent Ev)
           
 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)
          Método implementado por MouseListener.
 void setCharValues(char[] CHAR_VALUES)
          Seleccionar los caracteres permitidos para el texto.
 void setEnabled(boolean ENABLED)
          Habilita ó deshabilita el TextFieldSAT.
 void setMaxSize(int MAX_SIZE)
          Seleccionar el tamaño máximo del texto.
 
Methods inherited from class java.awt.TextField
, addActionListener, addNotify, constructComponentName, echoCharIsSet, eventEnabled, getAccessibleContext, getColumns, getEchoChar, getListeners, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, initIDs, minimumSize, minimumSize, paramString, preferredSize, preferredSize, processActionEvent, processEvent, readObject, removeActionListener, setColumns, setEchoChar, setEchoCharacter, setText, writeObject
 
Methods inherited from class java.awt.TextComponent
addTextListener, areInputMethodsEnabled, checkSystemClipboardAccess, enableInputMethods, enableInputMethodsIfNecessary, getBackground, getCaretPosition, getCharacterBounds, getIndexAtPoint, 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, checkGD, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createChildHierarchyEvents, createHierarchyEvents, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getMaximumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPaint, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, numListening, paint, paintAll, paintHeavyweightComponents, postEvent, postsOldMouseEvents, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, 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, registerNatives, wait, wait, wait
 

Field Detail

CHAR_VALUES

protected char[] CHAR_VALUES
Caracteres permitidos para el texto.

MAX_SIZE

protected int MAX_SIZE
Tamaño máximo del texto.
Constructor Detail

TextFieldSAT

public TextFieldSAT()
Construye un nuevo TextFieldSAT.

TextFieldSAT

public TextFieldSAT(char[] CHAR_VALUES,
                    int MAX_SIZE)
Construye un nuevo TextFieldSAT.
Parameters:
CHAR_VALUES - Caracteres permitidos para el texto.
MAX_SIZE - Tamaño máximo del texto.
Method Detail

focusGained

public void focusGained(java.awt.event.FocusEvent Ev)
Método implementado por FocusListener. 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)
Método implementado por FocusListener. Se invoca cuando se ha perdido el foco. Quita los espacios en blanco innecesarios.
Specified by:
focusLost in interface java.awt.event.FocusListener

getCharValues

public char[] getCharValues()
Obtener los caracteres permitidos para el texto. El valor por omisión es null.
Returns:
Caracteres permitidos para el texto.

getMaxSize

public int getMaxSize()
Obtener el tamaño máximo del texto. El valor por omisión es cero.
Returns:
Tamaño máximo del texto.

keyPressed

public void keyPressed(java.awt.event.KeyEvent Ev)
Método implementado por KeyListener. Se invoca cuando se ha pulsado una tecla. No permite cortar ni pegar texto. Transfiere el foco cuando se pulsa "enter". Solo inserta caracteres de acuerdo a los caracteres permitidos y una longitud de texto que sea menor ó 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)
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)
Método implementado por MouseListener. 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

setCharValues

public void setCharValues(char[] CHAR_VALUES)
Seleccionar los caracteres permitidos para el texto. Si se recibe un valor nulo ó un arreglo vacío como argumento, se asignará null como valor.
Parameters:
CHAR_VALUES - Caracteres permitidos para el texto.

setEnabled

public void setEnabled(boolean ENABLED)
Habilita ó deshabilita el TextFieldSAT. Cambia el color de fondo cuando se habilita ó deshabilita el TextFieldSAT.
Overrides:
setEnabled in class java.awt.Component
Parameters:
ENABLED - Si es true se habilita el TextFieldSAT, en caso contrario se deshabilita.

setMaxSize

public void setMaxSize(int MAX_SIZE)
Seleccionar el tamaño máximo del texto. Si se recibe un valor menor a cero como argumento, se asignará cero como valor.
Parameters:
MAX_SIZE - Tamaño máximo del texto.