public class CellEdgeDetectUtil extends Object
Constructor and Description |
---|
CellEdgeDetectUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
getColumnPositionToResize(ILayer layer,
org.eclipse.swt.graphics.Point clickPoint)
Calculate the column position to resize depending on the cursor's position
on the left/right edges of the cell.
|
static CellEdgeEnum |
getHorizontalCellEdge(ILayer layer,
org.eclipse.swt.graphics.Point clickPt) |
static CellEdgeEnum |
getHorizontalCellEdge(ILayer layer,
org.eclipse.swt.graphics.Point clickPt,
int handleWidth) |
static CellEdgeEnum |
getHorizontalCellEdge(org.eclipse.swt.graphics.Rectangle cellBounds,
org.eclipse.swt.graphics.Point clickPt)
Gets the edge (left/right) of the cell which is closer to the click point.
|
static CellEdgeEnum |
getHorizontalCellEdge(org.eclipse.swt.graphics.Rectangle cellBounds,
org.eclipse.swt.graphics.Point clickPt,
int distanceFromEdge)
Figure out if the click point is closer to the left/right edge of the cell.
|
static int |
getRowPositionToResize(ILayer layer,
org.eclipse.swt.graphics.Point clickPt)
Calculate the row position to resize depending on the cursor's position
on the top/bottom edges of the cell.
|
static CellEdgeEnum |
getVerticalCellEdge(ILayer layer,
org.eclipse.swt.graphics.Point clickPt) |
static CellEdgeEnum |
getVerticalCellEdge(ILayer layer,
org.eclipse.swt.graphics.Point clickPt,
int handleHeight) |
static CellEdgeEnum |
getVerticalCellEdge(org.eclipse.swt.graphics.Rectangle cellBounds,
org.eclipse.swt.graphics.Point clickPt)
Gets the edge (top/bottom) of the cell which is closer to the click point.
|
public static int getColumnPositionToResize(ILayer layer, org.eclipse.swt.graphics.Point clickPoint)
public static int getRowPositionToResize(ILayer layer, org.eclipse.swt.graphics.Point clickPt)
public static CellEdgeEnum getHorizontalCellEdge(org.eclipse.swt.graphics.Rectangle cellBounds, org.eclipse.swt.graphics.Point clickPt)
cellBounds
- bounds of the cell containing the clickclickPt
- usually the coordinates of a mouse clickpublic static CellEdgeEnum getHorizontalCellEdge(ILayer layer, org.eclipse.swt.graphics.Point clickPt)
public static CellEdgeEnum getHorizontalCellEdge(ILayer layer, org.eclipse.swt.graphics.Point clickPt, int handleWidth)
public static CellEdgeEnum getHorizontalCellEdge(org.eclipse.swt.graphics.Rectangle cellBounds, org.eclipse.swt.graphics.Point clickPt, int distanceFromEdge)
cellBounds
- of the table cell containing the clickclickPt
- distanceFromEdge
- distance from the edge to qualify as close to the cell edgepublic static CellEdgeEnum getVerticalCellEdge(org.eclipse.swt.graphics.Rectangle cellBounds, org.eclipse.swt.graphics.Point clickPt)
cellBounds
- bounds of the cell containing the clickclickPt
- usually the coordinates of a mouse clickpublic static CellEdgeEnum getVerticalCellEdge(ILayer layer, org.eclipse.swt.graphics.Point clickPt)
public static CellEdgeEnum getVerticalCellEdge(ILayer layer, org.eclipse.swt.graphics.Point clickPt, int handleHeight)
Copyright © 2013. All Rights Reserved.