|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.combobox.PopupPanel com.jidesoft.combobox.TableChooserPanel
public class TableChooserPanel
TableChooserPanel is a PopupPanel that can choose a value from a table.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
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 Class<?> |
_class
|
protected JTable |
_table
|
protected boolean |
hasEntered
|
protected MouseListener |
mouseListener
This protected field is implementation specific. |
protected MouseMotionListener |
mouseMotionListener
This protected field is implementation specific. |
protected MouseListener |
tableMouseListener
This protected field is implementation specific. |
protected MouseMotionListener |
tableMouseMotionListener
This protected field is implementation specific. |
Fields inherited from class com.jidesoft.combobox.PopupPanel |
---|
_previousSelectedObject, SELECTED_BY_MOUSE_ROLLOVER |
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 | |
---|---|
TableChooserPanel()
|
|
TableChooserPanel(TableModel model,
Class<?> clazz)
Creates a new ListChooserPanel . |
Method Summary | |
---|---|
protected MouseEvent |
convertMouseEvent(MouseEvent e)
|
protected MouseListener |
createMouseListener()
Creates a listener that will watch for mouse-press and release events on the combo box. |
protected MouseMotionListener |
createMouseMotionListener()
Creates the mouse motion listener which will be added to the combo box. |
protected PropertyChangeListener |
createPropertyChangeListener()
Creates a PropertyChangeListener which will be added to the combo box. |
protected JTable |
createTable(TableModel model)
Subclass can override this method to create a custom JTable. |
protected MouseListener |
createTableMouseListener()
Creates a mouse listener that watches for mouse events in the popup's list. |
protected MouseMotionListener |
createTableMouseMotionListener()
Creates a mouse motion listener that watches for mouse motion events in the popup's list. |
protected void |
customzieScroller(JScrollPane scroller)
Configures the scrollable portion which holds the table within the combo box popup. |
protected int |
getDefaultColumnIndex()
|
int |
getMaximumRowCount()
Gets the maximum number of rows the JTable displays |
Dimension |
getPreferredSize()
|
JTable |
getTable()
Gets the JTable. |
protected Object |
getValueAtRowIndex(int row)
Gets the value at the specific row index. |
int |
getValueColumnIndex()
Returns the value column index. |
protected void |
initComponents()
|
protected void |
installListListeners()
Adds the listeners to the table control. |
void |
itemStateChanged(ItemEvent e)
|
void |
setMaximumRowCount(int count)
Sets the maximum number of rows the JTable displays. |
void |
setSelectedObject(Object selectedObject)
Sets the selected object and fire ItemEvent . |
protected void |
setupTable(JTable table)
Configures the table. |
void |
setValueColumnIndex(int valueColumnIndex)
Sets the value column index. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JTable _table
protected Class<?> _class
protected boolean hasEntered
protected MouseMotionListener mouseMotionListener
protected MouseListener mouseListener
protected MouseListener tableMouseListener
createTableMouseListener()
protected MouseMotionListener tableMouseMotionListener
createTableMouseMotionListener()
Constructor Detail |
---|
public TableChooserPanel()
public TableChooserPanel(TableModel model, Class<?> clazz)
ListChooserPanel
.
model
- the modelclazz
- the class typeMethod Detail |
---|
protected void initComponents()
public Dimension getPreferredSize()
getPreferredSize
in class PopupPanel
protected void customzieScroller(JScrollPane scroller)
protected JTable createTable(TableModel model)
protected void setupTable(JTable table)
table
- public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
public int getMaximumRowCount()
JTable
displays
JTable
displays.public void setMaximumRowCount(int count)
JTable
displays. If the number of objects in the model is
greater than count, the table uses a scrollbar.
count
- an integer specifying the maximum number of items to display in the table before using a scrollbarpublic JTable getTable()
protected Object getValueAtRowIndex(int row)
row
- the row index.
public void setSelectedObject(Object selectedObject)
PopupPanel
ItemEvent
. It will still fire event even the new selected object
is the same as old selected object.
setSelectedObject
in class PopupPanel
selectedObject
- new selected objectprotected int getDefaultColumnIndex()
protected MouseEvent convertMouseEvent(MouseEvent e)
protected MouseListener createMouseListener()
MouseListener
which will be added to the combo box or nullprotected MouseMotionListener createMouseMotionListener()
MouseMotionListener
which will be added to the combo box or nullprotected MouseListener createTableMouseListener()
MouseListener
or nullprotected MouseMotionListener createTableMouseMotionListener()
MouseMotionListener
or nullprotected PropertyChangeListener createPropertyChangeListener()
PropertyChangeListener
which will be added to the combo box. If this method returns null
then it will not be added to the combo box.
PropertyChangeListener
or nullprotected void installListListeners()
public void setValueColumnIndex(int valueColumnIndex)
valueColumnIndex
- the new value column index.public int getValueColumnIndex()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |