jbcl.control Package
java.lang.Object +----java.awt.Component +----java.awt.Container +----javax.swing.JComponent +----com.borland.jbcl.view.BeanPanel +----com.borland.jbcl.view.FieldView +----com.borland.jbcl.control.FieldControl +----com.borland.jbcl.control.ImageControl
Variables Constructors Properties Methods Event Listeners
Implements AccessListener, ColumnAware, DataChangeListener, DataSetAware, ItemEditSite, ItemPaintSite, SingletonModel, SingletonModelListener, WritableSingletonModel, BlackBox, SingletonModelView, SingletonView, FocusListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener
The FieldControl
component displays a single value of
any data type. Use a FieldControl
when you want to
display a single value in your application. This value can be any
single value by itself, or a value stored in a DataSet
.
FieldControl
is a composite component that follows
the model-view architecture and uses a singleton data model. Use
the singleton data model if you want to display a specified
value. The string is specified in the text
property.
The FieldControl
can also derive its value from a DataSet
.
In such cases, the data source of this value is specified by its columnName
and dataSet
properties. The current row position of the DataSet
determines the row from which the specified Column
value
is extracted.
FieldControl
inherits much of its appearance and
behavior from the FieldView
component. For example, FieldView
contributes alignment
, autoEdit
, selectable
,
and many other properties. FieldView
also provides
several methods. For more information, see FieldView
.
If you need to display a specified string only and don't need
a composite or data-aware control, consider using the
TextControl
component instead. If you want a composite, data-aware control
that can display a string only, consider the
TextFieldControl
component.
protected boolean addNotifyCalled
protected String columnName
protected DataSet dataSet
protected String textureName
public FieldControl()
Constructs a FieldControl
component with properties
set to default values.
public String getColumnName() public void setColumnName(String newColumnName)
Stores the string name of the Column
in the DataSet
which contains the data to display in the FieldControl
.
See also: dataSet
public DataSet getDataSet() public void setDataSet(DataSet newDataSet)
Specifies the com.borland.dx.dataset.DataSet
object that contains the data to display in the FieldControl
.
The value from the current row and column of the DataSet
is used.
public void setModel(SingletonModel model)
The singleton model object for the FieldControl
.
public synchronized String getText() public synchronized void setText(String text)
The string text to display in the FieldControl
.
public String getTextureName() public void setTextureName(String path)Determines the name of the
Image
file that is tiled on the background of the control to give the appearance of texture. Specify the file name and directory using the path
parameter.
public void addNotify()
Overrides: java.awt.Panel.addNotify()
protected void processKeyPressed(KeyEvent e)
Parameters:
e
KeyEvent
event object.
Overrides: com.borland.jbcl.view.FieldView.processKeyPressed(KeyEvent)
public synchronized void addActionListener(ActionListener l) public synchronized void removeActionListener(ActionListener l)
public void addAncestorListener(javax.swing.event.AncestorListener ) public void removeAncestorListener(javax.swing.event.AncestorListener )
public synchronized void addComponentListener(java.awt.event.ComponentListener ) public synchronized void removeComponentListener(java.awt.event.ComponentListener )
public synchronized void addContainerListener(java.awt.event.ContainerListener ) public synchronized void removeContainerListener(java.awt.event.ContainerListener )
public synchronized void addCustomItemListener(CustomItemListener l) public synchronized void removeCustomItemListener(CustomItemListener l)
public synchronized void addFocusListener(java.awt.event.FocusListener ) public synchronized void removeFocusListener(java.awt.event.FocusListener )
public synchronized void addInputMethodListener(java.awt.event.InputMethodListener ) public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )
public void addKeyListener(KeyListener l) public void removeKeyListener(KeyListener l)
public void addModelListener(SingletonModelListener l) public void removeModelListener(SingletonModelListener l)
public synchronized void addMouseListener(java.awt.event.MouseListener ) public synchronized void removeMouseListener(java.awt.event.MouseListener )
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener ) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )
public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener ) public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )
public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener ) public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )