Package snap.view

Class TableCol<T>

All Implemented Interfaces:
PropChange.DoChange, Selectable<T>, XMLArchiver.Archivable

public class TableCol<T> extends ListArea<T>
Represents a Table Column.
  • Field Details

  • Constructor Details

    • TableCol

      public TableCol()
      Creates a new TableCol.
  • Method Details

    • getTable

      public TableView getTable()
      Returns the table.
    • getHeader

      public Label getHeader()
      Returns the header label.
    • getHeaderText

      public String getHeaderText()
      Returns the header text.
    • setHeaderText

      public void setHeaderText(String aValue)
      Sets the header text.
    • isResizable

      public boolean isResizable()
      Returns whether resizable.
    • setResizable

      public void setResizable(boolean aValue)
      Sets the resizable.
    • getRowHeight

      public double getRowHeight()
      Override to get row height from table.
      Overrides:
      getRowHeight in class ListArea<T>
    • getRowHeightSuper

      protected double getRowHeightSuper()
      Override to get row height from table.
    • getColIndex

      public int getColIndex()
      Returns the column index.
      Overrides:
      getColIndex in class ListArea<T>
    • getCellConfigure

      public Consumer<ListCell<T>> getCellConfigure()
      Override to return table cell configure if one isn't set for col.
      Overrides:
      getCellConfigure in class ListArea<T>
    • setItemsList

      public void setItemsList(List<T> theItems)
      Override to suppress setting items in pick list (already done by TableView).
      Specified by:
      setItemsList in interface Selectable<T>
      Overrides:
      setItemsList in class ListArea<T>
    • getPrefWidthImpl

      protected double getPrefWidthImpl(double aH)
      Override to account for header (if showing).
      Overrides:
      getPrefWidthImpl in class ListArea<T>
    • cellEditingChanged

      protected void cellEditingChanged(ListCell<T> aCell)
      Override to forward to TableView.
      Overrides:
      cellEditingChanged in class ListArea<T>
    • getFocusNext

      protected View getFocusNext(View aChild)
      Override to forward to table.
      Overrides:
      getFocusNext in class ParentView
    • getFocusPrev

      protected View getFocusPrev(View aChild)
      Override to forward to table.
      Overrides:
      getFocusPrev in class ParentView
    • toXMLView

      public XMLElement toXMLView(XMLArchiver anArchiver)
      XML archival - table columns.
      Overrides:
      toXMLView in class ListArea<T>
    • fromXMLView

      public void fromXMLView(XMLArchiver anArchiver, XMLElement anElement)
      XML unarchival - table columns.
      Overrides:
      fromXMLView in class ListArea<T>