borland Packages Class Hierarchy jbcl.control Package Index
TextControl component
java.lang.Object
+----java.awt.Component
+----java.awt.Container
+----com.sun.java.swing.JComponent
+----borland.jbcl.control.TextControl
About the TextControl component
Variables Constructors Properties Methods Event Listeners
Implements BlackBox, ImageObserver, MenuContainer, Serializable
TextControl component is a lightweight component,
meaning that it descends from Component and has no
window handle and no peer. It displays a specified text string.
Set the text string with the text property. Use the alignment
property to align the text within the control, and the margins
property to specify the margins around the text. The drawEdge
and edgeColor properties affect how the edge is draw
around the text. Setting the transparent property to true
allows the TextControl to be painted so that
you can "see through" the control to the background
behind it.
To paint the control, call the paintComponent() method.
TextControl variables
Variables implemented in this class
TextControl constructors
TextControl properties
*Read-only properties **Write-only properties
Properties implemented in this class
TextControl methods
Methods implemented in this class
- addNotify()
- computeVisibleRect(java.awt.Rectangle)
- contains(int, int)
- createToolTip()
- firePropertyChange(java.lang.String, boolean, boolean)
- firePropertyChange(java.lang.String, byte, byte)
- firePropertyChange(java.lang.String, char, char)
- firePropertyChange(java.lang.String, double, double)
- firePropertyChange(java.lang.String, float, float)
- firePropertyChange(java.lang.String, int, int)
- firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
- firePropertyChange(java.lang.String, long, long)
- firePropertyChange(java.lang.String, short, short)
- fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)
- getActionForKeyStroke(com.sun.java.swing.KeyStroke)
- getBounds(java.awt.Rectangle)
- getClientProperty(java.lang.Object)
- getComponentGraphics(java.awt.Graphics)
- getConditionForKeyStroke(com.sun.java.swing.KeyStroke)
- getLocation(java.awt.Point)
- getSize(java.awt.Dimension)
- getToolTipLocation(java.awt.event.MouseEvent)
- getToolTipText(java.awt.event.MouseEvent)
- grabFocus()
- hasFocus()
- isLightweightComponent(java.awt.Component)
- paint(java.awt.Graphics)
- paintBorder(java.awt.Graphics)
- paintChildren(java.awt.Graphics)
- paintImmediately(int, int, int, int)
- paintImmediately(java.awt.Rectangle)
- processComponentKeyEvent(java.awt.event.KeyEvent)
- processFocusEvent(java.awt.event.FocusEvent)
- processKeyEvent(java.awt.event.KeyEvent)
- processMouseMotionEvent(java.awt.event.MouseEvent)
- putClientProperty(java.lang.Object, java.lang.Object)
- registerKeyboardAction(java.awt.event.ActionListener, com.sun.java.swing.KeyStroke, int)
- registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, com.sun.java.swing.KeyStroke, int)
- removeNotify()
- repaint(java.awt.Rectangle)
- repaint(long, int, int, int, int)
- requestDefaultFocus()
- requestFocus()
- resetKeyboardActions()
- reshape(int, int, int, int)
- revalidate()
- scrollRectToVisible(java.awt.Rectangle)
- setUI(com.sun.java.swing.plaf.ComponentUI)
- unregisterKeyboardAction(com.sun.java.swing.KeyStroke)
- updateUI()
- action(java.awt.Event, java.lang.Object)
- add(java.awt.PopupMenu)
- bounds()
- checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
- checkImage(java.awt.Image, java.awt.image.ImageObserver)
- contains(java.awt.Point)
- createImage(int, int)
- createImage(java.awt.image.ImageProducer)
- disable()
- disableEvents(long)
- dispatchEvent(java.awt.AWTEvent)
- enable()
- enable(boolean)
- enableEvents(long)
- getFontMetrics(java.awt.Font)
- gotFocus(java.awt.Event, java.lang.Object)
- handleEvent(java.awt.Event)
- hide()
- imageUpdate(java.awt.Image, int, int, int, int, int)
- inside(int, int)
- keyDown(java.awt.Event, int)
- keyUp(java.awt.Event, int)
- list()
- list(java.io.PrintStream)
- list(java.io.PrintWriter)
- location()
- lostFocus(java.awt.Event, java.lang.Object)
- mouseDown(java.awt.Event, int, int)
- mouseDrag(java.awt.Event, int, int)
- mouseEnter(java.awt.Event, int, int)
- mouseExit(java.awt.Event, int, int)
- mouseMove(java.awt.Event, int, int)
- mouseUp(java.awt.Event, int, int)
- move(int, int)
- nextFocus()
- paintAll(java.awt.Graphics)
- postEvent(java.awt.Event)
- prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
- prepareImage(java.awt.Image, java.awt.image.ImageObserver)
- printAll(java.awt.Graphics)
- processComponentEvent(java.awt.event.ComponentEvent)
- processMouseEvent(java.awt.event.MouseEvent)
- remove(java.awt.MenuComponent)
- repaint()
- repaint(int, int, int, int)
- repaint(long)
- resize(int, int)
- resize(java.awt.Dimension)
- setBounds(int, int, int, int)
- setLocation(int, int)
- setSize(int, int)
- show()
- show(boolean)
- size()
- toString()
- transferFocus()
- add(java.awt.Component)
- add(java.awt.Component, int)
- add(java.awt.Component, java.lang.Object)
- add(java.awt.Component, java.lang.Object, int)
- add(java.lang.String, java.awt.Component)
- addImpl(java.awt.Component, java.lang.Object, int)
- countComponents()
- deliverEvent(java.awt.Event)
- doLayout()
- getComponent(int)
- getComponentAt(int, int)
- getComponentAt(java.awt.Point)
- insets()
- invalidate()
- isAncestorOf(java.awt.Component)
- layout()
- list(java.io.PrintStream, int)
- list(java.io.PrintWriter, int)
- locate(int, int)
- minimumSize()
- paintComponents(java.awt.Graphics)
- paramString()
- preferredSize()
- print(java.awt.Graphics)
- printComponents(java.awt.Graphics)
- processContainerEvent(java.awt.event.ContainerEvent)
- processEvent(java.awt.AWTEvent)
- remove(int)
- remove(java.awt.Component)
- removeAll()
- validate()
- validateTree()
TextControl event listeners
TextControl variables
alignment
protected int alignment
drawEdge
protected boolean drawEdge
edgeColor
protected Color edgeColor
margins
protected Insets margins
text
protected String text
transparent
protected boolean transparent
drawEdge
protected boolean drawEdge
edgeColor
protected Color edgeColor
margins
protected Insets margins
text
protected String text
transparent
protected boolean transparent
TextControl constructors
TextControl()
public TextControl()
Constructs a TextControl with a size of 150 by 20
pixels.
TextControl(java.lang.String)
public TextControl(java.lang.String text)
Constructs a TextControl with a size of 150 by 20
pixels that displays the text specified with the text
parameter.
Parameters:
- text
- The text that control displays.
TextControl properties
alignment
public int getAlignment()
public void setAlignment(int align)
Determines the alignment of the text within the control. The
value of alignment must be one of the Alignment
variables.
drawEdge
public boolean isDrawEdge()
public void setDrawEdge(boolean drawEdge)
Determines whether an edge is drawn around the text. If true, an edge is
drawn around the text; if false, no edge is drawn.
edgeColor
public Color getEdgeColor()
public void setEdgeColor(java.awt.Color edgeColor)
Determines the color of the edge drawn around the text. Specify one of the
java.awt.Color variables.
margins
public Insets getMargins()
public void setMargins(java.awt.Insets margins)
Determines the size of the margins around the text in the
control.
preferredSize
public Dimension getPreferredSize()
Returns the preferred size of the control.
text
public String getText()
public void setText(java.lang.String text)
Determines the text that appears in the control.
transparent
public boolean isTransparent()
public void setTransparent(boolean transparent)
Determines whether the control is "transparent", so
that you can "see through" the control. If true, the control
is transparent; if false, the control is not transparent.
TextControl methods
paintComponent(java.awt.Graphics)
public void paintComponent(java.awt.Graphics g)
Paints or repaints the control.
Overrides:
com.sun.java.swing.JComponent.paintComponent(java.awt.Graphics)
update(java.awt.Graphics)
public void update(java.awt.Graphics g)
Overrides:
java.awt.Component.update(java.awt.Graphics)
TextControl event listeners
This component is a source for the following event sets.
For information on the standard AWT event sets, see Standard Java events.
ancestor
public void addAncestorListener(com.sun.java.swing.event.AncestorListener )
public void removeAncestorListener(com.sun.java.swing.event.AncestorListener )
component
public synchronized void addComponentListener(java.awt.event.ComponentListener )
public synchronized void removeComponentListener(java.awt.event.ComponentListener )
container
public synchronized void addContainerListener(java.awt.event.ContainerListener )
public void removeContainerListener(java.awt.event.ContainerListener )
focus
public synchronized void addFocusListener(java.awt.event.FocusListener )
public synchronized void removeFocusListener(java.awt.event.FocusListener )
key
public synchronized void addKeyListener(java.awt.event.KeyListener )
public synchronized void removeKeyListener(java.awt.event.KeyListener )
mouse
public synchronized void addMouseListener(java.awt.event.MouseListener )
public synchronized void removeMouseListener(java.awt.event.MouseListener )
mouseMotion
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )
propertyChange
public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )
vetoableChange
public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener )
public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )