JIDE 3.5.15

com.jidesoft.plaf.basic
Class BasicNestedTableHeaderUIDelegate

java.lang.Object
  extended by com.jidesoft.plaf.TableHeaderUIDelegate
      extended by com.jidesoft.plaf.basic.BasicCellStyleTableHeaderUIDelegate
          extended by com.jidesoft.plaf.basic.BasicSortableTableHeaderUIDelegate
              extended by com.jidesoft.plaf.basic.BasicEditableTableHeaderUIDelegate
                  extended by com.jidesoft.plaf.basic.BasicAutoFilterTableHeaderUIDelegate
                      extended by com.jidesoft.plaf.basic.BasicNestedTableHeaderUIDelegate
All Implemented Interfaces:
SortListener, NestedTableHeaderUIDelegate, MouseListener, MouseMotionListener, PropertyChangeListener, EventListener, TableColumnModelListener, TableModelListener

public class BasicNestedTableHeaderUIDelegate
extends BasicAutoFilterTableHeaderUIDelegate
implements NestedTableHeaderUIDelegate

UI class for NestedTableHeader.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jidesoft.plaf.basic.BasicAutoFilterTableHeaderUIDelegate
BasicAutoFilterTableHeaderUIDelegate.DropDownSwingWorker
 
Field Summary
 
Fields inherited from class com.jidesoft.plaf.basic.BasicAutoFilterTableHeaderUIDelegate
HIDE_POPUP_KEY
 
Fields inherited from class com.jidesoft.plaf.basic.BasicCellStyleTableHeaderUIDelegate
_header, _mouseXOffset, _rendererPane
 
Constructor Summary
BasicNestedTableHeaderUIDelegate(JTableHeader header, CellRendererPane rendererPane)
           
 
Method Summary
protected  void customizePaint(Graphics g, TableColumn column, Rectangle cellRect)
           
protected  void dragColumn(int columnIndex, int targetX)
          Drags the column to a new position.
protected  int getHeaderPreferredHeight()
          Gets the preferred height of the header.
protected  TableCellRenderer getHeaderRenderer(TableColumn aColumn)
          Gets header renderer from the TableColumn instance and the column index.
 int getPreferredWidth(TableColumnGroup group)
          Gets the TableColumnGroup's preferred size.
 TableColumn getResizingColumn(Point p, int column)
          Gets current resizing column from the mouse point and the column index.
 int getRowPreferredHeight(int row)
          Gets the row's preferred height.
 Dimension getSize(TableColumnGroup group)
          Gets the TableColumnGroup's size.
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void paint(Graphics g, JComponent c)
          Paint method to paint the entire header.
protected  void paintCell(Graphics g, Rectangle cellRect, int columnIndex, Object value, boolean isSelected, boolean hasFocus, boolean paintCellDecorators)
          Paints the header cell.
protected  void paintCell(Graphics g, Rectangle cellRect, TableColumnGroup cTableGroup)
          Paints TableColumnGroup.
protected  void resizeColumn(TableColumn resizingColumn, int newWidth)
          Resizes the target column with new width.
protected  void startResizingColumn(Point p, TableColumn resizingColumn)
          Prepares to resize the entire TableColumnGroup if the mouse is not over the original table header to resize.
 
Methods inherited from class com.jidesoft.plaf.basic.BasicAutoFilterTableHeaderUIDelegate
applyFilter, applyFilter, applyFilters, applyFilters, calculatePopupLocation, convertElementToString, convertElementToString, convertElementToString, createCheckBoxListChooserPanel, createCustomFilterEditor, createCustomFilterEditorDialog, createListChooserPanel, createPopupPanel, createPopupWindow, customizeList, getCurrentFilters, getFilterCellDecoratorProperties, getPossibleValues, hasFocus, hidePopup, isPopupVisible, mouseClicked, mouseDragged, mouseOverFilterButton, showCustomFilterEditor
 
Methods inherited from class com.jidesoft.plaf.basic.BasicSortableTableHeaderUIDelegate
mouseEntered, mousePressed, propertyChange, sortChanged, sortChanging, uninstallAllListeners
 
Methods inherited from class com.jidesoft.plaf.basic.BasicCellStyleTableHeaderUIDelegate
columnAdded, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, createMarginBorder, customizeRendererComponent, getBorderInsets, getPreferredHeight, getPreferredSize, getPreferredWidth, hasStyledLabelColumn, invalidateCache, isMouseOverPaintArea, releaseRendererComponent, tableChanged, viewIndexForColumn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicNestedTableHeaderUIDelegate

public BasicNestedTableHeaderUIDelegate(JTableHeader header,
                                        CellRendererPane rendererPane)
Method Detail

paint

public void paint(Graphics g,
                  JComponent c)
Description copied from class: BasicSortableTableHeaderUIDelegate
Paint method to paint the entire header.

Overrides:
paint in class BasicAutoFilterTableHeaderUIDelegate
Parameters:
g - the Graphics instance
c - the component to be painted

customizePaint

protected void customizePaint(Graphics g,
                              TableColumn column,
                              Rectangle cellRect)
Overrides:
customizePaint in class BasicCellStyleTableHeaderUIDelegate

getHeaderRenderer

protected TableCellRenderer getHeaderRenderer(TableColumn aColumn)
Description copied from class: BasicCellStyleTableHeaderUIDelegate
Gets header renderer from the TableColumn instance and the column index.

Overrides:
getHeaderRenderer in class BasicAutoFilterTableHeaderUIDelegate
Parameters:
aColumn - the TableColumn instance
Returns:
the cell renderer for the column.

paintCell

protected void paintCell(Graphics g,
                         Rectangle cellRect,
                         int columnIndex,
                         Object value,
                         boolean isSelected,
                         boolean hasFocus,
                         boolean paintCellDecorators)
Description copied from class: BasicCellStyleTableHeaderUIDelegate
Paints the header cell.

Overrides:
paintCell in class BasicAutoFilterTableHeaderUIDelegate
Parameters:
g - the Graphics instance
cellRect - the cell rectangle to be painted in
columnIndex - the view column index to paint
value - the header value to paint
isSelected - if the column is selected
hasFocus - if the column has focus
paintCellDecorators - if the cell decorators should be used as well

paintCell

protected void paintCell(Graphics g,
                         Rectangle cellRect,
                         TableColumnGroup cTableGroup)
Paints TableColumnGroup.

Parameters:
g - the Graphics instance
cellRect - the cell rectangle to paint
cTableGroup - the TableColumnGroup to paint

getHeaderPreferredHeight

protected int getHeaderPreferredHeight()
Description copied from class: BasicCellStyleTableHeaderUIDelegate
Gets the preferred height of the header.

Overrides:
getHeaderPreferredHeight in class BasicCellStyleTableHeaderUIDelegate
Returns:
the header's preferred height.

getResizingColumn

public TableColumn getResizingColumn(Point p,
                                     int column)
Gets current resizing column from the mouse point and the column index.

Overrides:
getResizingColumn in class BasicCellStyleTableHeaderUIDelegate
Parameters:
p - the point
column - the view column index
Returns:
the TableColumn instance. null if no column is resizing.

startResizingColumn

protected void startResizingColumn(Point p,
                                   TableColumn resizingColumn)
Prepares to resize the entire TableColumnGroup if the mouse is not over the original table header to resize.

Overrides:
startResizingColumn in class BasicCellStyleTableHeaderUIDelegate
Parameters:
p - the mouse point
resizingColumn - the resizing column

dragColumn

protected void dragColumn(int columnIndex,
                          int targetX)
Description copied from class: BasicCellStyleTableHeaderUIDelegate
Drags the column to a new position.

Overrides:
dragColumn in class BasicCellStyleTableHeaderUIDelegate
Parameters:
columnIndex - the dragging column index
targetX - the X position of target point

resizeColumn

protected void resizeColumn(TableColumn resizingColumn,
                            int newWidth)
Description copied from class: BasicCellStyleTableHeaderUIDelegate
Resizes the target column with new width.

Overrides:
resizeColumn in class BasicCellStyleTableHeaderUIDelegate
Parameters:
resizingColumn - the column to resize
newWidth - the new width

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener
Overrides:
mouseReleased in class BasicEditableTableHeaderUIDelegate

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener
Overrides:
mouseMoved in class BasicAutoFilterTableHeaderUIDelegate

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener
Overrides:
mouseExited in class BasicAutoFilterTableHeaderUIDelegate

getSize

public Dimension getSize(TableColumnGroup group)
Description copied from interface: NestedTableHeaderUIDelegate
Gets the TableColumnGroup's size.

Specified by:
getSize in interface NestedTableHeaderUIDelegate
Parameters:
group - the table column group instance
Returns:
the size of the group.

getPreferredWidth

public int getPreferredWidth(TableColumnGroup group)
Description copied from interface: NestedTableHeaderUIDelegate
Gets the TableColumnGroup's preferred size.

Specified by:
getPreferredWidth in interface NestedTableHeaderUIDelegate
Parameters:
group - the table column group instance
Returns:
the preferred size of the group.

getRowPreferredHeight

public int getRowPreferredHeight(int row)
Description copied from interface: NestedTableHeaderUIDelegate
Gets the row's preferred height.

Specified by:
getRowPreferredHeight in interface NestedTableHeaderUIDelegate
Parameters:
row - the row index
Returns:
the preferred height for the row.

JIDE 3.5.15