com.explodingpixels.widgets
Class TableHeaderUtils

java.lang.Object
  extended by com.explodingpixels.widgets.TableHeaderUtils

public class TableHeaderUtils
extends Object


Nested Class Summary
static interface TableHeaderUtils.ColumnHeaderClickListener
           
 
Method Summary
static MouseListener createColumnHeaderSortHandler(JTable table, TableUtils.SortDelegate sortDelegate)
           
static JComponent createCornerComponent(JTable table)
          Creates a component that paints the header background, which can be used, for example, in a JScrollPane corner.
static int getPressedColumn(JTableHeader tableHeader)
           
static int getSelectedColumn(JTableHeader tableHeader)
           
static TableUtils.SortDirection getSortDirection(JTableHeader tableHeader, int columnModelIndex)
           
static boolean isColumnPressed(JTableHeader tableHeader, int columnModelIndex)
           
static boolean isColumnSelected(JTableHeader tableHeader, int columnModelIndex)
           
static void makeHeaderFillEmptySpace(JTable table)
           
static void setPressedColumn(JTableHeader tableHeader, int columnModelIndex)
           
static TableUtils.SortDirection toggleSortDirection(JTableHeader tableHeader, int columnModelIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCornerComponent

public static JComponent createCornerComponent(JTable table)
Creates a component that paints the header background, which can be used, for example, in a JScrollPane corner.


makeHeaderFillEmptySpace

public static void makeHeaderFillEmptySpace(JTable table)

getPressedColumn

public static int getPressedColumn(JTableHeader tableHeader)

isColumnPressed

public static boolean isColumnPressed(JTableHeader tableHeader,
                                      int columnModelIndex)

setPressedColumn

public static void setPressedColumn(JTableHeader tableHeader,
                                    int columnModelIndex)

getSelectedColumn

public static int getSelectedColumn(JTableHeader tableHeader)

isColumnSelected

public static boolean isColumnSelected(JTableHeader tableHeader,
                                       int columnModelIndex)

getSortDirection

public static TableUtils.SortDirection getSortDirection(JTableHeader tableHeader,
                                                        int columnModelIndex)

toggleSortDirection

public static TableUtils.SortDirection toggleSortDirection(JTableHeader tableHeader,
                                                           int columnModelIndex)

createColumnHeaderSortHandler

public static MouseListener createColumnHeaderSortHandler(JTable table,
                                                          TableUtils.SortDelegate sortDelegate)