net.sourceforge.jsh3modtool.gui.imagetable.utils
Class JTableUtil

java.lang.Object
  extended by net.sourceforge.jsh3modtool.gui.imagetable.utils.JTableUtil

public class JTableUtil
extends java.lang.Object

Util class for the JTable.

Author:
erma

Nested Class Summary
static class JTableUtil.Cell
          Public internal class for describing a Cell in a Table
 
Constructor Summary
JTableUtil()
           
 
Method Summary
static JTableUtil.Cell getCell(javax.swing.JTable table, int x, int y)
          Returns the Cell that spans over the pixel
static void scrollToCenter(javax.swing.JTable table, int row, int column)
          Scrolls the table (its Viewport) so the indicated cell is in the center Note that the table must be inside a JViewport
static void scrollToCenter(javax.swing.JTable table, JTableUtil.Cell cell)
          Scrolls the table (its Viewport) so the indicated cell is in the center Note that the table must be inside a JViewport
static void scrollToVisible(javax.swing.JTable table, int row, int column)
          Scrolls the table so the specified cell is visible in the table, Note that the table must be inside a JViewport note this may be anywhere in the visible viewport.
static void scrollToVisible(javax.swing.JTable table, JTableUtil.Cell cell)
          Scrolls the table so the specified cell is visible in the table, Note that the table must be inside a JViewport note this may be anywhere in the visible viewport.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTableUtil

public JTableUtil()
Method Detail

scrollToVisible

public static void scrollToVisible(javax.swing.JTable table,
                                   int row,
                                   int column)
Scrolls the table so the specified cell is visible in the table, Note that the table must be inside a JViewport note this may be anywhere in the visible viewport.

Parameters:
table - the table to scroll
row - the row
column - the column

scrollToVisible

public static void scrollToVisible(javax.swing.JTable table,
                                   JTableUtil.Cell cell)
Scrolls the table so the specified cell is visible in the table, Note that the table must be inside a JViewport note this may be anywhere in the visible viewport.

Parameters:
table - the table to scroll
cell - the cell

scrollToCenter

public static void scrollToCenter(javax.swing.JTable table,
                                  int row,
                                  int column)
Scrolls the table (its Viewport) so the indicated cell is in the center Note that the table must be inside a JViewport

Parameters:
table - the table to scroll
row - the row
column - the column

scrollToCenter

public static void scrollToCenter(javax.swing.JTable table,
                                  JTableUtil.Cell cell)
Scrolls the table (its Viewport) so the indicated cell is in the center Note that the table must be inside a JViewport

Parameters:
table - the table to scroll
cell - the cell

getCell

public static JTableUtil.Cell getCell(javax.swing.JTable table,
                                      int x,
                                      int y)
Returns the Cell that spans over the pixel

Parameters:
table - the table
x - the pixels x value
y - the pixels y value
Returns:
the Cell


Copyright © 2005 sourceforge.net. All Rights Reserved.