abbot.tester
Class JTableLocation

java.lang.Object
  extended byabbot.tester.ComponentLocation
      extended byabbot.tester.JTableLocation

public class JTableLocation
extends ComponentLocation

Provides encapsulation of a location on a JTable (notably a row). Use the JTableLocation#JTableLocation(Point) ctor to indicate a specific coordinate.


Nested Class Summary
static class JTableLocation.Cell
           
 
Constructor Summary
JTableLocation()
           
JTableLocation(int row, int col)
           
JTableLocation(Point p)
           
JTableLocation(String value)
           
 
Method Summary
protected  String badFormat(String encoded)
           
protected  Point cellToPoint(JTable table, int row, int col)
          Convert the given row, col into a coordinate pair.
 boolean equals(Object o)
           
 Rectangle getBounds(Component c)
          Convert the abstract location into a concrete area.
 JTableLocation.Cell getCell(JTable table)
           
 Point getPoint(Component c)
          Convert the abstract location into a concrete one.
 ComponentLocation parse(String encoded)
          Convert the given encoding into the proper location.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JTableLocation

public JTableLocation()

JTableLocation

public JTableLocation(String value)

JTableLocation

public JTableLocation(int row,
                      int col)

JTableLocation

public JTableLocation(Point p)
Method Detail

badFormat

protected String badFormat(String encoded)
Overrides:
badFormat in class ComponentLocation

cellToPoint

protected Point cellToPoint(JTable table,
                            int row,
                            int col)
Convert the given row, col into a coordinate pair.


getPoint

public Point getPoint(Component c)
Description copied from class: ComponentLocation
Convert the abstract location into a concrete one.

Overrides:
getPoint in class ComponentLocation

getCell

public JTableLocation.Cell getCell(JTable table)

getBounds

public Rectangle getBounds(Component c)
Description copied from class: ComponentLocation
Convert the abstract location into a concrete area. If a point has been specified, returns a 1x1 rectangle, otherwise returns the a rectangle at (0, 0) of the Component's size.

Overrides:
getBounds in class ComponentLocation

equals

public boolean equals(Object o)
Overrides:
equals in class ComponentLocation

toString

public String toString()
Overrides:
toString in class ComponentLocation

parse

public ComponentLocation parse(String encoded)
Description copied from class: ComponentLocation
Convert the given encoding into the proper location. Allowed formats: (x, y)

Overrides:
parse in class ComponentLocation


Copyright © 2002-2004 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge