Package snap.util
Class ListSel2D
java.lang.Object
snap.util.ListSel2D
- All Implemented Interfaces:
Cloneable
Represents a selection for a table.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ListSel2D
clone()
Standard clone implementation.copyForMetaAdd
(int anchX, int anchY, int leadX, int leadY) Returns a copy of this SelRect resulting from 'Meta-adding' new selection (short-cut key is down).copyForShiftAdd
(int anchX, int anchY, int leadX, int leadY) Returns a copy of this SelRect resulting from 'Shift-adding' new selection (shift key is down).boolean
Standard equals implementation.int
Returns the anchor X.int
Returns the anchor Y.int[]
getIndexesYForX
(int aX) Returns the X indexes.int
getLeadX()
Returns the lead X.int
getLeadY()
Returns the lead Y.int
getMaxX()
Return the max X.int
getMaxY()
Returns the max Y.int
getMinX()
Return the min X.int
getMinY()
Returns the min Y.Returns the selection encompassing all.getTail()
Returns the tail selection.int
hashCode()
Standard hashCode implementation.boolean
isEmpty()
Returns whether the selection is empty.boolean
isSel
(int aX, int aY) Returns whether given X/Y are selected.toString()
Standard toString implemetation.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ListSel2D
public ListSel2D(int anchX, int anchY, int leadX, int leadY) Constructor.
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns whether the selection is empty. -
isSel
public boolean isSel(int aX, int aY) Returns whether given X/Y are selected. -
getAnchorX
public int getAnchorX()Returns the anchor X. -
getAnchorY
public int getAnchorY()Returns the anchor Y. -
getLeadX
public int getLeadX()Returns the lead X. -
getLeadY
public int getLeadY()Returns the lead Y. -
getMinX
public int getMinX()Return the min X. -
getMinY
public int getMinY()Returns the min Y. -
getMaxX
public int getMaxX()Return the max X. -
getMaxY
public int getMaxY()Returns the max Y. -
getSelAll
Returns the selection encompassing all. -
getTail
Returns the tail selection. -
getIndexesYForX
public int[] getIndexesYForX(int aX) Returns the X indexes. -
copyForShiftAdd
Returns a copy of this SelRect resulting from 'Shift-adding' new selection (shift key is down). -
copyForMetaAdd
Returns a copy of this SelRect resulting from 'Meta-adding' new selection (short-cut key is down). -
hashCode
public int hashCode()Standard hashCode implementation. -
equals
Standard equals implementation. -
clone
Standard clone implementation. -
toString
Standard toString implemetation.
-