|
|||||||||
| 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 FlexChoice

java.lang.Objectjava.awt.Component
java.awt.Choice
com.flexstor.common.awt.field.FlexChoice
- All Implemented Interfaces:
- javax.accessibility.Accessible, ComponentI, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable
- Direct Known Subclasses:
- ActionChoice
- public class FlexChoice
- extends java.awt.Choice
- implements java.awt.event.ItemListener, ComponentI
- extends java.awt.Choice
FlexChoice extends choice by providing for: 1. The ability to add a list of items at one time with the construstor. 2. The setItems() method which clears the choice and adds a list of items. 3. Auto padding automatically handled. This means that the first item in the choice is always a space. This option must be selected in the constructor. 4. Keeping an associated id to each item value in the list of choices.
| Nested Class Summary |
| Nested classes inherited from class java.awt.Choice |
java.awt.Choice.AccessibleAWTChoice |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
private java.util.ArrayList |
alItems
The list of lookup items (value,id pairs) for this choice. |
private boolean |
bPadChoice
A string with a single space is added as the first item to the choice when true. |
private boolean |
bRequired
|
private boolean |
bTabbable
If set to false, then this choice does not support tabbing. |
private static java.awt.FontMetrics |
metrics
|
private long |
nLastValueId
|
private int |
nMaxLength
The preferred length of the items in this choice. |
private java.lang.String |
sLastValue
The currently valid selected item. |
private java.util.Vector |
textListeners
Text Listeners -- used for filtering of text events. |
| Fields inherited from class java.awt.Choice |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface com.flexstor.common.awt.field.ComponentI |
COMBO_FIELD_HEIGHT, COMPONENT_HEIGHT, MAX_FIELD_LENGTH, TEXT_AREA_HEIGHT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
FlexChoice()
Creates an empty FlexChoice. |
|
FlexChoice(java.util.ArrayList alItems)
Creates a new FlexChoice containing the items saItems. |
|
FlexChoice(boolean bPadChoice)
Creates a new FlexChoice with the name sName and containing the items saItems. |
|
FlexChoice(java.lang.String[] saItems)
Creates a new FlexChoice containing the items saItems. |
|
FlexChoice(java.lang.String sName,
java.util.ArrayList alItems,
boolean bPadChoice)
Creates a new FlexChoice with the name sName and containing the items saItems. |
|
FlexChoice(java.lang.String sName,
java.lang.String[] saItems,
boolean bPadChoice)
Creates a new FlexChoice with the name sName and containing the items saItems. |
|
| Method Summary | |
void |
addItem(com.flexstor.common.disguise.LookupListItem item)
|
void |
addItem(java.lang.String sItem)
Adds the specified item to this choice box. |
void |
addNotify()
Creates the native peer for this object. |
void |
addTextListener(com.flexstor.common.awt.event.FlexTextListener l)
|
void |
cleanup()
|
void |
clear(boolean bNotify)
Selects the first item in the choice. |
void |
configure(boolean bEditable,
boolean bRequired,
java.lang.String sLabel,
java.util.ArrayList alItems)
Configures the validator field. |
void |
configure(boolean bEditable,
boolean bRequired,
java.lang.String sLabel,
java.lang.String[] saItems)
Configures the validator field. |
void |
formatCase()
Not implemented until this choice supports editing. |
boolean |
getEnabled()
Returns true if this choice is enabled. |
long |
getId()
|
java.awt.Dimension |
getMinimumSize()
Returns the component's minimum size. |
private java.awt.Frame |
getParentFrame()
|
java.awt.Dimension |
getPreferredSize()
Returns the component's preferred size. |
java.lang.String |
getText()
Returns the contents of the upper part of the choice. |
void |
insert(com.flexstor.common.disguise.LookupListItem item,
int index)
|
void |
insert(java.lang.String sItem,
int index)
Inserts an item into this Choice. |
boolean |
isBlank()
|
boolean |
isFocusTraversable()
Overides isFocusTraversable in java.awt.Component. |
boolean |
isRequired()
|
void |
itemStateChanged(java.awt.event.ItemEvent ie)
This method is called when an item's state is changed. |
boolean |
quietVerify()
|
void |
removeAll()
Removes all of the objects from this choice box. |
void |
removeTextListener(com.flexstor.common.awt.event.FlexTextListener l)
|
void |
select(int pos)
Forces the item at the specified index to be selected. |
void |
select(java.lang.String str)
Forces the named item to be selected. |
void |
setCustomValidator(com.flexstor.common.parsers.ValidatorI validator)
Not implemented until this choice supports editing. |
void |
setFocusTraversable(boolean bState)
Sets the focusTraversable function. |
void |
setId(long nId)
|
void |
setItems(java.util.ArrayList alItems)
Adds an array of items to the choice. |
void |
setItems(java.lang.String[] saItems)
Adds an array of items to the choice. |
void |
setRequired(boolean bRequired)
|
void |
setText(java.lang.String sText)
Sets the contents of the upper part of the choice. |
boolean |
verify(boolean bCheckRequired)
|
| Methods inherited from class java.awt.Choice |
add, addItemListener, countItems, getAccessibleContext, getItem, getItemCount, getItemListeners, getListeners, getSelectedIndex, getSelectedItem, getSelectedObjects, paramString, processEvent, processItemEvent, remove, remove, removeItemListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.flexstor.common.awt.field.ComponentI |
requestFocus, setBounds, setEnabled |
| Field Detail |
nMaxLength
private int nMaxLength
- The preferred length of the items in this choice.
bTabbable
private boolean bTabbable
- If set to false, then this choice does not support tabbing.
bPadChoice
private boolean bPadChoice
- A string with a single space is added as the first item to the choice when true.
textListeners
private java.util.Vector textListeners
- Text Listeners -- used for filtering of text events.
bRequired
private boolean bRequired
sLastValue
private java.lang.String sLastValue
- The currently valid selected item. May differ from actual selected value when between textValueChangeBegin()
and textValueChangeEnd() processing.
nLastValueId
private long nLastValueId
alItems
private java.util.ArrayList alItems
- The list of lookup items (value,id pairs) for this choice.
metrics
private static java.awt.FontMetrics metrics
| Constructor Detail |
FlexChoice
public FlexChoice()
- Creates an empty FlexChoice.
FlexChoice
public FlexChoice(java.util.ArrayList alItems)
- Creates a new FlexChoice containing the items saItems.
FlexChoice
public FlexChoice(java.lang.String[] saItems)
- Creates a new FlexChoice containing the items saItems.
FlexChoice
public FlexChoice(boolean bPadChoice)
- Creates a new FlexChoice with the name sName and containing the items saItems.
FlexChoice
public FlexChoice(java.lang.String sName, java.lang.String[] saItems, boolean bPadChoice)
- Creates a new FlexChoice with the name sName and containing the items saItems.
FlexChoice
public FlexChoice(java.lang.String sName, java.util.ArrayList alItems, boolean bPadChoice)
- Creates a new FlexChoice with the name sName and containing the items saItems.
| Method Detail |
configure
public void configure(boolean bEditable,
boolean bRequired,
java.lang.String sLabel,
java.lang.String[] saItems)
- Configures the validator field.
configure
public void configure(boolean bEditable,
boolean bRequired,
java.lang.String sLabel,
java.util.ArrayList alItems)
- Configures the validator field.
addItem
public void addItem(java.lang.String sItem)
- Description copied from class:
java.awt.Choice - Adds the specified item to this choice box.
This method is oboslete since Java 2 platform 1.1. Please use @see add
instead.
addItem
public void addItem(com.flexstor.common.disguise.LookupListItem item)
setItems
public void setItems(java.lang.String[] saItems)
- Adds an array of items to the choice.
setItems
public void setItems(java.util.ArrayList alItems)
- Adds an array of items to the choice.
removeAll
public void removeAll()
- Description copied from class:
java.awt.Choice - Removes all of the objects from this choice box.
insert
public void insert(java.lang.String sItem, int index)
- Description copied from class:
java.awt.Choice - Inserts an item into this Choice. Existing items are shifted
upwards. If the new item is the only item, then it is selected.
If the currently selected item is shifted, then the first item is
selected. If the currently selected item is not shifted, then it
remains selected.
insert
public void insert(com.flexstor.common.disguise.LookupListItem item, int index)
clear
public void clear(boolean bNotify)
- Selects the first item in the choice.
- Specified by:
clearin interfaceComponentI
cleanup
public void cleanup()
- Specified by:
cleanupin interfaceComponentI
addNotify
public void addNotify()
- Description copied from class:
java.awt.Choice - Creates the native peer for this object.
setFocusTraversable
public void setFocusTraversable(boolean bState)
- Sets the focusTraversable function.
isFocusTraversable
public boolean isFocusTraversable()
- Overides isFocusTraversable in java.awt.Component.
This choice supports tabbing only if it is enabled, showing on the
screen, and setFocusTraversable(false) was not called.
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent ie)
- Description copied from interface:
java.awt.event.ItemListener - This method is called when an item's state is changed.
- Specified by:
itemStateChangedin interfacejava.awt.event.ItemListener
getEnabled
public boolean getEnabled()
- Returns true if this choice is enabled.
- Specified by:
getEnabledin interfaceComponentI
setText
public void setText(java.lang.String sText)
- Sets the contents of the upper part of the choice. Automatically handles padding.
- Specified by:
setTextin interfaceComponentI
getText
public java.lang.String getText()
- Returns the contents of the upper part of the choice. Automatically handles padding.
- Specified by:
getTextin interfaceComponentI
setId
public void setId(long nId)
- Specified by:
setIdin interfaceComponentI
getId
public long getId()
- Specified by:
getIdin interfaceComponentI
select
public void select(int pos)
- Description copied from class:
java.awt.Choice - Forces the item at the specified index to be selected.
select
public void select(java.lang.String str)
- Description copied from class:
java.awt.Choice - Forces the named item to be selected.
verify
public boolean verify(boolean bCheckRequired)
- Specified by:
verifyin interfaceComponentI
getParentFrame
private java.awt.Frame getParentFrame()
formatCase
public void formatCase()
- Not implemented until this choice supports editing.
- Specified by:
formatCasein interfaceComponentI
setCustomValidator
public void setCustomValidator(com.flexstor.common.parsers.ValidatorI validator)
- Not implemented until this choice supports editing.
- Specified by:
setCustomValidatorin interfaceComponentI
quietVerify
public boolean quietVerify()
- Specified by:
quietVerifyin interfaceComponentI
isBlank
public boolean isBlank()
- Specified by:
isBlankin interfaceComponentI
isRequired
public boolean isRequired()
- Specified by:
isRequiredin interfaceComponentI
setRequired
public void setRequired(boolean bRequired)
- Specified by:
setRequiredin interfaceComponentI
getMinimumSize
public java.awt.Dimension getMinimumSize()
- Description copied from class:
java.awt.Component - Returns the component's minimum size.
- Specified by:
getMinimumSizein interfaceComponentI
getPreferredSize
public java.awt.Dimension getPreferredSize()
- Description copied from class:
java.awt.Component - Returns the component's preferred size.
- Specified by:
getPreferredSizein interfaceComponentI
addTextListener
public void addTextListener(com.flexstor.common.awt.event.FlexTextListener l)
removeTextListener
public void removeTextListener(com.flexstor.common.awt.event.FlexTextListener l)
|
|||||||||
| 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