|
Adempiere 3.5.2a | |||||||||
| 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
Adempiere Colored Combo Box.
| 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 int |
FIELD_HIGHT
Field Height |
| 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. |
String |
getDisplay()
Return Display Value |
Object |
getValue()
Return Editor value |
boolean |
isMandatory()
Is Field mandatory |
boolean |
isReadWrite()
Is it possible to edit |
void |
removeMouseListener(MouseListener ml)
Remove Mouse Listener. |
void |
setActionCommand(String actionCommand)
Set Action Command |
void |
setBackground(boolean error)
Set Background based on editable / mandatory / error |
void |
setBackground(Color bg)
Set Background |
void |
setIcon(Icon defaultIcon)
Set Icon of arrow button to icon |
void |
setMandatory(boolean mandatory)
Set Editor Mandatory |
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
| 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 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 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 - command
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||