com.sibvisions.rad.ui.swing.impl.component
Class SwingTextArea

java.lang.Object
  extended by com.sibvisions.rad.ui.awt.impl.AwtResource<C>
      extended by com.sibvisions.rad.ui.awt.impl.AwtComponent<C>
          extended by com.sibvisions.rad.ui.awt.impl.AwtContainer<C>
              extended by com.sibvisions.rad.ui.swing.impl.SwingComponent<C>
                  extended by com.sibvisions.rad.ui.swing.impl.SwingScrollComponent<C,TC>
                      extended by com.sibvisions.rad.ui.swing.impl.component.SwingTextComponent<JVxScrollPane,javax.swing.JTextArea>
                          extended by com.sibvisions.rad.ui.swing.impl.component.SwingTextArea
All Implemented Interfaces:
java.awt.event.ComponentListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.util.EventListener, ILabel, ITextArea, ITextField, IAlignmentConstants, IComponent, IContainer, IResource, INamedObject

public class SwingTextArea
extends SwingTextComponent<JVxScrollPane,javax.swing.JTextArea>
implements ITextArea

The SwingTextArea is the ITextArea implementation for swing.

See Also:
ITextArea, JTextArea

Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.swing.impl.SwingScrollComponent
component
 
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtComponent
bComponentListener, bFocusListener, bKeyListener, bMouseListener, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, eventSource, factory, parent
 
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource
resource
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
SwingTextArea()
          Creates a new instance of SwingTextArea.
 
Method Summary
 int getColumns()
          Returns the number of columns in this ITextField.
 int getRows()
          Returns the number of rows in this ITextArea.
 boolean isAutoScroll()
          Gets whether automatic scrolling on text change is en/disabled.
 boolean isKeepHorizontalScrollPosition()
          Gets whether the horizontal position will be kept after auto scroll.
 boolean isWordWrap()
          Gets the current state of the word wrap mode.
 void setAutoScroll(boolean pAutoScroll)
          Sets automatic scrolling on text change en/disabled.
 void setColumns(int pColumns)
          Sets the number of columns in this ITextField, and then invalidate the layout.
 void setKeepHorizontalScrollPosition(boolean pKeepPosition)
          Sets whether the horizontal position should be kept after auto scroll.
 void setRows(int pRows)
          Sets the number of rows in this ITextArea, and then invalidate the layout.
 void setText(java.lang.String pText)
          Defines the single line of text this component will display.
 void setWordWrap(boolean pWordWrap)
          Sets the current state of the word wrap mode.
 
Methods inherited from class com.sibvisions.rad.ui.swing.impl.component.SwingTextComponent
getText, isBorderVisible, isEditable, selectAll, setBorderVisible, setEditable
 
Methods inherited from class com.sibvisions.rad.ui.swing.impl.SwingScrollComponent
addFocusListener, addKeyListener, addMouseListener, getBackground, getComponent, getCursor, getFont, getForeground, getName, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setForeground, setName, setTabIndex, setToolTipText
 
Methods inherited from class com.sibvisions.rad.ui.swing.impl.SwingComponent
capture
 
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtContainer
add, add, add, add, addIntern, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, removeIntern, setLayout, setLayoutIntern
 
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtComponent
addComponentListener, componentHidden, componentMoved, componentResized, componentShown, createImage, createMouseEvent, equals, eventComponentMoved, eventComponentResized, eventFocusGained, eventFocusLost, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, focusGained, focusLost, getBounds, getEventSource, getFactory, getHorizontalAlignment, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getParent, getPreferredSize, getSize, getStyle, getTabIndex, getVerticalAlignment, hashCode, invalidateLayout, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, setBounds, setEventSource, setFactory, setHorizontalAlignment, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setParent, setPreferredSize, setSize, setStyle, setVerticalAlignment, setVisible, validate
 
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource
getResource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.component.ITextField
isBorderVisible, isEditable, selectAll, setBorderVisible, setEditable
 
Methods inherited from interface javax.rad.ui.component.ILabel
getText
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventFocusGained, eventFocusLost, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getStyle, getTabIndex, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setStyle, setTabIndex, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.ui.IAlignmentConstants
getHorizontalAlignment, getVerticalAlignment, setHorizontalAlignment, setVerticalAlignment
 

Constructor Detail

SwingTextArea

public SwingTextArea()
Creates a new instance of SwingTextArea.

Method Detail

getColumns

public int getColumns()
Returns the number of columns in this ITextField.

Specified by:
getColumns in interface ITextField
Returns:
the number of columns >= 0

setColumns

public void setColumns(int pColumns)
Sets the number of columns in this ITextField, and then invalidate the layout.

Specified by:
setColumns in interface ITextField
Parameters:
pColumns - the number of columns >= 0

getRows

public int getRows()
Returns the number of rows in this ITextArea.

Specified by:
getRows in interface ITextArea
Returns:
the number of columns >= 0

setRows

public void setRows(int pRows)
Sets the number of rows in this ITextArea, and then invalidate the layout.

Specified by:
setRows in interface ITextArea
Parameters:
pRows - the number of rows >= 0

isWordWrap

public boolean isWordWrap()
Gets the current state of the word wrap mode.

Specified by:
isWordWrap in interface ITextArea
Returns:
the current state of the word wrap mode.

setWordWrap

public void setWordWrap(boolean pWordWrap)
Sets the current state of the word wrap mode.

Specified by:
setWordWrap in interface ITextArea
Parameters:
pWordWrap - the current state of the word wrap mode.

setText

public void setText(java.lang.String pText)
Defines the single line of text this component will display. If the value of text is null or empty string, nothing is displayed.

Specified by:
setText in interface ILabel
Overrides:
setText in class SwingTextComponent<JVxScrollPane,javax.swing.JTextArea>
Parameters:
pText - the text

setAutoScroll

public void setAutoScroll(boolean pAutoScroll)
Sets automatic scrolling on text change en/disabled.

Parameters:
pAutoScroll - true to enable auto-scrolling on text change, false otherwise

isAutoScroll

public boolean isAutoScroll()
Gets whether automatic scrolling on text change is en/disabled.

Returns:
true if enabled, false otherwise

setKeepHorizontalScrollPosition

public void setKeepHorizontalScrollPosition(boolean pKeepPosition)
Sets whether the horizontal position should be kept after auto scroll.

Parameters:
pKeepPosition - true to keep the position, false otherwise

isKeepHorizontalScrollPosition

public boolean isKeepHorizontalScrollPosition()
Gets whether the horizontal position will be kept after auto scroll.

Returns:
true if position will be kept, false otherwise


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.