Class ColSizeData

  • All Implemented Interfaces:
    java.io.Serializable, ActionData

    public class ColSizeData
    extends java.lang.Object
    implements ActionData
    Used to notify that the width of a column is changed.

    When a user drags the border of a sizable column, only the width of the column itself is changed, other columns are not affected.

    Author:
    jumperchen
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALT_KEY
      Indicates whether the Alt key is pressed.
      static int CTRL_KEY
      Indicates whether the Ctrl key is pressed.
      static int SHIFT_KEY
      Indicates whether the Shift key is pressed.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColIndex()
      Return the column index of the first column whose width is changed.
      int getKeys()
      Returns what keys were pressed when the column is resized, or 0 if none of them was pressed.
      java.lang.String getWidth()
      Returns the column width
      java.lang.String getWidth​(int col)
      Returns the column width of the specified column index.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ALT_KEY

        public static final int ALT_KEY
        Indicates whether the Alt key is pressed. It might be returned as part of getKeys().
        See Also:
        Constant Field Values
      • CTRL_KEY

        public static final int CTRL_KEY
        Indicates whether the Ctrl key is pressed. It might be returned as part of getKeys().
        See Also:
        Constant Field Values
      • SHIFT_KEY

        public static final int SHIFT_KEY
        Indicates whether the Shift key is pressed. It might be returned as part of getKeys().
        See Also:
        Constant Field Values
    • Method Detail

      • getWidth

        public java.lang.String getWidth()
        Returns the column width
      • getWidth

        public java.lang.String getWidth​(int col)
        Returns the column width of the specified column index.
        Parameters:
        col - the column index
      • getColIndex

        public int getColIndex()
        Return the column index of the first column whose width is changed. The other column is the returned index plus one.

        In other words, it is the index (starting from 0).

      • getKeys

        public final int getKeys()
        Returns what keys were pressed when the column is resized, or 0 if none of them was pressed. It is a combination of CTRL_KEY, SHIFT_KEY and ALT_KEY.