|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JComboBox
org.compiere.swing.CComboBox
public class CComboBox
Compiere Colored Combo Box. By default, auto-reduction of choices is on and is not case sensitive. Editing the number of choices will always be passed through directly to the unfiltered ComboBoxModel.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComboBox |
|---|
JComboBox.AccessibleJComboBox, JComboBox.KeySelectionManager |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
AUTO_REDUCIBLE_PROPERTY
Property key for auto-reduction. |
static String |
CASE_SENSITIVE_PROPERTY
Property key for case sensitive auto-reduction. |
static int |
FIELD_HIGHT
Size |
| Fields inherited from class javax.swing.JComboBox |
|---|
actionCommand, dataModel, editor, isEditable, keySelectionManager, lightWeightPopupEnabled, maximumRowCount, renderer, selectedItemReminder |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CComboBox()
Creates a JComboBox with a default data model. |
|
CComboBox(ComboBoxModel aModel)
Creates a JComboBox that takes it's items from an
existing ComboBoxModel. |
|
CComboBox(Object[] items)
Creates a JComboBox that contains the elements
in the specified array. |
|
CComboBox(Object[] items,
String key)
Creates a JComboBox that contains the elements
in the specified array. |
|
CComboBox(Vector<?> items)
Creates a JComboBox that contains the elements
in the specified Vector. |
|
| Method Summary | |
|---|---|
void |
addMouseListener(MouseListener ml)
Add Mouse Listener - 1-4-0 Bug. |
boolean |
displayPopup()
Display Popup. |
ComboBoxModel |
getCompleteComboBoxModel()
Retrieves the complete and unfiltered ComboBoxModel. |
String |
getDisplay()
Return Display Value |
Object |
getValue()
Return Editor value |
boolean |
isAutoReducible()
Is the combo box auto-reducible? |
boolean |
isCaseSensitive()
Is the auto-reduction case sensitive? |
boolean |
isMandatory()
Is Field mandatory |
protected boolean |
isMatchingFilter(Object element)
Called only when auto-reducing. |
boolean |
isReadWrite()
Is it possible to edit |
static void |
main(String[] args)
Test |
void |
removeAllItems()
|
void |
removeMouseListener(MouseListener ml)
Remove Mouse Listener. |
void |
setActionCommand(String actionCommand)
Set Action Command |
void |
setAutoReducible(boolean autoreducible)
Set whether the combo box is auto-reducible. |
void |
setBackground(boolean error)
Set Background based on editable / mandatory / error |
void |
setBackground(Color bg)
Set Background |
void |
setCaseSensitive(boolean caseSensitive)
Set whether auto-reduction is case sensitive. |
void |
setIcon(Icon defaultIcon)
Set Icon of arrow button to icon |
void |
setMandatory(boolean mandatory)
Set Editor Mandatory |
void |
setModel(ComboBoxModel aModel)
|
void |
setOpaqueAll(boolean isOpaque)
Set All Opaque (incl. |
void |
setReadWrite(boolean rw)
Enable Editor |
void |
setUI(ComboBoxUI ui)
Set UI and re-set Icon for arrow button |
void |
setValue(Object value)
Set Editor to value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.compiere.swing.CEditor |
|---|
setVisible |
| Field Detail |
|---|
public static int FIELD_HIGHT
public static final String AUTO_REDUCIBLE_PROPERTY
public static final String CASE_SENSITIVE_PROPERTY
| Constructor Detail |
|---|
public CComboBox(ComboBoxModel aModel)
JComboBox that takes it's items from an
existing ComboBoxModel. Since the
ComboBoxModel is provided, a combo box created using
this constructor does not create a default combo box model and
may impact how the insert, remove and add methods behave.
aModel - the ComboBoxModel that provides the
displayed list of itemsDefaultComboBoxModelpublic CComboBox(Object[] items)
JComboBox that contains the elements
in the specified array. By default the first item in the array
(and therefore the data model) becomes selected.
items - an array of objects to insert into the combo boxDefaultComboBoxModel
public CComboBox(Object[] items,
String key)
JComboBox that contains the elements
in the specified array. By default the first item in the array
(and therefore the data model) becomes selected.
items - an array of objects to insert into the combo boxkey - set selected if existsDefaultComboBoxModelpublic CComboBox(Vector<?> items)
JComboBox that contains the elements
in the specified Vector. By default the first item in the vector
and therefore the data model) becomes selected.
items - an array of vectors to insert into the combo boxDefaultComboBoxModelpublic CComboBox()
JComboBox with a default data model.
The default data model is an empty list of objects.
Use addItem to add items. By default the first item
in the data model becomes selected.
DefaultComboBoxModel| Method Detail |
|---|
public void setIcon(Icon defaultIcon)
defaultIcon - Icon to be displayedpublic ComboBoxModel getCompleteComboBoxModel()
public void setModel(ComboBoxModel aModel)
setModel in class JComboBoxJComboBox.setModel(javax.swing.ComboBoxModel)public void setUI(ComboBoxUI ui)
setUI in class JComboBoxui - public boolean displayPopup()
public void setMandatory(boolean mandatory)
setMandatory in interface CEditormandatory - true, if you have to enter datapublic boolean isMandatory()
isMandatory in interface CEditorpublic void setReadWrite(boolean rw)
setReadWrite in interface CEditorrw - true, if you can enter/select datapublic boolean isReadWrite()
isReadWrite in interface CEditorpublic void setBackground(boolean error)
setBackground in interface CEditorerror - if true, set background to error color, otherwise mandatory/editablepublic void setBackground(Color bg)
setBackground in class JComponentbg - public void setOpaqueAll(boolean isOpaque)
isOpaque - opaquepublic void setValue(Object value)
setValue in interface CEditorvalue - value of the editorpublic Object getValue()
getValue in interface CEditorpublic String getDisplay()
getDisplay in interface CEditorpublic void addMouseListener(MouseListener ml)
addMouseListener in class Componentml - CompiereComboBoxUI.installUI(JComponent)public void removeMouseListener(MouseListener ml)
removeMouseListener in class Componentml - public void setActionCommand(String actionCommand)
setActionCommand in class JComboBoxactionCommand - commandprotected boolean isMatchingFilter(Object element)
element - an element in the combo box model
public boolean isAutoReducible()
public void setAutoReducible(boolean autoreducible)
autoreducible - true will activate auto-reduction of choices when user enters textpublic boolean isCaseSensitive()
public void removeAllItems()
removeAllItems in class JComboBoxpublic void setCaseSensitive(boolean caseSensitive)
caseSensitive - true will make auto-reduction is case sensitivepublic static void main(String[] args)
args -
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||