|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| 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.JList
com.sciapp.table.ListRowHeader
public class ListRowHeader
The default RowHeader implementation that uses a JList and a ListCellRenderer.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JList |
|---|
JList.AccessibleJList |
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected boolean |
autoUpdateWidth
flag that is true if the width is updated when the contents of the list change |
protected JTable |
table
the associated table |
| Fields inherited from class javax.swing.JList |
|---|
HORIZONTAL_WRAP, VERTICAL, VERTICAL_WRAP |
| 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 | |
|---|---|
ListRowHeader()
Creates a ListRowHeader. |
|
ListRowHeader(JTable table)
Creates a ListRowHeader. |
|
| Method Summary | |
|---|---|
protected int |
computePreferredWidth()
Calculates and returns the row header's preferred width, taking into account all the rows of the table. |
boolean |
getAutoUpdateWidth()
Returns a flag that is true if the list's width is automatically updated when the contents of the list change. |
Rectangle |
getCellBounds(int index1,
int index2)
Returns the bounds of the specified range of items in JList
coordinates. |
JTable |
getTable()
Returns the associated table. |
Component |
getView()
Returns the view attached to the RowHeader. |
void |
invalidate()
Invalidates the container. |
void |
setAutoUpdateWidth(boolean autoUpdateWidth)
Assigns a flag that is true if the list's width is automatically updated when the contents of the list change. |
void |
setModel(ListModel model)
Sets the model that represents the contents or "value" of the list and clears the list selection after notifying PropertyChangeListeners. |
void |
setTable(JTable table)
Assigns a table to the rowheader's view component. |
void |
updateUI()
Resets the UI property with the value from the current look and feel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected JTable table
protected boolean autoUpdateWidth
| Constructor Detail |
|---|
public ListRowHeader()
public ListRowHeader(JTable table)
| Method Detail |
|---|
protected int computePreferredWidth()
public boolean getAutoUpdateWidth()
computePreferredWidth
method. The default value is false.
public Rectangle getCellBounds(int index1,
int index2)
JList
coordinates. Returns null if index isn't valid.
getCellBounds in class JListindex1 - the index of the first JList cell in the rangeindex2 - the index of the last JList cell in the range
public JTable getTable()
public Component getView()
getView in interface RowHeaderpublic void invalidate()
invalidate in class ContainerContainer.validate(),
Container.layout(),
LayoutManagerpublic void setAutoUpdateWidth(boolean autoUpdateWidth)
computePreferredWidth
method. The default value is false.
autoUpdateWidth - true, if the width is updated when the contents change, false otherwisepublic void setModel(ListModel model)
PropertyChangeListeners.
This is a JavaBeans bound property.
setModel in class JListmodel - the ListModel that provides the
list of items for displayJList.getModel()public void setTable(JTable table)
setTable in interface RowHeadertable - the table to assignpublic void updateUI()
updateUI in class JListUIManager.getUI(javax.swing.JComponent)
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||