|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextArea
com.retek.commons.gui.widget.RTextArea
This class subclasses the standard JTextArea class in the Swing package to provide custom functionality for the RCOM client application. It can also limit the number of characters entered in the text area.
Retek Inc. Copyright (c) 2002
Nested Class Summary |
Nested classes inherited from class javax.swing.JTextArea |
javax.swing.JTextArea.AccessibleJTextArea |
Nested classes inherited from class javax.swing.text.JTextComponent |
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.KeyBinding |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class javax.swing.text.JTextComponent |
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 |
Constructor Summary | |
RTextArea()
Returns new RTextArea object. |
Method Summary | |
void |
append(java.lang.String text)
Appends text to the text area. |
void |
clear()
Clears the text area of input. |
java.lang.String |
getClusterName()
Retrieves the cluster name of the widget. |
int |
getLength()
Returns the allowable text length. |
java.lang.String |
getText()
Retrieves the text string from the text field. |
boolean |
isEmpty()
Retrieves whether or not the text area is empty. |
boolean |
isErrorState()
Retrieves whether or not the text area is in an error state. |
void |
keyPressed(java.awt.event.KeyEvent event)
Implements the key listener interface "key pressed" method. |
void |
keyReleased(java.awt.event.KeyEvent event)
Implements the key listener interface "key released" method. |
void |
keyTyped(java.awt.event.KeyEvent event)
Implements the key listener interface "key typed" method. |
void |
paste()
Overrides paste() to make sure they do not paste more text than the area is allowed. |
void |
refresh()
Refreshes the text area (this will trigger the formatting and line length logic). |
void |
removeMask()
Removes the mask assigned to this text area. |
void |
setBackground(java.awt.Color color)
|
void |
setClusterName(java.lang.String clusterName)
Sets the cluster name of the widget. |
void |
setEnabled(boolean enabled)
Overrides JTextArea method to automatically update the color state of the widget. |
void |
setErrorState(boolean errorState)
Sets the colors of the text area to an error state. |
void |
setFocusedState()
Sets the text area into focused state mode. |
void |
setForeground(java.awt.Color color)
|
void |
setLength(int length)
Sets the allowable text length. |
void |
setMask(Mask formatMask)
Assigns a format mask to the text area. |
void |
setQuickEntries(java.util.Map map)
Sets the quick entry keystroke to replacement string mapping for the text area. |
void |
setText(java.lang.String text)
Assigns the text in the area. |
void |
setText(java.lang.String[] textArray)
Assigns the text in the text field, formatted from a string array through a mask. |
void |
setUseInactiveColor(boolean useColor)
Sets whether or not to use the inactive color state of the text field. |
Methods inherited from class javax.swing.JTextArea |
createDefaultModel, getAccessibleContext, getColumns, getColumnWidth, getLineCount, getLineEndOffset, getLineOfOffset, getLineStartOffset, getLineWrap, getPreferredScrollableViewportSize, getPreferredSize, getRowHeight, getRows, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getTabSize, getUIClassID, getWrapStyleWord, insert, paramString, replaceRange, setColumns, setFont, setLineWrap, setRows, setTabSize, setWrapStyleWord |
Methods inherited from class javax.swing.text.JTextComponent |
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDocument, setDragEnabled, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.retek.commons.gui.core.WidgetInterface |
getName, setName |
Constructor Detail |
public RTextArea()
Method Detail |
public void setLength(int length)
length
- The length in characters that the text field should allow.public int getLength()
public void setMask(Mask formatMask)
formatMask
- A format mask to assign to this text area.public void removeMask()
public void setUseInactiveColor(boolean useColor)
useColor
- True if inactive colors should be used, false if not.public void paste()
public void refresh()
public void setText(java.lang.String text)
text
- The text to place in the text area.public void setText(java.lang.String[] textArray)
textArray
- An array of strings to format through a mask.public void append(java.lang.String text)
public java.lang.String getText()
public boolean isEmpty()
public void clear()
public void keyReleased(java.awt.event.KeyEvent event)
keyReleased
in interface java.awt.event.KeyListener
event
- Details about the key event that occurred.public void keyPressed(java.awt.event.KeyEvent event)
keyPressed
in interface java.awt.event.KeyListener
event
- Details about the key event that occurred.public void keyTyped(java.awt.event.KeyEvent event)
If the text in the field is selected, a new keystroke would replace the selected text and by default that means we cannot allow the event to continue.
If quick entry has been activated, the system must look for SHIFT/ALT and then find if the sequence of characters in the built up word exists in the quickmap. If it does the information should be appended to the text area.
keyTyped
in interface java.awt.event.KeyListener
event
- Details about the key event that occurred.public void setQuickEntries(java.util.Map map)
public void setClusterName(java.lang.String clusterName)
setClusterName
in interface WidgetInterface
clusterName
- The cluster name to assign to the widget.public java.lang.String getClusterName()
getClusterName
in interface WidgetInterface
public void setBackground(java.awt.Color color)
in JTextArea.
public void setForeground(java.awt.Color color)
in JTextArea.
public void setEnabled(boolean enabled)
public void setErrorState(boolean errorState)
setErrorState
in interface WidgetInterface
errorState
- True if the widget is in error state, false if not.public boolean isErrorState()
isErrorState
in interface WidgetInterface
public void setFocusedState()
setFocusedState
in interface WidgetInterface
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |