com.sibvisions.rad.ui.swing.impl.component
Class SwingTextComponent<C extends javax.swing.JComponent,TC extends javax.swing.text.JTextComponent>
java.lang.Object
com.sibvisions.rad.ui.awt.impl.AwtResource<C>
com.sibvisions.rad.ui.awt.impl.AwtComponent<C>
com.sibvisions.rad.ui.awt.impl.AwtContainer<C>
com.sibvisions.rad.ui.swing.impl.SwingComponent<C>
com.sibvisions.rad.ui.swing.impl.SwingScrollComponent<C,TC>
com.sibvisions.rad.ui.swing.impl.component.SwingTextComponent<C,TC>
- Type Parameters:
C
- the added resourceTC
- the text component
- All Implemented Interfaces:
- java.awt.event.ComponentListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.util.EventListener, ILabel, ITextField, IAlignmentConstants, IComponent, IContainer, IResource, INamedObject
- Direct Known Subclasses:
- SwingTextArea, SwingTextField
public abstract class SwingTextComponent<C extends javax.swing.JComponent,TC extends javax.swing.text.JTextComponent>
- extends SwingScrollComponent<C,TC>
- implements ITextField
Platform and technology independent TextField definition.
It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .
- See Also:
TextField
,
JTextField
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 |
Constructor Summary |
protected |
SwingTextComponent(C pComponent)
Creates a new instance of SwingTextField . |
Method Summary |
java.lang.String |
getText()
Returns the text string that the label displays. |
boolean |
isBorderVisible()
Returns whether the the border of the text field is visible. |
boolean |
isEditable()
Returns the boolean indicating whether this
ITextField is editable or not. |
void |
selectAll()
Selects the whole text, and sets the caret position to the end. |
void |
setBorderVisible(boolean pVisible)
Sets the border of the text field visible or invisible. |
void |
setEditable(boolean pEditable)
Sets the specified boolean to indicate whether or not this
ITextField should be editable. |
void |
setText(java.lang.String pText)
Defines the single line of text this component will display. |
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.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 java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
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 |
SwingTextComponent
protected SwingTextComponent(C pComponent)
- Creates a new instance of
SwingTextField
.
- Parameters:
pComponent
- instance of the component
getText
public java.lang.String getText()
- Returns the text string that the label displays.
- Specified by:
getText
in interface ILabel
- Returns:
- a String
- See Also:
ILabel.setText(java.lang.String)
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
- Parameters:
pText
- the text
setEditable
public void setEditable(boolean pEditable)
- Sets the specified boolean to indicate whether or not this
ITextField
should be editable.
- Specified by:
setEditable
in interface ITextField
- Parameters:
pEditable
- the boolean to be set
isEditable
public boolean isEditable()
- Returns the boolean indicating whether this
ITextField
is editable or not.
- Specified by:
isEditable
in interface ITextField
- Returns:
- the boolean value
- See Also:
ITextField.setEditable(boolean)
setBorderVisible
public void setBorderVisible(boolean pVisible)
- Sets the border of the text field visible or invisible.
- Specified by:
setBorderVisible
in interface ITextField
- Parameters:
pVisible
- true
to set the border visible or false
to hide
the border
isBorderVisible
public boolean isBorderVisible()
- Returns whether the the border of the text field is visible.
- Specified by:
isBorderVisible
in interface ITextField
- Returns:
true
if the border is visible, false
if the border is invisible
selectAll
public void selectAll()
- Selects the whole text, and sets the caret position to the end.
- Specified by:
selectAll
in interface ITextField
Copyright © 2009 SIB Visions GmbH. All Rights Reserved.