Oracle Data-aware Controls Reference

oracle.dacf.control.swing
Class TextAreaControl

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byoracle.dacf.control.swing.TextAreaControl
All Implemented Interfaces:
javax.accessibility.Accessible, ApplyEditsListener, Control, ControlEnabledListener, javax.infobus.DataItemChangeListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, javax.infobus.ImmediateAccess, InfoBusManagerListener, java.awt.MenuContainer, java.io.Serializable

public class TextAreaControl
extends javax.swing.JPanel
implements Control, javax.infobus.ImmediateAccess, java.awt.event.FocusListener, ControlEnabledListener, ApplyEditsListener, InfoBusManagerListener

A data aware control to display and text in multiple lines. TextAreaControl can be bound to an ImmediateAccess dataitem.

TextAreaControl is a composite control comprising of a JTextArea and a JScrollPane.

Version:
PUBLIC
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
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.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 oracle.dacf.control.Control
DEFAULT_INFOBUS_NAME, EVENT_PROPERTY_ROW, EVENT_PROPERTY_ROW_CHANGE, EVENT_PROPERTY_ROW_COUNT, EVENT_PROPERTY_VIEW_CHANGE, EVENT_PROPERTY_VIEW_REFRESHED, EVENT_PROPERTY_VIEW_SCROLLED, EXCLUDE, HIDE, SHOW
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TextAreaControl()
          Constructs a default TextAreaControl
TextAreaControl(javax.swing.text.Document doc)
          Constructs a new TextAreaControl with the given document model, and defaults for all of the other arguments.
TextAreaControl(javax.swing.text.Document doc, java.lang.String text, int rows, int columns)
          Constructs a new TextAreaControl with the specified number of rows and columns, and the given model.
TextAreaControl(int rows, int columns)
          Constructs a new empty TextAreaControl with the specified number of rows and columns.
TextAreaControl(java.lang.String text)
          Constructs a new TextAreaControl with the specified text displayed.
TextAreaControl(java.lang.String text, int rows, int columns)
          Constructs a new TextAreaControl with the specified text and number of rows and columns.
 
Method Summary
 void addNavigatedListener(NavigatedListener listener)
          Adds a navigated listener to this control.
 void addNavigatingListener(NavigatingListener listener)
          Adds a navigating listener to this control.
 void applyEdits()
           
 void cancelEdits()
           
 void dataItemAdded(javax.infobus.DataItemAddedEvent event)
          Indicates that a new item was added to the bound aggregate data item (e.g.
 void dataItemChanged(java.lang.Object oldDataItem, java.lang.Object newDataItem)
          Notifies the control that the bound InfoBus DataItem has changed.
 void dataItemDeleted(javax.infobus.DataItemDeletedEvent event)
          Indicates that an item was deleted from the bound aggregate data item (e.
 void dataItemRevoked(javax.infobus.DataItemRevokedEvent event)
          Indicates that the bound data item (and its sub-items, if any) has been revoked, and is temporarily unavailable.
 void dataItemValueChanged(javax.infobus.DataItemValueChangedEvent event)
          Indicates a changed value in the bound data item.
 void enabledChanged(boolean b)
           
 void focusGained(java.awt.event.FocusEvent event)
          This method is an implementaion side effect
 void focusLost(java.awt.event.FocusEvent event)
          This method is an implementaion side effect
 javax.swing.text.Caret getCaret()
          Fetches the caret that allows text-oriented navigation over the view.
 java.awt.Color getCaretColor()
          Fetches the current color used to render the caret.
 int getCaretPosition()
          Returns the position of the text insertion caret for the text component.
 int getColumns()
          Gets the number of columns to displayed in the underlying JTextArea
 java.awt.Component getComponent()
          Returns the AWT component associated with this control.
 javax.swing.border.Border getControlBorder()
          Returns the border of this component or null if no border is currently set.
 java.awt.Cursor getCursor()
          Get the Cursor of this object.
 java.lang.Object getDataItem()
          Returns the InfoBus DataItem this control is bound to.
 java.lang.String getDataItemName()
          Returns the name of the InfoBus DataItem this control is bound to.
 java.awt.Color getDisabledTextColor()
          Fetches the current color used to render the selected text.
 javax.swing.text.Document getDocument()
          Fetches the model associated with the editor.
 char getFocusAccelerator()
          Returns the key accelerator that will cause the receiving text component to get the focus.
 javax.swing.text.Highlighter getHighlighter()
          Fetches the object responsible for making highlights.
 java.lang.String getInfoBusName()
          Returns the name of the InfoBus this control is connected to.
 javax.swing.text.Keymap getKeymap()
          Fetches the keymap currently active in this text component.
 java.awt.LayoutManager getLayout()
          Gets the layout manager for this container.
 boolean getLineWrap()
          Gets the line-wrapping policy of the text area.
 java.awt.Insets getMargin()
          Returns the margin between the text component's border and its text.
 java.awt.Dimension getMaximumSize()
          If the maximumSize has been set to a non-null value just return it.
 java.awt.Dimension getMinimumSize()
          If the minimumSize has been set to a non-null value just return it.
 java.awt.Component getNextFocusableComponent()
          Return the next focusable component or null if the focus manager should choose the next focusable component automatically
 java.awt.Dimension getPreferredSize()
          If the preferredSize has been set to a non-null value just return it.
 java.lang.String getPresentationString(java.util.Locale locale)
          Gets the entered text as an String.
 boolean getRevertValueOnError()
          Returns the value for the RevertValueOnError property When this property is set to true then the TextFieldControl will revert to the value displayed prior to being edited.
 int getRows()
          Gets the number of rows to displayed in the underlying JTextArea
 javax.swing.JScrollPane getScrollPane()
          Returns the scrollpane used by the textarea control
 java.awt.Color getSelectedTextColor()
          Fetches the current color used to render the selected text.
 java.awt.Color getSelectionColor()
          Fetches the current color used to render the selection.
 int getSelectionEnd()
          Returns the selected text's end position.
 int getSelectionStart()
          Returns the selected text's start position.
 int getTabSize()
          Gets the number of characters used to expand tabs.
 java.lang.String getText()
          Returns the text contained in this TextAreaControl.
 javax.swing.JTextArea getTextArea()
          Gets the underlying JTextArea used by this control
 java.lang.Object getValueAsObject()
          Gets the entered text as an Object.
 java.lang.String getValueAsString()
          Gets the entered text as a String.
 boolean getWrapStyleWord()
          Get the style of wrapping used if the text area is wrapping lines.
 boolean isEditable()
          Returns the boolean indicating whether this TextComponent is editable or not.
 boolean isEnabled()
          Determine if the object is enabled.
 boolean isFocusValidated()
          Determines whether focus into this control causes validation to occur.
 boolean isRequestFocusEnabled()
          Return whether the receiving component can obtain the focus by calling requestFocus
 boolean isVisible()
          Determine if the object is visible.
 void processNavigatedEvent(NavigatedEvent event)
          Processes a navigated event for this control.
 void processNavigatingEvent(NavigatingEvent event)
          Processes a navigating event for this control.
 void releaseResources(InfoBusManagerReleaseEvent e)
          A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.
 void removeNavigatedListener(NavigatedListener listener)
          Removes a navigated listener from this control.
 void removeNavigatingListener(NavigatingListener listener)
          Removes a previusly added navigating listener
 void rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent event)
          Indicates that the cursor for the bound RowsetAccess data item has changed rows.
 void setCaret(javax.swing.text.Caret c)
          Sets the caret to be used.
 void setCaretColor(java.awt.Color c)
          Sets the current color used to render the caret.
 void setCaretPosition(int position)
          Sets the position of the text insertion caret for the TextComponent.
 void setColumns(int columns)
          Sets the number of columns to be displayed in the underlying JTextArea
 void setControlBorder(javax.swing.border.Border border)
          Sets the border of this component.
 void setCursor(java.awt.Cursor cursor)
          Set the Cursor of this object.
 void setDataItemName(java.lang.String dataItemName)
          Sets the name of the InfoBus DataItem this control is bound to.
 void setDisabledTextColor(java.awt.Color c)
          Sets the current color used to render the disabled text.
 void setDocument(javax.swing.text.Document doc)
          Associates the editor with a text document.
 void setEditable(boolean b)
          Sets the specified boolean to indicate whether or not this TextComponent should be editable.
 void setEnabled(boolean b)
          Set the enabled state of the object.
 void setFocusAccelerator(char aKey)
          Sets the key accelerator that will cause the receiving text component to get the focus.
 void setFocusValidated(boolean focusValidated)
          Sets whether focus into this control causes validation to occur.
 void setHighlighter(javax.swing.text.Highlighter h)
          Sets the highlighter to be used.
 void setInfoBusName(java.lang.String infoBusName)
          Sets the name of the InfoBus this control is connected to.
 void setKeymap(javax.swing.text.Keymap map)
          Sets the keymap to use for binding events to actions.
 void setLineWrap(boolean wrap)
          Sets the line-wrapping policy of the text area.
 void setMargin(java.awt.Insets m)
          Sets margin space between the text component's border and its text.
 void setMaximumSize(java.awt.Dimension maximumSize)
          Sets the maximumSize of this component to a constant value.
 void setMinimumSize(java.awt.Dimension minimumSize)
          Sets the minimumSize of this component to a constant value.
 void setNextFocusableComponent(java.awt.Component aComponent)
          Specifies the next component to get the focus after this one, for example, when the tab key is pressed.
 void setOpaque(boolean isOpaque)
           
 void setPreferredSize(java.awt.Dimension preferredSize)
          Set the preferred size of the receiving component.
 void setRequestFocusEnabled(boolean aFlag)
          Set whether the receiving component can obtain the focus by calling requestFocus.
 void setRevertValueOnError(boolean revertIt)
          Sets the value for the RevertValueOnError property When this property is set to true then the TextFieldControl will revert to the value displayed prior to being edited.
 void setRows(int rows)
          Sets the number of rows to be displayed in the underlying JTextArea
 void setSelectedTextColor(java.awt.Color c)
          Sets the current color used to render the selected text.
 void setSelectionColor(java.awt.Color c)
          Sets the current color used to render the selection.
 void setSelectionEnd(int selectionEnd)
          Sets the selection end to the specified position.
 void setSelectionStart(int selectionStart)
          Sets the selection start to the specified position.
 void setTabSize(int size)
          Sets the number of characters to expand tabs to.
 void setText(java.lang.String t)
          Sets the text of this TextAreaControl to the specified text.
 void setToolTipText(java.lang.String text)
          Registers the text to display in a tool tip.
 void setValue(java.lang.Object newValue)
          This method is not supported and always throws an exception
 void setVisible(boolean b)
          Set the visible state of the object.
 void setWrapStyleWord(boolean word)
          Set the style of wrapping used if the text area is wrapping lines.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
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, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, 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, 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, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, 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
 

Constructor Detail

TextAreaControl

public TextAreaControl()
Constructs a default TextAreaControl


TextAreaControl

public TextAreaControl(java.lang.String text)
Constructs a new TextAreaControl with the specified text displayed.

Parameters:
text - the text to be displayed

TextAreaControl

public TextAreaControl(int rows,
                       int columns)
Constructs a new empty TextAreaControl with the specified number of rows and columns.

Parameters:
rows - the number of rows
columns - the number of columns

TextAreaControl

public TextAreaControl(java.lang.String text,
                       int rows,
                       int columns)
Constructs a new TextAreaControl with the specified text and number of rows and columns.

Parameters:
text - the text to be displayed
rows - the number of rows
columns - the number of columns

TextAreaControl

public TextAreaControl(javax.swing.text.Document doc)
Constructs a new TextAreaControl with the given document model, and defaults for all of the other arguments.

Parameters:
doc - the model to use

TextAreaControl

public TextAreaControl(javax.swing.text.Document doc,
                       java.lang.String text,
                       int rows,
                       int columns)
Constructs a new TextAreaControl with the specified number of rows and columns, and the given model.

Parameters:
doc - the model to use
text - the text to be displayed
rows - the number of rows
columns - the number of columns
Method Detail

setRevertValueOnError

public void setRevertValueOnError(boolean revertIt)
Sets the value for the RevertValueOnError property When this property is set to true then the TextFieldControl will revert to the value displayed prior to being edited.

Parameters:
revertIt - the value for the RevertValueOnError property
See Also:
#(), #()

getRevertValueOnError

public boolean getRevertValueOnError()
Returns the value for the RevertValueOnError property When this property is set to true then the TextFieldControl will revert to the value displayed prior to being edited.

Returns:
the value for the RevertValueOnError property
See Also:
#(), #()

getCursor

public java.awt.Cursor getCursor()
Get the Cursor of this object.

Returns:
the Cursor, if supported, of the object; otherwise, null

setCursor

public void setCursor(java.awt.Cursor cursor)
Set the Cursor of this object.


releaseResources

public void releaseResources(InfoBusManagerReleaseEvent e)
Description copied from interface: InfoBusManagerListener
A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.

Specified by:
releaseResources in interface InfoBusManagerListener

isEnabled

public boolean isEnabled()
Determine if the object is enabled.

Returns:
true if object is enabled; otherwise, false

setEnabled

public void setEnabled(boolean b)
Set the enabled state of the object.

Specified by:
setEnabled in interface Control
Parameters:
b - if true, enables this object; otherwise, disables it

enabledChanged

public void enabledChanged(boolean b)
Specified by:
enabledChanged in interface ControlEnabledListener

isVisible

public boolean isVisible()
Determine if the object is visible. Note: this means that the object intends to be visible; however, it may not in fact be showing on the screen because one of the objects that this object is contained by is not visible. To determine if an object is showing on the screen, use isShowing().

Returns:
true if object is visible; otherwise, false

setVisible

public void setVisible(boolean b)
Set the visible state of the object.

Parameters:
b - if true, shows this object; otherwise, hides it

getLayout

public java.awt.LayoutManager getLayout()
Gets the layout manager for this container.

See Also:
Container.setLayout(java.awt.LayoutManager)

setMaximumSize

public void setMaximumSize(java.awt.Dimension maximumSize)
Sets the maximumSize of this component to a constant value. Subsequent calls to getMaximumSize will always return this value, the components UI will not be asked to compute it. Setting the maximumSize to null restores the default behavior.

See Also:
getMaximumSize()

getMaximumSize

public java.awt.Dimension getMaximumSize()
If the maximumSize has been set to a non-null value just return it. If the UI delegates getMaximumSize() method returns a non null value then return that, otherwise defer to the components layout manager.

Returns:
the value of the maximumSize property.
See Also:
setMaximumSize(java.awt.Dimension)

setMinimumSize

public void setMinimumSize(java.awt.Dimension minimumSize)
Sets the minimumSize of this component to a constant value. Subsequent calls to getMinimumSize will always return this value, the components UI will not be asked to compute it. Setting the minimumSize to null restores the default behavior.

See Also:
getMinimumSize()

getMinimumSize

public java.awt.Dimension getMinimumSize()
If the minimumSize has been set to a non-null value just return it. If the UI delegates getMinimumSize() method returns a non null value then return that, otherwise defer to the components layout manager.

Returns:
the value of the minimumSize property.
See Also:
setMinimumSize(java.awt.Dimension)

setNextFocusableComponent

public void setNextFocusableComponent(java.awt.Component aComponent)
Specifies the next component to get the focus after this one, for example, when the tab key is pressed. Invoke this method to override the default focus-change sequence.


getNextFocusableComponent

public java.awt.Component getNextFocusableComponent()
Return the next focusable component or null if the focus manager should choose the next focusable component automatically


setPreferredSize

public void setPreferredSize(java.awt.Dimension preferredSize)
Set the preferred size of the receiving component. if preferredSize is null, the UI will be asked for the preferred size


getPreferredSize

public java.awt.Dimension getPreferredSize()
If the preferredSize has been set to a non-null value just return it. If the UI delegates getPreferredSize() method returns a non null then value return that, otherwise defer to the components layout manager.

Returns:
the value of the preferredSize property.
See Also:
setPreferredSize(java.awt.Dimension)

setRequestFocusEnabled

public void setRequestFocusEnabled(boolean aFlag)
Set whether the receiving component can obtain the focus by calling requestFocus. The default value is true. Note: Setting this property to false will not prevent the focus manager from setting the focus to this component, it will prevent the component from getting the focus when the focus is requested explicitly. Override isFocusTraversable and return false if the component should never get the focus.


isRequestFocusEnabled

public boolean isRequestFocusEnabled()
Return whether the receiving component can obtain the focus by calling requestFocus

See Also:
#setRequestFocusEnabled()

setControlBorder

public void setControlBorder(javax.swing.border.Border border)
Sets the border of this component. The Border object is responsible for defining the insets for the component (overriding any insets set directly on the component) and for optionally rendering any border decorations within the bounds of those insets. Borders should be used (rather than insets) for creating both decorative and non-decorative (e.g. margins and padding) regions for a swing component. Compound borders can be used to nest multiple borders within a single component.

This is a bound property.

Parameters:
border - the border to be rendered for this component

getControlBorder

public javax.swing.border.Border getControlBorder()
Returns the border of this component or null if no border is currently set.

Returns:
the border object for this component
See Also:
setBorder

getTextArea

public javax.swing.JTextArea getTextArea()
Gets the underlying JTextArea used by this control

Returns:
JTextArea being used by this control

setOpaque

public void setOpaque(boolean isOpaque)

setToolTipText

public void setToolTipText(java.lang.String text)
Registers the text to display in a tool tip. The text displays when the cursor lingers over the component.

See How to Use Tool Tips in The Java Tutorial for further documentation.

Parameters:
text - The string to display. If the text is null, the tool tip is turned off for this component.
See Also:
JComponent.TOOL_TIP_TEXT_KEY

getCaret

public javax.swing.text.Caret getCaret()
Fetches the caret that allows text-oriented navigation over the view.

Returns:
the caret

setCaret

public void setCaret(javax.swing.text.Caret c)
Sets the caret to be used. By default this will be set by the UI that gets installed. This can be changed to a custom caret if desired. Setting the caret results in a PropertyChange event ("caret") being fired.

Parameters:
c - the caret
See Also:
getCaret()

getCaretColor

public java.awt.Color getCaretColor()
Fetches the current color used to render the caret.

Returns:
the color

setCaretColor

public void setCaretColor(java.awt.Color c)
Sets the current color used to render the caret. Setting to null effectively restores the default color. Setting the color results in a PropertyChange event ("caretColor") being fired.

Parameters:
c - the color
See Also:
getCaretColor()

setCaretPosition

public void setCaretPosition(int position)
Sets the position of the text insertion caret for the TextComponent. Note that the caret tracks change, so this may move if the underlying text of the component is changed. If the document is null, does nothing.

Parameters:
position - the position

getCaretPosition

public int getCaretPosition()
Returns the position of the text insertion caret for the text component.

Returns:
the position of the text insertion caret for the text component >= 0

setColumns

public void setColumns(int columns)
Sets the number of columns to be displayed in the underlying JTextArea

Parameters:
columns - the new rowcount
See Also:
javax.swing.JTextArea#setColumns()

getColumns

public int getColumns()
Gets the number of columns to displayed in the underlying JTextArea

Returns:
the rowcount
See Also:
JTextArea.getColumns()

getDisabledTextColor

public java.awt.Color getDisabledTextColor()
Fetches the current color used to render the selected text.

Returns:
the color

setDisabledTextColor

public void setDisabledTextColor(java.awt.Color c)
Sets the current color used to render the disabled text. Setting the color fires off a PropertyChange event ("disabledTextColor").

Parameters:
c - the color
See Also:
getDisabledTextColor()

setDocument

public void setDocument(javax.swing.text.Document doc)
Associates the editor with a text document. The currently registered factory is used to build a view for the document, which gets displayed by the editor after revalidation. A PropertyChange event ("document") is propagated to each listener.

Parameters:
doc - the document to display/edit
See Also:
getDocument()

getDocument

public javax.swing.text.Document getDocument()
Fetches the model associated with the editor. This is primarily for the UI to get at the minimal amount of state required to be a text editor. Subclasses will return the actual type of the model which will typically be something that extends Document.

Returns:
the model

isEditable

public boolean isEditable()
Returns the boolean indicating whether this TextComponent is editable or not.

Returns:
the boolean value
See Also:
setEditable(boolean)

setEditable

public void setEditable(boolean b)
Sets the specified boolean to indicate whether or not this TextComponent should be editable. A PropertyChange event ("editable") is fired when the state is changed.

Parameters:
b - the boolean to be set
See Also:
isEditable()

setFocusAccelerator

public void setFocusAccelerator(char aKey)
Sets the key accelerator that will cause the receiving text component to get the focus. The accelerator will be the key combination of the alt key and the character given (converted to upper case). By default, there is no focus accelerator key. Any previous key accelerator setting will be superseded. A '\0' key setting will be registered, and has the effect of turning off the focus accelerator. When the new key is set, a PropertyChange event (FOCUS_ACCELERATOR_KEY) will be fired.

Parameters:
aKey - the key

getFocusAccelerator

public char getFocusAccelerator()
Returns the key accelerator that will cause the receiving text component to get the focus. Return '\0' if no focus accelerator has been set.

Returns:
the key

getHighlighter

public javax.swing.text.Highlighter getHighlighter()
Fetches the object responsible for making highlights.

Returns:
the highlighter

setHighlighter

public void setHighlighter(javax.swing.text.Highlighter h)
Sets the highlighter to be used. By default this will be set by the UI that gets installed. This can be changed to a custom highlighter if desired. The highlighter can be set to null to disable it. A PropertyChange event ("highlighter") is fired when a new highlighter is installed.

Parameters:
h - the highlighter
See Also:
getHighlighter()

setKeymap

public void setKeymap(javax.swing.text.Keymap map)
Sets the keymap to use for binding events to actions. Setting to null effectively disables keyboard input. A PropertyChange event ("keymap") is fired when a new keymap is installed.

Parameters:
map - the keymap
See Also:
getKeymap()

getKeymap

public javax.swing.text.Keymap getKeymap()
Fetches the keymap currently active in this text component.

Returns:
the keymap

setLineWrap

public void setLineWrap(boolean wrap)
Sets the line-wrapping policy of the text area. If set to true the lines will be wrapped if they are too long to fit within the allocated width. If set to false, the lines will always be unwrapped. A PropertyChange event ("LineWrap") is fired when the policy is changed.

Parameters:
wrap - indicates if lines should be wrapped.
See Also:
getLineWrap()

getLineWrap

public boolean getLineWrap()
Gets the line-wrapping policy of the text area. If set to true the lines will be wrapped if they are too long to fit within the allocated width. If set to false, the lines will always be unwrapped.


setMargin

public void setMargin(java.awt.Insets m)
Sets margin space between the text component's border and its text. Setting it to null will cause the text component to use a default margin. The text component's default Border object will use this value to create the proper margin. However, if a non-default border is set on the text component, it is that Border object's responsibility to create the appropriate margin space (else this property will effectively be ignored). This causes a redraw of the component. A PropertyChange event ("margin") is sent to all listeners.

Parameters:
m - the space between the border and the text

getMargin

public java.awt.Insets getMargin()
Returns the margin between the text component's border and its text. If no margin has been set, a default value from the UI is returned.

Returns:
the margin

getRows

public int getRows()
Gets the number of rows to displayed in the underlying JTextArea

Returns:
the rowcount
See Also:
JTextArea.getRows()

setRows

public void setRows(int rows)
Sets the number of rows to be displayed in the underlying JTextArea

Parameters:
rows - the new rowcount
See Also:
javax.swing.JTextArea#setRows()

getSelectedTextColor

public java.awt.Color getSelectedTextColor()
Fetches the current color used to render the selected text.

Returns:
the color

setSelectedTextColor

public void setSelectedTextColor(java.awt.Color c)
Sets the current color used to render the selected text. Setting the color to null is the same as Color.black. Setting the color results in a PropertyChange event ("selectedTextColor") being fired.

Parameters:
c - the color
See Also:
getSelectedTextColor()

getSelectionColor

public java.awt.Color getSelectionColor()
Fetches the current color used to render the selection.

Returns:
the color

setSelectionColor

public void setSelectionColor(java.awt.Color c)
Sets the current color used to render the selection. Setting the color to null is the same as setting Color.white. Setting the color results in a PropertyChange event ("selectionColor").

Parameters:
c - the color
See Also:
getSelectionColor()

getSelectionEnd

public int getSelectionEnd()
Returns the selected text's end position. Return 0 if the document is empty, or the value of dot if there is no selection.

Returns:
the end position >= 0

setSelectionEnd

public void setSelectionEnd(int selectionEnd)
Sets the selection end to the specified position. The new end point is constrained to be at or after the current selection start.

This is available for backward compatiblitity to code that called this method on java.awt.TextComponent. This is implemented to forward to the Caret implementation which is where the actual selection is maintained.

Parameters:
selectionEnd - the end position of the text >= 0

getSelectionStart

public int getSelectionStart()
Returns the selected text's start position. Return 0 for an empty document, or the value of dot if no selection.

Returns:
the start position >= 0

setSelectionStart

public void setSelectionStart(int selectionStart)
Sets the selection start to the specified position. The new starting point is constrained to be before or at the current selection end.

This is available for backward compatiblitity to code that called this method on java.awt.TextComponent. This is implemented to forward to the Caret implementation which is where the actual selection is maintained.

Parameters:
selectionStart - the start position of the text >= 0

setTabSize

public void setTabSize(int size)
Sets the number of characters to expand tabs to. This will be multiplied by the maximum advance for variable width fonts. A PropertyChange event ("TabSize") is fired when the tab size changes.

Parameters:
size - number of characters to expand to
See Also:
getTabSize()

getTabSize

public int getTabSize()
Gets the number of characters used to expand tabs. If the document is null or doesn't have a tab setting, return a default of 8.

Returns:
the number of characters

setText

public void setText(java.lang.String t)
Sets the text of this TextAreaControl to the specified text. If the text is null or empty, has the effect of simply deleting the old text.

Parameters:
t - the new text to be set
See Also:
getText()

getText

public java.lang.String getText()
Returns the text contained in this TextAreaControl. If the underlying document is null, will give a NullPointerException.

Returns:
the text
See Also:
setText(java.lang.String)

setWrapStyleWord

public void setWrapStyleWord(boolean word)
Set the style of wrapping used if the text area is wrapping lines. If set to true the lines will be wrapped at word boundries (ie whitespace) if they are too long to fit within the allocated width. If set to false, the lines will be wrapped at character boundries.

Parameters:
word - indicates if word boundries should be used for line wrapping.
See Also:
#getWrapStyle

getWrapStyleWord

public boolean getWrapStyleWord()
Get the style of wrapping used if the text area is wrapping lines. If set to true the lines will be wrapped at word boundries (ie whitespace) if they are too long to fit within the allocated width. If set to false, the lines will be wrapped at character boundries.


getInfoBusName

public final java.lang.String getInfoBusName()
Returns the name of the InfoBus this control is connected to.

Most controls should delegate this method to ControlSupport.

Specified by:
getInfoBusName in interface Control
Returns:
The name of the InfoBus this control is connected to.
See Also:
ControlSupport.getInfoBusName()

setInfoBusName

public final void setInfoBusName(java.lang.String infoBusName)
Sets the name of the InfoBus this control is connected to.

If the named InfoBus does not exist, it is created automatically.

If the control is already connected to an InfoBus, it is disconnected first.

Most controls should delegate this method to ControlSupport.

Specified by:
setInfoBusName in interface Control
Parameters:
infoBusName - The name of the InfoBus to connect to.
See Also:
ControlSupport.setInfoBusName(java.lang.String)

getDataItemName

public final java.lang.String getDataItemName()
Returns the name of the InfoBus DataItem this control is bound to.

Most controls should delegate this method to ControlSupport.

Specified by:
getDataItemName in interface Control
Returns:
The name of the InfoBus DataItem this control is bound to, or null if the control is unbound.
See Also:
getDataItem(), ControlSupport.getDataItemName()

setDataItemName

public final void setDataItemName(java.lang.String dataItemName)
Sets the name of the InfoBus DataItem this control is bound to.

The DataItem with the given name is searched for on the InfoBus, and if found, is bound to this control.

If the control is already bound to a DataItem, it is unbound first.

Most controls should delegate this method to ControlSupport.

Specified by:
setDataItemName in interface Control
Parameters:
dataItemName - The name of the DataItem to bind to.
See Also:
getDataItem(), ControlSupport.setDataItemName(java.lang.String)

getDataItem

public final java.lang.Object getDataItem()
Returns the InfoBus DataItem this control is bound to.

Specified by:
getDataItem in interface Control
Returns:
The InfoBus DataItem this control is bound to, or null if the control is unbound.
See Also:
ControlSupport.getDataItem()

dataItemChanged

public final void dataItemChanged(java.lang.Object oldDataItem,
                                  java.lang.Object newDataItem)
Notifies the control that the bound InfoBus DataItem has changed.

The control can safely ignore this notification.

Specified by:
dataItemChanged in interface Control
Parameters:
oldDataItem - The formerly bound DataItem (can be null).
newDataItem - The newly bound DataItem (can be null).

getComponent

public final java.awt.Component getComponent()
Returns the AWT component associated with this control.

Specified by:
getComponent in interface Control
Returns:
The AWT component for this control.

getScrollPane

public final javax.swing.JScrollPane getScrollPane()
Returns the scrollpane used by the textarea control

Returns:
JScrollPane

isFocusValidated

public final boolean isFocusValidated()
Determines whether focus into this control causes validation to occur.

Most controls should delegate this method to ControlSupport.

Specified by:
isFocusValidated in interface Control
Returns:
true if focus into this control causes validation to occur, false otherwise.
See Also:
ControlSupport.isFocusValidated()

setFocusValidated

public final void setFocusValidated(boolean focusValidated)
Sets whether focus into this control causes validation to occur.

Delegates to ControlSupport.

Specified by:
setFocusValidated in interface Control
Parameters:
focusValidated - If true, focus into this control will cause validation to occur.
See Also:
ControlSupport.setFocusValidated(boolean)

addNavigatedListener

public final void addNavigatedListener(NavigatedListener listener)
Adds a navigated listener to this control.

The listener will be notified of NavigateIn and NavigateOut events.

Delegates to ControlSupport.

Specified by:
addNavigatedListener in interface Control
Parameters:
listener - The listener to add.
See Also:
ControlSupport.addNavigatedListener(oracle.dacf.control.NavigatedListener)

removeNavigatedListener

public final void removeNavigatedListener(NavigatedListener listener)
Removes a navigated listener from this control.

Specified by:
removeNavigatedListener in interface Control
Parameters:
listener - The listener to remove.
See Also:
ControlSupport.removeNavigatedListener(oracle.dacf.control.NavigatedListener)

processNavigatedEvent

public final void processNavigatedEvent(NavigatedEvent event)
Processes a navigated event for this control.

This method is for use by the NavigationManager only.

Specified by:
processNavigatedEvent in interface Control
Parameters:
event - The navigated event.
See Also:
ControlSupport.processNavigatedEvent(oracle.dacf.control.NavigatedEvent)

addNavigatingListener

public final void addNavigatingListener(NavigatingListener listener)
Adds a navigating listener to this control.

The listener will be notified of NavigatingEvents.

Specified by:
addNavigatingListener in interface Control
Parameters:
listener - The listener to add.
See Also:
ControlSupport.addNavigatedListener(oracle.dacf.control.NavigatedListener)

removeNavigatingListener

public final void removeNavigatingListener(NavigatingListener listener)
Removes a previusly added navigating listener

Specified by:
removeNavigatingListener in interface Control
Parameters:
listener - The listener to remove.
See Also:
ControlSupport.removeNavigatedListener(oracle.dacf.control.NavigatedListener)

processNavigatingEvent

public final void processNavigatingEvent(NavigatingEvent event)
                                  throws NavigatingException
Processes a navigating event for this control.

This method is for use by the NavigationManager only.

Specified by:
processNavigatingEvent in interface Control
Parameters:
event - The navigating event.
Throws:
NavigatingException - Indicates navigation was rejected.
See Also:
ControlSupport.processNavigatedEvent(oracle.dacf.control.NavigatedEvent)

dataItemValueChanged

public final void dataItemValueChanged(javax.infobus.DataItemValueChangedEvent event)
Indicates a changed value in the bound data item.

A reference to the data item that changed can be obtained from the event.

Specified by:
dataItemValueChanged in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains change information.
See Also:
DataItemChangeListener.dataItemValueChanged(javax.infobus.DataItemValueChangedEvent)

dataItemAdded

public final void dataItemAdded(javax.infobus.DataItemAddedEvent event)
Indicates that a new item was added to the bound aggregate data item (e.g. ArrayAccess, a JDK Collection, etc).

A reference to the data item that was added, and a reference to the one that gained it, can be obtained from the event.

Specified by:
dataItemAdded in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains details of the addition.
See Also:
DataItemChangeListener.dataItemAdded(javax.infobus.DataItemAddedEvent)

dataItemDeleted

public final void dataItemDeleted(javax.infobus.DataItemDeletedEvent event)
Indicates that an item was deleted from the bound aggregate data item (e. g. ArrayAccess, a JDK Collection, etc).

A reference to the data item that was deleted, and a reference to the one that lost it, can be obtained from the event.

Specified by:
dataItemDeleted in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains details of the deletion.
See Also:
DataItemChangeListener.dataItemDeleted(javax.infobus.DataItemDeletedEvent)

dataItemRevoked

public final void dataItemRevoked(javax.infobus.DataItemRevokedEvent event)
Indicates that the bound data item (and its sub-items, if any) has been revoked, and is temporarily unavailable.

A reference to the data item that was revoked can be obtained from the event.

Specified by:
dataItemRevoked in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains details of the revoked data.
See Also:
DataItemChangeListener.dataItemRevoked(javax.infobus.DataItemRevokedEvent)

rowsetCursorMoved

public final void rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent event)
Indicates that the cursor for the bound RowsetAccess data item has changed rows.

A reference to the rowset data item can be obtained from the event.

Specified by:
rowsetCursorMoved in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains details of the cursor move.
See Also:
DataItemChangeListener.rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent)

getValueAsString

public java.lang.String getValueAsString()
Gets the entered text as a String.

Specified by:
getValueAsString in interface javax.infobus.ImmediateAccess
Returns:
Text entered in the control

getValueAsObject

public java.lang.Object getValueAsObject()
Gets the entered text as an Object.

Specified by:
getValueAsObject in interface javax.infobus.ImmediateAccess
Returns:
Text entered in the control

getPresentationString

public java.lang.String getPresentationString(java.util.Locale locale)
Gets the entered text as an String.

Specified by:
getPresentationString in interface javax.infobus.ImmediateAccess
Returns:
Text entered in the control

setValue

public void setValue(java.lang.Object newValue)
              throws javax.infobus.InvalidDataException
This method is not supported and always throws an exception

Specified by:
setValue in interface javax.infobus.ImmediateAccess
Throws:
javax.infobus.InvalidDataException - Always thrown

focusLost

public void focusLost(java.awt.event.FocusEvent event)
This method is an implementaion side effect

Specified by:
focusLost in interface java.awt.event.FocusListener

focusGained

public void focusGained(java.awt.event.FocusEvent event)
This method is an implementaion side effect

Specified by:
focusGained in interface java.awt.event.FocusListener

applyEdits

public void applyEdits()
Specified by:
applyEdits in interface ApplyEditsListener

cancelEdits

public void cancelEdits()
Specified by:
cancelEdits in interface ApplyEditsListener

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.