|
|||||||||
| Home >> All >> com >> flexstor >> common >> awt >> [ field overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.flexstor.common.awt.field
Class ComboField

java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
com.flexstor.common.awt.field.ComboField
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, com.flexstor.common.constants.FieldConstantsI, com.flexstor.common.awt.event.FlexTextListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable
- public class ComboField
- extends java.awt.Panel
- implements com.flexstor.common.awt.event.FlexTextListener, java.awt.event.MouseListener, com.flexstor.common.constants.FieldConstantsI, java.awt.event.ActionListener
- extends java.awt.Panel
ComboField is a self configuring TextField/Choice that provides full data validation and case conversion. All edit events are sent as FlexTextEvent events, so that three different events (ItemEvent, ActionEvent, and TextEvent/KeyEvent) do not need to be caught.
- Version:
- 2.1
| Nested Class Summary |
| Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected com.flexstor.common.awt.ArrowButton |
arrow
|
protected boolean |
bAllowRepaint
|
private boolean |
bEnabled
|
protected boolean |
bExtendedEdit
|
protected boolean |
bPadChoice
Flag for choice padding. |
protected boolean |
bShowExtEdit
|
private boolean |
bVisualRequired
|
protected ComponentI |
field
Reference to the field object. |
private int |
nCase
|
private int |
nForcedLength
|
protected int |
nMode
The current mode, either ENTRY_TYPE_UNDEFINED, ENTRY_TYPE_TEXT_FIELD, or ENTRY_TYPE_CHOICE. |
private static int |
nPopupThreshold
|
protected java.lang.String |
sName
The name associated with this field. |
private java.lang.String |
sTextAreaText
|
private java.util.Vector |
textListeners
Text Listeners -- used for filtering of text events. |
| Fields inherited from class java.awt.Panel |
|
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface com.flexstor.common.constants.FieldConstantsI |
CASE_LOWER, CASE_NONE, CASE_PROPER, CASE_UNDEFINED, CASE_UPPER, DATA_NONE_ID, DATA_NONE_VALUE, ENTRY_TYPE_CHOICE, ENTRY_TYPE_TEXT_FIELD, ENTRY_TYPE_UNDEFINED, FIELD_FMT_DATE, FIELD_FMT_DATETIME, FIELD_FMT_TIME, FIELD_LENGTH_MAX, FIELD_TYPE_DATE, FIELD_TYPE_DATETIME, FIELD_TYPE_NUMBER, FIELD_TYPE_STRING, FIELD_TYPE_TIME, FIELD_TYPE_UNDEFINED, IDENTIFIER |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
ComboField(java.lang.String sName,
boolean bPadChoice)
Creates a new ComboField with the specified name. |
|
ComboField(java.lang.String sName,
boolean bPadChoice,
boolean bVisualRequired,
boolean bExtendedEdit)
Creates a new ComboField with the specified name. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
This method is invoked when an action occurs. |
void |
addTextListener(com.flexstor.common.awt.event.FlexTextListener l)
|
void |
cleanup()
|
private void |
cleanUp()
|
void |
clear(boolean bNotify)
This method will select the first item in the Choice box or clear out the text field. |
void |
configure(int nDataType,
int nEntryType,
int nLength,
int nCase,
boolean bRequired,
boolean bEditable,
java.lang.String sLabel)
Configures this field. |
void |
configure(int nDataType,
int nEntryType,
int nLength,
int nCase,
boolean bRequired,
boolean bEditable,
java.lang.String sLabel,
java.util.ArrayList alLookup)
Configures this field. |
void |
configure(int nDataType,
int nEntryType,
int nLength,
int nCase,
boolean bRequired,
boolean bEditable,
java.lang.String sLabel,
java.lang.String[] saLookup)
Configures this field. |
void |
enableRepaints(boolean bPaint)
|
private java.lang.String |
fixupLabel(java.lang.String sLabel)
Removes invalid characters from the label. |
void |
formatCase()
|
boolean |
getEnabled()
|
long |
getId()
|
java.awt.Dimension |
getMinimumSize()
Returns the minimum size of this container. |
int |
getMode()
|
java.lang.String |
getName()
Returns the name of this field. |
private java.awt.Frame |
getParentFrame()
|
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of this container. |
int |
getSelectedIndex()
|
java.lang.String |
getText()
|
boolean |
isBlank()
|
boolean |
isRequired()
|
boolean |
isShowing()
Tests whether or not this component is actually being shown on the screen. |
java.awt.Dimension |
minimumSize()
Returns the minimum size of this container. |
void |
mouseClicked(java.awt.event.MouseEvent e)
This method is called when the mouse is clicked (pressed and released in short succession) on a component. |
void |
mouseEntered(java.awt.event.MouseEvent e)
This method is called when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent e)
This method is called when the mouse exits a component. |
void |
mousePressed(java.awt.event.MouseEvent e)
This method is called when the mouse is pressed over a component. |
void |
mouseReleased(java.awt.event.MouseEvent e)
This method is called when the mouse is released over a component. |
void |
paint(java.awt.Graphics g)
Paints this container. |
private void |
popupExtDialog()
|
java.awt.Dimension |
preferredSize()
Returns the preferred size of this container. |
boolean |
quietVerify()
|
void |
removeTextListener(com.flexstor.common.awt.event.FlexTextListener l)
|
void |
requestFocus()
Request that this Component be given the keyboard input focus and that its top-level ancestor become the focused Window. |
void |
setCustomValidator(com.flexstor.common.parsers.ValidatorI validator)
|
void |
setEnabled(boolean bEdit)
Conditionally enables/disables this field. |
void |
setId(long nId)
|
void |
setItems(java.util.ArrayList alItems)
|
void |
setOptimumSize(int nMaxFieldWidth)
|
void |
setPreferredWidth(int nWidth)
|
void |
setRequired(boolean bRequired)
|
void |
setText(java.lang.String sText)
|
void |
textValueChangeBegin(com.flexstor.common.awt.event.FlexTextEvent e)
|
void |
textValueChangeEnd(com.flexstor.common.awt.event.FlexTextEvent e)
|
boolean |
verify(boolean bCheckRequired)
Checks if the field is required. |
| Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
nMode
protected int nMode
- The current mode, either ENTRY_TYPE_UNDEFINED, ENTRY_TYPE_TEXT_FIELD, or ENTRY_TYPE_CHOICE.
field
protected ComponentI field
- Reference to the field object.
sName
protected java.lang.String sName
- The name associated with this field.
bPadChoice
protected boolean bPadChoice
- Flag for choice padding.
bAllowRepaint
protected boolean bAllowRepaint
bVisualRequired
private boolean bVisualRequired
bExtendedEdit
protected boolean bExtendedEdit
bShowExtEdit
protected boolean bShowExtEdit
arrow
protected com.flexstor.common.awt.ArrowButton arrow
bEnabled
private boolean bEnabled
textListeners
private java.util.Vector textListeners
- Text Listeners -- used for filtering of text events.
sTextAreaText
private java.lang.String sTextAreaText
nCase
private int nCase
nPopupThreshold
private static int nPopupThreshold
nForcedLength
private int nForcedLength
| Constructor Detail |
ComboField
public ComboField(java.lang.String sName, boolean bPadChoice)
- Creates a new ComboField with the specified name.
ComboField
public ComboField(java.lang.String sName, boolean bPadChoice, boolean bVisualRequired, boolean bExtendedEdit)
- Creates a new ComboField with the specified name.
| Method Detail |
cleanup
public void cleanup()
getName
public java.lang.String getName()
- Returns the name of this field.
setEnabled
public void setEnabled(boolean bEdit)
- Conditionally enables/disables this field.
getEnabled
public boolean getEnabled()
configure
public void configure(int nDataType,
int nEntryType,
int nLength,
int nCase,
boolean bRequired,
boolean bEditable,
java.lang.String sLabel)
- Configures this field.
configure
public void configure(int nDataType,
int nEntryType,
int nLength,
int nCase,
boolean bRequired,
boolean bEditable,
java.lang.String sLabel,
java.lang.String[] saLookup)
- Configures this field.
configure
public void configure(int nDataType,
int nEntryType,
int nLength,
int nCase,
boolean bRequired,
boolean bEditable,
java.lang.String sLabel,
java.util.ArrayList alLookup)
- Configures this field.
setItems
public void setItems(java.util.ArrayList alItems)
setPreferredWidth
public void setPreferredWidth(int nWidth)
getMinimumSize
public java.awt.Dimension getMinimumSize()
- Description copied from class:
java.awt.Container - Returns the minimum size of this container.
getPreferredSize
public java.awt.Dimension getPreferredSize()
- Description copied from class:
java.awt.Container - Returns the preferred size of this container.
minimumSize
public java.awt.Dimension minimumSize()
- Description copied from class:
java.awt.Container - Returns the minimum size of this container.
preferredSize
public java.awt.Dimension preferredSize()
- Description copied from class:
java.awt.Container - Returns the preferred size of this container.
setText
public void setText(java.lang.String sText)
getText
public java.lang.String getText()
setId
public void setId(long nId)
getId
public long getId()
getSelectedIndex
public int getSelectedIndex()
setRequired
public void setRequired(boolean bRequired)
isRequired
public boolean isRequired()
clear
public void clear(boolean bNotify)
- This method will select the first item in the Choice box or clear out the text field.
verify
public boolean verify(boolean bCheckRequired)
- Checks if the field is required.
quietVerify
public boolean quietVerify()
formatCase
public void formatCase()
setCustomValidator
public void setCustomValidator(com.flexstor.common.parsers.ValidatorI validator)
requestFocus
public void requestFocus()
- Description copied from class:
java.awt.Component - Request that this Component be given the keyboard input focus and
that its top-level ancestor become the focused Window.
For the request to be granted, the Component must be focusable,
displayable and showing and the top-level Window to which it
belongs must be focusable. If the request is initially denied on
the basis that the top-level Window is not focusable, the request
will be remembered and granted when the Window does become
focused.
Never assume that this Component is the focus owner until it
receives a FOCUS_GAINED event.
The behaviour of this method is platform-dependent.
Component.requestFocusInWindow()>
Component.requestFocusInWindow()55 should be used instead.
enableRepaints
public void enableRepaints(boolean bPaint)
paint
public void paint(java.awt.Graphics g)
- Description copied from class:
java.awt.Container - Paints this container. The implementation of this method in this
class forwards to any lightweight components in this container. If
this method is subclassed, this method should still be invoked as
a superclass method so that lightweight components are properly
drawn.
setOptimumSize
public void setOptimumSize(int nMaxFieldWidth)
textValueChangeBegin
public void textValueChangeBegin(com.flexstor.common.awt.event.FlexTextEvent e)
- Specified by:
textValueChangeBeginin interfacecom.flexstor.common.awt.event.FlexTextListener
textValueChangeEnd
public void textValueChangeEnd(com.flexstor.common.awt.event.FlexTextEvent e)
- Specified by:
textValueChangeEndin interfacecom.flexstor.common.awt.event.FlexTextListener
addTextListener
public void addTextListener(com.flexstor.common.awt.event.FlexTextListener l)
removeTextListener
public void removeTextListener(com.flexstor.common.awt.event.FlexTextListener l)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Description copied from interface:
java.awt.event.ActionListener - This method is invoked when an action occurs.
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
popupExtDialog
private void popupExtDialog()
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse is pressed over a component.
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse is clicked (pressed and released
in short succession) on a component.
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse enters a component.
- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse exits a component.
- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse is released over a component.
- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener
cleanUp
private void cleanUp()
getMode
public int getMode()
isBlank
public boolean isBlank()
getParentFrame
private java.awt.Frame getParentFrame()
isShowing
public boolean isShowing()
- Description copied from class:
java.awt.Component - Tests whether or not this component is actually being shown on
the screen. This will be true if and only if it this component is
visible and its parent components are all visible.
fixupLabel
private java.lang.String fixupLabel(java.lang.String sLabel)
- Removes invalid characters from the label.
|
|||||||||
| Home >> All >> com >> flexstor >> common >> awt >> [ field overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC