Package snap.util

Class ListSel2D

java.lang.Object
snap.util.ListSel2D
All Implemented Interfaces:
Cloneable

public class ListSel2D extends Object implements Cloneable
Represents a selection for a table.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ListSel2D
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ListSel2D(int anchX, int anchY, int leadX, int leadY)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected ListSel2D
    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[]
    Returns the X indexes.
    int
    Returns the lead X.
    int
    Returns the lead Y.
    int
    Return the max X.
    int
    Returns the max Y.
    int
    Return the min X.
    int
    Returns the min Y.
    Returns the selection encompassing all.
    Returns the tail selection.
    int
    Standard hashCode implementation.
    boolean
    Returns whether the selection is empty.
    boolean
    isSel(int aX, int aY)
    Returns whether given X/Y are selected.
    Standard toString implemetation.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • EMPTY

      public static final ListSel2D 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

      public ListSel2D getSelAll()
      Returns the selection encompassing all.
    • getTail

      public ListSel2D getTail()
      Returns the tail selection.
    • getIndexesYForX

      public int[] getIndexesYForX(int aX)
      Returns the X indexes.
    • copyForShiftAdd

      public ListSel2D 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).
    • copyForMetaAdd

      public ListSel2D 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).
    • hashCode

      public int hashCode()
      Standard hashCode implementation.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Standard equals implementation.
      Overrides:
      equals in class Object
    • clone

      protected ListSel2D clone()
      Standard clone implementation.
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Standard toString implemetation.
      Overrides:
      toString in class Object