| GNU Classpath (0.95) | |
| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectjava.awt.Componentjava.awt.Containerjavax.swing.JComponentjavax.swing.table.JTableHeaderNested Class Summary | |
protected class | |
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 TableColumnModel |
|
protected TableColumn |
|
protected int |
|
protected boolean |
|
protected boolean |
|
protected TableColumn |
|
protected JTable |
|
protected boolean |
|
Fields inherited from class javax.swing.JComponent | |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, accessibleContext, listenerList, ui | |
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 | |
| |
| |
Method Summary | |
void |
|
int |
|
void |
|
void |
|
void |
|
void |
|
protected TableColumnModel |
|
protected TableCellRenderer |
|
AccessibleContext |
|
TableColumnModel |
|
TableCellRenderer |
|
TableColumn |
|
int |
|
Rectangle |
|
boolean |
|
boolean |
|
TableColumn |
|
JTable |
|
TableHeaderUI |
|
String |
|
boolean |
|
protected void |
|
boolean | |
protected String |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void | |
void | |
void |
|
void |
|
Methods inherited from class java.lang.Object | |
clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait | |
public JTableHeader(TableColumnModel cm)
Creates a new header. Ifcmisnull, a new table column model is created by callingcreateDefaultColumnModel().
- Parameters:
cm- the table column model (nullpermitted).
public void columnAdded(TableColumnModelEvent event)
Receives notification when a column is added to the column model.
- Specified by:
- columnAdded in interface TableColumnModelListener
- Parameters:
event- the table column model event
public int columnAtPoint(Point point)
Returns the index of the column at the specified point.
- Parameters:
point- the point.
- Returns:
- The column index, or -1.
public void columnMarginChanged(ChangeEvent event)
Receives notification when a column margin changes in the column model.
- Specified by:
- columnMarginChanged in interface TableColumnModelListener
- Parameters:
event- the table column model event
public void columnMoved(TableColumnModelEvent event)
Receives notification when a column is moved within the column model.
- Specified by:
- columnMoved in interface TableColumnModelListener
- Parameters:
event- the table column model event
public void columnRemoved(TableColumnModelEvent event)
Receives notification when a column is removed from the column model.
- Specified by:
- columnRemoved in interface TableColumnModelListener
- Parameters:
event- the table column model event
public void columnSelectionChanged(ListSelectionEvent event)
Receives notification when the column selection has changed.
- Specified by:
- columnSelectionChanged in interface TableColumnModelListener
- Parameters:
event- the table column model event
protected TableColumnModel createDefaultColumnModel()
Creates a default table column model.
- Returns:
- A default table column model.
protected TableCellRenderer createDefaultRenderer()
Creates a default renderer.
- Returns:
- A default renderer.
public AccessibleContext getAccessibleContext()
Get the value of theJComponent.accessibleContextproperty.
- Specified by:
- getAccessibleContext in interface Accessible
- Overrides:
- getAccessibleContext in interface JComponent
- Returns:
- The current value of the property
public TableColumnModel getColumnModel()
Get the value of thecolumnModelproperty.
- Returns:
- The current value of the property
public TableCellRenderer getDefaultRenderer()
Returns the default table cell renderer.
- Returns:
- The default table cell renderer.
public TableColumn getDraggedColumn()
Get the column that is currently being dragged. This is used when handling the column reordering with mouse.
- Returns:
- the column being dragged, null if none.
public int getDraggedDistance()
Get the value of thedraggedDistanceproperty.
- Returns:
- The current value of the property
public Rectangle getHeaderRect(int column)
Get the rectangle, occupied by the header of the given column.
- Parameters:
column- the column, for that the header area is requested.
- Returns:
- the column header area.
public boolean getReorderingAllowed()
Check if it is possible to reorder the table columns by dragging column header with mouse. The table reordering is enabled by default, but can be disabled withsetReorderingAllowed(boolean).
- Returns:
- true if reordering is allowed, false otherwise.
public boolean getResizingAllowed()
Check if it is possible to resize the table columns by dragging the column boundary in the table header with mouse. The resizing is enabled by default, but can be disabled withsetResizingAllowed(boolean).
- Returns:
- true if resizing is allowed, false otherwise.
public TableColumn getResizingColumn()
Get the column that is currently being resized. This is used when handling the column resizing with mouse.
- Returns:
- the column being currently resized, null if none.
public JTable getTable()
Get the table, having this header.
- Returns:
- the table, having this header.
public String getUIClassID()
Get the value of the UIClassID property. This property should be a key in theUIDefaultstable managed byUIManager, the value of which is the name of a class to load for the component'sJComponent.uiproperty.
- Overrides:
- getUIClassID in interface JComponent
- Returns:
- A "symbolic" name which will map to a class to use for the component's UI, such as
"ComponentUI"
public boolean getUpdateTableInRealTime()
Get the value of theupdateTableInRealTimeproperty.
- Returns:
- The current value of the property
protected void initializeLocalVars()
Initializes the fields and properties of this class with default values. This is called by the constructors.
public boolean isOpaque()
Get the value of theopaqueproperty.
- Overrides:
- isOpaque in interface JComponent
- Returns:
- The current value of the property
protected String paramString()
Return a string representation for this component, for use in debugging.
- Overrides:
- paramString in interface JComponent
- Returns:
- A string describing this component.
public void resizeAndRepaint()
Validates the layout of this table header and repaints it. This is equivalent torevalidate()followed byrepaint().
public void setColumnModel(TableColumnModel c)
Set the value of thecolumnModelproperty.
- Parameters:
c- The new value of the property
public void setDefaultRenderer(TableCellRenderer cellRenderer)
Sets the default table cell renderer.
- Parameters:
cellRenderer- the renderer.