Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--com.sun.java.swing.JComponent | +--com.sun.java.swing.table.JTableHeader
Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.
Inner Class Summary | |
JTableHeader.AccessibleJTableHeader
The class used to obtain the accessible role for this object. |
Inner classes inherited from class com.sun.java.swing.JComponent | |
JComponent.AccessibleJComponent |
Field Summary | |
TableColumnModel | columnModel
The TableColumnModel of the table header |
TableColumn | draggedColumn
The index of the column being dragged. 0 if not dragging |
int | draggedDistance
The distance from its original position the column has been dragged |
boolean | reorderingAllowed
Reordering of columns are allowed by the user |
boolean | resizingAllowed
Resizing of columns are allowed by the user |
TableColumn | resizingColumn
The index of the column being resized. 0 if not resizing |
JTable | table
|
boolean | updateTableInRealTime
If this flag is true, then the header will repaint the table as a column is dragged or resized. |
Fields inherited from class com.sun.java.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 |
Constructor Summary | |
JTableHeader()
Constructs a JTableHeader with a default TableColumnModel |
|
JTableHeader(TableColumnModel cm)
Constructs a JTableHeader which is initialized with cm as the column model. |
Method Summary | |
void | columnAdded(TableColumnModelEvent e)
|
int | columnAtPoint(java.awt.Point point)
Returns the index of the column that point lies in, or -1 if it lies outside the receiver's bounds. |
void | columnMarginChanged(ChangeEvent e)
|
void | columnMoved(TableColumnModelEvent e)
|
void | columnRemoved(TableColumnModelEvent e)
|
void | columnSelectionChanged(ListSelectionEvent e)
|
TableColumnModel | createDefaultColumnModel()
Returns the default column model object which is a DefaultTableColumnModel. |
AccessibleContext | getAccessibleContext()
Get the AccessibleContext associated with this JComponent |
TableColumnModel | getColumnModel()
Returns the TableColumnModel that contains all column inforamtion of this table header. |
TableColumn | getDraggedColumn()
Returns the the dragged column, if and only if a drag is in process. |
int | getDraggedDistance()
Returns the column's horizontal distance from its original position, if and only if a drag is in process. |
java.awt.Rectangle | getHeaderRect(int columnIndex)
Returns the rectangle containing the header tile at columnIndex. |
boolean | getReorderingAllowed()
Returns true if the receiver allows the user to rearrange columns by dragging their headers, false otherwise. |
boolean | getResizingAllowed()
Returns true if the receiver allows the user to resize columns by dragging between their headers, false otherwise. |
TableColumn | getResizingColumn()
Returns the resizing column. |
JTable | getTable()
Returns the header's partner table |
java.lang.String | getToolTipText(java.awt.event.MouseEvent event)
Overriding to allow renderer's tips to be used if it has text set. |
java.lang.String | getUIClassID()
|
com.sun.java.swing.plaf.TableHeaderUI | getUI()
|
boolean | getUpdateTableInRealTime()
Returns true if the receiver updates the body of the table view in real time when a column is resized or dragged. |
void | initializeLocalVars()
|
boolean | isOpaque()
|
void | resizeAndRepaint()
Properly sizes the receiver and its header view, and marks it as needing display. |
void | setColumnModel(TableColumnModel newModel)
Sets the column model for this table to newModel and registers with for listner notifications from the new column model. |
void | setDraggedColumn(TableColumn aColumn)
Sets the header's draggedColumn to aColumn |
void | setDraggedDistance(int distance)
Sets the header's draggedDistance to distance |
void | setReorderingAllowed(boolean b)
Sets whether the user can drag column headers to reorder columns. |
void | setResizingAllowed(boolean b)
Sets whether the user can resize columns by dragging between headers. |
void | setResizingColumn(TableColumn aColumn)
Sets the header's resizingColumn to aColumn |
void | setTable(JTable aTable)
Sets the header's partner table to aTable |
void | setUI(com.sun.java.swing.plaf.TableHeaderUI ui)
|
void | setUpdateTableInRealTime(boolean flag)
Sets whether the body of the table updates in real time when a column is resized or dragged. |
void | updateUI()
|
Methods inherited from class java.awt.Container | |
add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paint, paramString, preferredSize, printComponents, print, processContainerEvent, processEvent, removeAll, remove, remove, removeContainerListener, removeNotify, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component | |
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
protected JTable table
protected TableColumnModel columnModel
protected boolean reorderingAllowed
protected boolean resizingAllowed
protected boolean updateTableInRealTime
protected transient TableColumn resizingColumn
protected transient TableColumn draggedColumn
protected transient int draggedDistance
Constructor Detail |
public JTableHeader()
public JTableHeader(TableColumnModel cm)
cm
- The column model for the tableMethod Detail |
public void setTable(JTable aTable)
public JTable getTable()
public void setReorderingAllowed(boolean b)
flag
- true if the table view should allow
reorderingpublic boolean getReorderingAllowed()
public void setResizingAllowed(boolean b)
flag
- true if table view should allow
resizingpublic boolean getResizingAllowed()
public TableColumn getDraggedColumn()
public int getDraggedDistance()
public TableColumn getResizingColumn()
public void setUpdateTableInRealTime(boolean flag)
flag
- true if tableView should update
the body of the table in real timepublic boolean getUpdateTableInRealTime()
public int columnAtPoint(java.awt.Point point)
public java.awt.Rectangle getHeaderRect(int columnIndex)
public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
public com.sun.java.swing.plaf.TableHeaderUI getUI()
public void setUI(com.sun.java.swing.plaf.TableHeaderUI ui)
public void updateUI()
public java.lang.String getUIClassID()
public void setColumnModel(TableColumnModel newModel)
newModel
- the new data source for this tablepublic TableColumnModel getColumnModel()
public boolean isOpaque()
public void columnAdded(TableColumnModelEvent e)
public void columnRemoved(TableColumnModelEvent e)
public void columnMoved(TableColumnModelEvent e)
public void columnMarginChanged(ChangeEvent e)
public void columnSelectionChanged(ListSelectionEvent e)
protected TableColumnModel createDefaultColumnModel()
protected void initializeLocalVars()
public void resizeAndRepaint()
public void setDraggedColumn(TableColumn aColumn)
public void setDraggedDistance(int distance)
public void setResizingColumn(TableColumn aColumn)
public AccessibleContext getAccessibleContext()
Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |