borland Packages Class Hierarchy jbcl.view Package Index
java.lang.Object +----java.awt.Component +----java.awt.TextComponent +----java.awt.TextField +----borland.jbcl.view.TextFieldView +----borland.jbcl.control.TextFieldControl
Variables Constructors Properties Methods Event Listeners
Implements SingletonModelListener, SingletonModelView, ImageObserver, MenuContainer, Serializable, EventListener
The TextFieldView component is a view element for developing new composite components that display a single line of text.
The text displayed in the field comes from a SingletonModel data model.
To change the data in the field, set the text property. The readOnly property determines whether the text can be modified.
protected boolean locateOnly
protected transient SingletonModel model
protected transient SingletonModelMulticaster modelMulticaster
protected boolean postOnFocusLost
Specifies whether changes to the data displayed in the component are posted to the model whenever the component loses focus.
protected boolean readOnly
protected transient WritableSingletonModel writeModel
public TextFieldView()
Constructs a TextFieldView. Calls java.awt.TextField(), then enables AWT focus and key events.
public SingletonModel getModel() public void setModel(borland.jbcl.model.SingletonModel sm)
Specifies the model object that manages the component's data item.
public boolean isPostOnFocusLost() public void setPostOnFocusLost(boolean post)
Specifies whether changes to the data displayed in the component are posted to the model whenever the component loses focus.
public boolean isReadOnly() public void setReadOnly(boolean ro)
Specifies whether the user may change the data displayed in the component at runtime. readOnly also returns true if the model is not writable.
public void setText(java.lang.String text)Sets the text String that appears in the field view.
public WritableSingletonModel getWriteModel()
Read-only property that specifies the model object used for writing data. writeModel is null if readOnly is true or the model is not writable.
public boolean canSet(boolean startingEdit)Determines if an edit session is beginning so the text in the field can be set. If canSet() returns true, the field can be edited; otherwise, it cannot.
Parameters:
protected void postText()
Posts (writes) data displayed in the component to the data item in the model.
protected void processFocusEvent(java.awt.event.FocusEvent e)Handles the posting of changed data when the component loses focus, if postOnFocusLost is true.
Parameters:
Overrides: java.awt.Component.processFocusEvent(java.awt.event.FocusEvent)
protected void processKeyEvent(java.awt.event.KeyEvent e)Handles the the following keys when they are released:
Parameters:
Overrides: java.awt.Component.processKeyEvent(java.awt.event.KeyEvent)
protected void setSuperText(java.lang.String text)
protected void updateText()
Refreshes the display of the data in the component from the data item.
public synchronized void addActionListener(java.awt.event.ActionListener ) public synchronized void removeActionListener(java.awt.event.ActionListener )
public synchronized void addComponentListener(java.awt.event.ComponentListener ) public synchronized void removeComponentListener(java.awt.event.ComponentListener )
public synchronized void addFocusListener(java.awt.event.FocusListener ) public synchronized void removeFocusListener(java.awt.event.FocusListener )
public synchronized void addKeyListener(java.awt.event.KeyListener ) public synchronized void removeKeyListener(java.awt.event.KeyListener )
public void addModelListener(borland.jbcl.model.SingletonModelListener l) public void removeModelListener(borland.jbcl.model.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 addTextListener(java.awt.event.TextListener ) public void removeTextListener(java.awt.event.TextListener )