JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class JCCellRange

java.lang.Object
  |
  +--com.klg.jclass.table.JCCellRange
All Implemented Interfaces:
Serializable

public class JCCellRange
extends Object
implements Serializable

JCCellRange is used to specify a range of cells or labels.

See Also:
Serialized Form

Field Summary
 int end_column
          Column of the last cell in range (top-left corner).
 int end_row
          Row of the last cell in range (bottom-right corner).
 int start_column
          Column of the first cell in range (top-left corner).
 int start_row
          Row of the first cell in range (top-left corner).
 
Constructor Summary
JCCellRange()
          Creates an instance with all cells set to JCTableEnum.NOVALUE.
JCCellRange(int r1, int c1, int r2, int c2)
          Creates an instance with the specified start and end cells.
JCCellRange(Rectangle r)
          Creates a JCCellRange based on a rectangle.
 
Method Summary
 boolean equals(com.klg.jclass.table.JCCellRange r)
          Returns true if the specified range is equal to this range.
 boolean inColumnRange(int col)
          Returns true if this range is not empty and the column is inside it.
 boolean inColumnRange2(int col)
          Returns true if the column is inside this range.
 boolean inRowRange(int row)
          Returns true if the row is inside this range.
 boolean inRowRange2(int row)
          Returns true if this range is not empty and the row is inside it.
 boolean inside(int row, int col)
          Returns true if the cell is inside this range.
 com.klg.jclass.table.JCCellRange intersection(com.klg.jclass.table.JCCellRange r)
          Computes the intersection of two ranges.
 void intersection(com.klg.jclass.table.JCCellRange r, com.klg.jclass.table.JCCellRange inter)
           
 boolean intersects(com.klg.jclass.table.JCCellRange r)
          Checks whether the two ranges intersect.
 boolean overlaps(com.klg.jclass.table.JCCellRange r)
          Checks to see whether the two ranges overlap.
 com.klg.jclass.table.JCCellRange reshape(int r, int c)
          Reshapes the range to the specified single cell.
 com.klg.jclass.table.JCCellRange reshape(int r1, int c1, int r2, int c2)
          Reshapes the range to the specified start and end cells.
 com.klg.jclass.table.JCCellRange reshape(com.klg.jclass.table.JCCellRange r)
          Reshapes the range to the specified range.
 com.klg.jclass.table.JCCellRange reshape(Rectangle r)
          Reshapes the range to the specified rectangle.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

start_row

public int start_row
Row of the first cell in range (top-left corner).


start_column

public int start_column
Column of the first cell in range (top-left corner).


end_row

public int end_row
Row of the last cell in range (bottom-right corner).


end_column

public int end_column
Column of the last cell in range (top-left corner).

Constructor Detail

JCCellRange

public JCCellRange()
Creates an instance with all cells set to JCTableEnum.NOVALUE.


JCCellRange

public JCCellRange(int r1,
                   int c1,
                   int r2,
                   int c2)
Creates an instance with the specified start and end cells.

Parameters:
c1 -
c2 -
r1 -
r2 -

JCCellRange

public JCCellRange(Rectangle r)
Creates a JCCellRange based on a rectangle.

Parameters:
r -
Method Detail

reshape

public final com.klg.jclass.table.JCCellRange reshape(int r1,
                                                      int c1,
                                                      int r2,
                                                      int c2)
Reshapes the range to the specified start and end cells.

Parameters:
c1 -
c2 -
r1 -
r2 -
Returns:

reshape

public final com.klg.jclass.table.JCCellRange reshape(int r,
                                                      int c)
Reshapes the range to the specified single cell.

Parameters:
r -
c -
Returns:

reshape

public final com.klg.jclass.table.JCCellRange reshape(com.klg.jclass.table.JCCellRange r)
Reshapes the range to the specified range.

Parameters:
r -
Returns:

reshape

public final com.klg.jclass.table.JCCellRange reshape(Rectangle r)
Reshapes the range to the specified rectangle.

Parameters:
r -
Returns:

equals

public final boolean equals(com.klg.jclass.table.JCCellRange r)
Returns true if the specified range is equal to this range.

Parameters:
r -
Returns:
true if the specified range is equal to this range

intersects

public final boolean intersects(com.klg.jclass.table.JCCellRange r)
Checks whether the two ranges intersect.

Parameters:
r -
Returns:

overlaps

public final boolean overlaps(com.klg.jclass.table.JCCellRange r)
Checks to see whether the two ranges overlap.

Parameters:
r -
Returns:

intersection

public final com.klg.jclass.table.JCCellRange intersection(com.klg.jclass.table.JCCellRange r)
Computes the intersection of two ranges.

Parameters:
r -
Returns:

intersection

public final void intersection(com.klg.jclass.table.JCCellRange r,
                               com.klg.jclass.table.JCCellRange inter)

inside

public final boolean inside(int row,
                            int col)
Returns true if the cell is inside this range.

Parameters:
row -
col -
Returns:
true if the cell is inside this range

inRowRange

public final boolean inRowRange(int row)
Returns true if the row is inside this range.

Parameters:
row -
Returns:
true if the row is inside this range

inRowRange2

public final boolean inRowRange2(int row)
Returns true if this range is not empty and the row is inside it.

Parameters:
row -
Returns:
true if this range is not empty and the row is inside it

inColumnRange

public final boolean inColumnRange(int col)
Returns true if this range is not empty and the column is inside it.

Parameters:
col -
Returns:
true if this range is not empty and the column is inside it

inColumnRange2

public final boolean inColumnRange2(int col)
Returns true if the column is inside this range.

Parameters:
col -
Returns:
true if the column is inside this range

toString

public String toString()
Overrides:
toString in class Object

Copyright © 2004 Quest Software Inc..
All rights reserved.