|
Diamond Control Suite 3.0 | ||||||||
| 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
diamondedge.swing.DsComboBox
public class DsComboBox
DsComboBox is a multi-column ComboBox which displays a collection of objects. Each object is represented by a DsListItem object which holds all of the information for the object being displayed including a list of DsListCell objects for each column. The items can be created in a number of different ways. One way is to call the addItem method. Another way is to use the addItems to add an array or List of objects. If the object added implements the DsListObject interface then it is used to fill in the other properties of the DsListItem such as the icons.
| 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 | |
|---|---|
protected IconList |
iconlist
|
| 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 diamondedge.swing.DsConstants |
|---|
ACCOUNTING, ALL, ASCENDING, ASCENDING_CASE, BORDER_BOTTOM, BORDER_LEFT, BORDER_NONE, BORDER_OUTLINE, BORDER_RIGHT, BORDER_TOP, CROSS_LINES, DASH, DASH_DOT, DASH_DOT_DOT, DEFAULT, DESCENDING, DESCENDING_CASE, DIAGONAL_CROSS_LINES, DOT, DOUBLE, DOUBLE_LINE, DOWNWARD_DIAGONAL_LINES, ETCHED, ETCHED_RAISED, FALSE, FIND_ALL, FIND_EQUALS, FIND_GT, FIND_GTE, FIND_LT, FIND_LTE, FIND_NE, FIND_PREFIX, FIND_REGEX, FIND_STRING, FIRST, FLAT, GRID_DASH, GRID_DASH_DOT, GRID_DASH_DOT_DOT, GRID_DOT, GRID_LINE, HIGHLIGHT_SELECTION_ALWAYS, HIGHLIGHT_SELECTION_NEVER, HIGHLIGHT_SELECTION_WITH_FOCUS, HORIZONTAL_LINES, LOWERED, LOWERED_LIGHT, NONE, RAISED, RAISED_LIGHT, SELECT_CELL, SELECT_NONE, SELECT_ROW, SINGLE, SINGLE_LINE, SOLID, STRETCH, TILE, TRANSPARENT, TRUE, UPWARD_DIAGONAL_LINES, VERTICAL_LINES |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
DsComboBox()
|
|
| Method Summary | |
|---|---|
TableColumn |
addColumn()
|
TableColumn |
addColumn(String columnName,
String id)
|
DsListItem |
addItem()
Appends a DsListItem object to the list. |
DsListItem |
addItem(int index,
String key,
Object text,
Object smallIcon)
Adds a DsListItem object to the list. |
void |
addItem(List values)
Adds an item and loads the data for multiple cells into that item. |
void |
addItem(Object obj)
Loads the data from an object into the List. |
DsListItem |
addItem(Object[] values)
Adds an item and loads the data for multiple cells into that item. |
void |
addItems(List objects)
Loads the data from multiple objects into the List. |
void |
addItems(Object[] objects)
Loads the data from multiple objects into the List. |
int |
calculateTotalListWidth()
Returns the total width of the columns. |
void |
clear()
Removes all items in the list. |
void |
configureEditor(ComboBoxEditor editor,
Object item)
|
protected DsListItem |
createListItem()
Creates a new DsListItem. |
void |
doLayout()
|
int |
findItem(String str,
int col,
int startRow,
boolean partial)
Finds the row index of an item in the list using a case insensitive string comparison. |
boolean |
getAutoExpand()
Returns a value to specify whether the text box portion of a combo box automatically fills as you type with a value from the combo box list that matches the characters you enter. |
int |
getBoundColumn()
Determines the column used as the value for the selection. |
TableColumn |
getColumn(int index)
|
TableColumn |
getColumn(String columnId)
|
int |
getColumnCount()
Determines the total number of columns. |
DsCellProperties |
getColumnProperties(int col)
Returns the default cell containing the default properties for the column. |
int |
getColumnWidth(int index)
Determines the width of the specified column in pixels. |
IconList |
getIconList()
Returns the IconList object to be used for the icons displayed in the DsComboBox. |
DsListItem |
getItem(int index)
Returns a specific item in the list by position. |
DsListItem |
getItem(Object indexOrKey)
Returns a specific item in the list by position (Number) or by key (String). |
DsListItem |
getItem(String key)
Returns a specific item in the list by key. |
boolean |
getLimitToList()
Returns whether a combo box's values are limited to the listed items. |
int |
getListWidth()
Determines the width of the drop-down list. |
String |
getRowValueList()
Returns the text used to initialize each cell in the list. |
Dimension |
getSize()
|
String |
getText()
Returns the string displayed in the text area (editor). |
String |
getTextAt(int row,
int col)
Returns the text (contents formatted as a string) for the cell at the given row and column. |
int |
getTextColumn()
Determines the column used as the value for the Text. |
Object |
getValue()
Returns the value for the BoundColumn of the item selected in the drop-down list or the text in the editor if no item was selected. |
Object |
getValueAt(int row,
int column)
Returns the cell value at row and column. |
void |
refresh()
Reloads data from the original DsListObjects. |
void |
removeItem(int index)
Removes a item from the list |
void |
setAutoExpand(boolean val)
Sets a value to specify whether the text box portion of a combo box automatically fills as you type with a value from the combo box list that matches the characters you enter. |
void |
setBackground(Color c)
|
void |
setBoundColumn(int val)
Determines the column used as the value for the selection. |
void |
setColumnCount(int val)
Determines the total number of columns. |
void |
setColumnHorizontalAlignment(int column,
int align)
Sets the horizontal alignment of the text in the column header. |
void |
setColumnWidth(int index,
int val)
|
void |
setColumnWidth(String columnId,
int val)
|
int |
setColumnWidthsToFit(int columnMargin)
Returns the width of all columns and sets each column width to the size needed to fit the data in cells in that column. |
void |
setForeground(Color c)
|
void |
setIconList(IconList i)
Sets the IconList object to be used for the icons displayed in the DsComboBox. |
void |
setLimitToList(boolean val)
Sets a value to specify whether a combo box's values are limited to the listed items. |
void |
setListWidth(int val)
Determines the width of the drop-down list. |
void |
setRowValueList(String newValues)
Sets the text in each cell in the list with each string being separated by a ;. |
void |
setShowGrid(boolean showVerticalLine,
boolean showHorizontalLine)
Sets whether the grid lines should be drawn between cells. |
void |
setText(String text)
Sets the string displayed in the text area (editor). |
void |
setTextColumn(int val)
Determines the column used as the value for the Text property which is diplayed in the text area of the ComboBox. |
void |
setValue(Object value)
Selects the item whose value for the BoundColumn is equal to the specified value argument. |
void |
setValueAt(Object value,
int row,
int col)
Sets the value for the cell in the model at row
and column. |
void |
setValues(Object[] values)
Loads the cell values from an array of values. |
void |
setValues(Object[][] values)
Loads the cell values from an array of values. |
void |
setValues(TableModel table)
Loads the cell values from an array of values. |
void |
updateUI()
|