jbcl.control Package
java.lang.Object +----java.awt.Component +----java.awt.TextComponent +----java.awt.TextField +----com.borland.jbcl.control.MaskableTextItemEditor
Variables Constructors Properties Methods Event Listeners
Implements ItemEditor, ImageObserver, MenuContainer, Serializable
The MaskableTextItemEditor
component provides editor functionality and is used by the GridControl
, both for normal editing as well as editMask
editing. It implements the ItemEditor
interface, which declares the minimum behavior required to be an editor.
The MaskableTextItemEditor
extends the TextField
and takes over event handling so that it can handle things like keystrokes and mouse clicks during editMask
editing.
For an example of an application that uses the MaskableTextItemEditor
component, see the IntlDemo.jpr project file in the samples directory of your JBuilder installation. This application uses the MaskableTextItemEditor
component to perform locale-sensitive display and editing of data.
The MaskableTextItemEditor
is used by field control components to implement displayMask
and editMask
properties of column objects.
public MaskableTextItemEditor()Constructs a
MaskableTextItemEditor
object.
public MaskableTextItemEditor(ItemFormatter formatter, ItemEditMask editMasker)Constructs a
MaskableTextItemEditor
, specifying the ItemFormatter
to use for formatting the text and the edit mask to use.
Parameters:
formatter
ItemFormatter
used for formatting the text.
editMasker
public MaskableTextItemEditor(int alignment, Insets margins)Constructs a
MaskableTextItemEditor
object with the given alignment and margins.
Parameters:
alignment
com.borland.dx.text.Alignment
variables.
margins
Insets
object that defines the margins around the text.
public MaskableTextItemEditor(int alignment, Insets margins, ItemFormatter formatter, ItemEditMask editMasker)Constructs a
MaskableTextItemEditor
object with the given alignment and margins, the item formatter to format the text, and the edit mask to use.
Parameters:
alignment
com.borland.dx.text.Alignment
variables.
margins
Insets
object that defines the margins around the text.
formatter
ItemFormatter
used for formatting the text.
editMasker
public Component getComponent()Returns this
MaskableTextItemEditor
component.
public void setEditMasker(ItemEditMask editMasker)Sets a new edit mask. For information about how to create an edit mask, see String-based patterns (masks).
public ItemFormatter getFormatter()Returns the formatter object used.
public Object getValue()Returns the value in the field as a
Variant
..
protected void processFocusEvent(FocusEvent e)Sends a
FocusEvent
to all listeners. This method is used internally by other com.borland
classes. You should never use this method directly.
Overrides: java.awt.Component.processFocusEvent(FocusEvent)
protected void processKeyEvent(KeyEvent e)Sends a
KeyEvent
to all key-event listeners. This method is used internally by other com.borland
classes. You should never use this method directly.
Overrides: java.awt.Component.processKeyEvent(KeyEvent)
protected void processMouseEvent(MouseEvent e)Sends a
MouseEvent
to all mouse-event listeners. This method is used internally by other com.borland
classes. You should never use this method directly.
Overrides: java.awt.Component.processMouseEvent(MouseEvent)
protected void processMouseMotionEvent(MouseEvent e)Sends a
MouseMotionEvent
to all mouse-motion listeners. This method is used internally by other com.borland
classes. You should never use this method directly.
Overrides: java.awt.Component.processMouseMotionEvent(MouseEvent)
public void setEditMask(String editMask, int variantType, Locale locale)Sets the edit mask by calling
setEditMasker()
and passing to it a newly-constructed ItemEditMaskStr
object.
Parameters:
editMask
variantType
getValue()
method.
locale
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 addInputMethodListener(java.awt.event.InputMethodListener ) public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )
public synchronized void addKeyListener(java.awt.event.KeyListener ) public synchronized void removeKeyListener(java.awt.event.KeyListener )
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 addTextListener(java.awt.event.TextListener ) public synchronized void removeTextListener(java.awt.event.TextListener )