Class TableProperty

    • Constructor Summary

      Constructors 
      Constructor Description
      TableProperty()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getSessionState​(java.awt.Component c)
      Returns a TableState object for JTable c or null, if none of the JTable's columns are resizable.
      void setSessionState​(java.awt.Component c, java.lang.Object state)
      Restore the width of each resizable TableColumn, if the number of columns haven't changed.
      • Methods inherited from class java.lang.Object

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

      • TableProperty

        public TableProperty()
    • Method Detail

      • getSessionState

        public java.lang.Object getSessionState​(java.awt.Component c)
        Returns a TableState object for JTable c or null, if none of the JTable's columns are resizable. A width of -1 is used to mark TableColumns that are not resizable.

        Throws an IllegalArgumentException if Component c isn't a non-null JTable.

        Specified by:
        getSessionState in interface PropertySupport
        Parameters:
        c - the JTable whose columnWidths will be saved in a TableState object.
        Returns:
        the TableState object or null
        See Also:
        setSessionState(java.awt.Component, java.lang.Object), TableState
      • setSessionState

        public void setSessionState​(java.awt.Component c,
                                    java.lang.Object state)
        Restore the width of each resizable TableColumn, if the number of columns haven't changed.

        Throws an IllegalArgumentException if c is not a JTable or if state is not an instance of TableState.

        Specified by:
        setSessionState in interface PropertySupport
        Parameters:
        c - the JTable whose column widths are to be restored
        state - the TableState to be restored
        See Also:
        getSessionState(java.awt.Component), TableState