Class TextoAct
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextField
spgn.pgn.gui.cliente.graficos.gui.swing.TextFieldSA
spgn.pgn.gui.cliente.graficos.cmp.actuadores.TextoAct
- All Implemented Interfaces:
ComponentListener
,FocusListener
,KeyListener
,MouseListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,Scrollable
,SwingConstants
,spgn.pgn.gui.cliente.graficos.ElementoAnimado
- Direct Known Subclasses:
Texto
public abstract class TextoAct
extends TextFieldSA
implements MouseListener, KeyListener, FocusListener, ComponentListener
Clase que muestra y cambia el valor de una tag
- Author:
- Ruben Palomino
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
-
Field Summary
Fields inherited from class javax.swing.JTextField
notifyAction
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
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.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.void
Agrega un actuador listenervoid
void
void
void
void
void
getFont()
Devuelve el formato numerico del componentedouble
getMax()
Obtiene el maximo de comparaciondouble
getMin()
Devuelve el minimo de comparaciongetName()
Metodo que devuelve el nombre del componenteint
Devuelve el nivel minimo de comparaciongetTag()
Devuelve el path de la tag asociadaDevuelve el texto sin unidadesDevuelve las unidades a mostrarboolean
Devuelve si la propiedad de ajustar texto esta habilitadaboolean
Devuelve si el cursor mano esta activadoboolean
Devuelve si es numerico o noboolean
Devuelve si el teclado tactil esta habilitadoboolean
Devuelve si el valor de la tag es evitablevoid
void
void
void
mouseClicked
(MouseEvent arg0) void
mouseEntered
(MouseEvent arg0) void
mouseExited
(MouseEvent arg0) void
mousePressed
(MouseEvent arg0) void
mouseReleased
(MouseEvent arg0) void
setAjustaTexto
(boolean ajustaText) habilita la propiedad de ajustar textovoid
setCursorMano
(boolean cursorMano) Habilita el cursor con forma de manovoid
void
setFormatoNumerico
(String formatoNumericoT) Asigna el formato numericovoid
setMax
(double max) Asigna el valor maximo de comparacionvoid
setMin
(double min) Asigna el valor minimo de comparacionvoid
Metodo que asigna el nombre al componentevoid
setNivelMinimo
(int nivelMinimo) Asigna el nivel minimo de comparacionvoid
setNumerico
(boolean numerico) Asigna si es numericovoid
Asignamos una tag al actuadorvoid
setTecladoTactilHabilitado
(boolean tecladoTactilHabilitado) Habilita el teclado tactilvoid
void
Asigna el textovoid
setUnidades
(String unidades) Asigna las unidades a mostrarvoid
setValor
(spgn.pgn.opc.tag.ValorTag vt) Metodo al que llama el sincronizador grafico no usar es para uso interno del sistemavoid
setValorEditable
(boolean valorEditable) Habilita la edicion del valor de la tagboolean
Metodo para verificar si el usuario logado en la aplicacion puede actuar sobre el componenteMethods inherited from class spgn.pgn.gui.cliente.graficos.gui.swing.TextFieldSA
err, errE, errI, getAlmacen, getComponente, getGestorGrafico, getMinutosLogin, getNivelLogin, getNumTags, getUserLogin, getVt, isTagMostrarDirecto, isTodoSincronizado, listo, log, logE, logI, lr, setAlmacen, setGestorGrafico, setLogin, setMostrar, setTagMostrar, setTagMostrarDirecto, setTodoSincronizado
Methods inherited from class javax.swing.JTextField
addActionListener, getAccessibleContext, getAction, getActionListeners, getActions, getColumns, getHorizontalAlignment, getHorizontalVisibility, getPreferredSize, getScrollOffset, getUIClassID, isValidateRoot, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setDocument, setHorizontalAlignment, setScrollOffset
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getPrintable, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, modelToView2D, moveCaretPosition, paste, print, print, print, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setDropMode, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, viewToModel2D, write
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
TextoAct
public TextoAct()Constructor general de la etiqueta
-
-
Method Details
-
getMax
public double getMax()Obtiene el maximo de comparacion- Returns:
- the max
-
getMin
public double getMin()Devuelve el minimo de comparacion- Returns:
- the min
-
setMax
public void setMax(double max) Asigna el valor maximo de comparacion- Parameters:
max
- the max to set
-
setMin
public void setMin(double min) Asigna el valor minimo de comparacion- Parameters:
min
- the min to set
-
isNumerico
public boolean isNumerico()Devuelve si es numerico o no- Returns:
- the numerico
-
setNumerico
public void setNumerico(boolean numerico) Asigna si es numerico- Parameters:
numerico
- the numerico to set
-
getFormatoNumerico
Devuelve el formato numerico del componente- Returns:
- el formato numerico
- See Also:
-
setFormatoNumerico
Asigna el formato numerico- Parameters:
formatoNumericoT
- el formato numerico- See Also:
-
isValorEditable
public boolean isValorEditable()Devuelve si el valor de la tag es evitable- Returns:
- true o false
-
setValorEditable
public void setValorEditable(boolean valorEditable) Habilita la edicion del valor de la tag- Parameters:
valorEditable
- true o false
-
getTextSinUnidades
Devuelve el texto sin unidades- Returns:
- Strin con el texto
-
setText
- Overrides:
setText
in classJTextComponent
-
setTexto
Asigna el texto- Parameters:
texto
- el texto
-
setTag
Asignamos una tag al actuador- Parameters:
pathTag
- el path de la tag de la que mostrar el texto
-
getTag
Devuelve el path de la tag asociada- Returns:
- el path de la tag
-
setValor
public void setValor(spgn.pgn.opc.tag.ValorTag vt) Metodo al que llama el sincronizador grafico no usar es para uso interno del sistema- Parameters:
vt
- valor tag
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
setName
Description copied from interface:spgn.pgn.gui.cliente.graficos.ElementoAnimado
Metodo que asigna el nombre al componente -
getName
Description copied from interface:spgn.pgn.gui.cliente.graficos.ElementoAnimado
Metodo que devuelve el nombre del componente -
isTecladoTactilHabilitado
public boolean isTecladoTactilHabilitado()Devuelve si el teclado tactil esta habilitado- Returns:
- the tecladoTactilHabilitado
-
setTecladoTactilHabilitado
public void setTecladoTactilHabilitado(boolean tecladoTactilHabilitado) Habilita el teclado tactil- Parameters:
tecladoTactilHabilitado
- the tecladoTactilHabilitado to set
-
keyPressed
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-
keyTyped
- Specified by:
keyTyped
in interfaceKeyListener
-
verificaLogin
public boolean verificaLogin()Metodo para verificar si el usuario logado en la aplicacion puede actuar sobre el componente- Returns:
- true o false
-
getUnidades
Devuelve las unidades a mostrar- Returns:
- the unidades
-
setUnidades
Asigna las unidades a mostrar- Parameters:
unidades
- the unidades to set
-
addActionActuador
Deprecated.Depreciado- Parameters:
al
- depreciado
-
addActuadorListener
Agrega un actuador listener- Parameters:
al
- el ActuadorListener
-
focusGained
- Specified by:
focusGained
in interfaceFocusListener
-
focusLost
- Specified by:
focusLost
in interfaceFocusListener
-
isAjustaTexto
public boolean isAjustaTexto()Devuelve si la propiedad de ajustar texto esta habilitada- Returns:
- the ajustaText
-
setAjustaTexto
public void setAjustaTexto(boolean ajustaText) habilita la propiedad de ajustar texto- Parameters:
ajustaText
- the ajustaText to set
-
componentHidden
- Specified by:
componentHidden
in interfaceComponentListener
-
componentMoved
- Specified by:
componentMoved
in interfaceComponentListener
-
componentResized
- Specified by:
componentResized
in interfaceComponentListener
-
componentShown
- Specified by:
componentShown
in interfaceComponentListener
-
setFont
- Overrides:
setFont
in classJTextField
-
getFont
- Specified by:
getFont
in interfaceMenuContainer
- Overrides:
getFont
in classComponent
-
isCursorMano
public boolean isCursorMano()Devuelve si el cursor mano esta activado- Returns:
- the cursorMano
-
setCursorMano
public void setCursorMano(boolean cursorMano) Habilita el cursor con forma de mano- Parameters:
cursorMano
- the cursorMano to set
-
getNivelMinimo
public int getNivelMinimo()Devuelve el nivel minimo de comparacion- Returns:
- the nivelMinimo
-
setNivelMinimo
public void setNivelMinimo(int nivelMinimo) Asigna el nivel minimo de comparacion- Parameters:
nivelMinimo
- the nivelMinimo to set
-