Package snap.view

Class TableCol<T>

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

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

  • Constructor Details

    • TableCol

      public TableCol()
      Constructor.
  • Method Details

    • getTable

      public TableView<T> 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 ListView<T>
    • getRowHeightSuper

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

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

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

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

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

      protected void cellEditingChanged(ListCell<T> aCell)
      Override to forward to TableView.
      Overrides:
      cellEditingChanged in class ListView<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
    • initProps

      protected void initProps(PropSet aPropSet)
      Override to support props for this class.
      Overrides:
      initProps in class ListView<T>
    • getPropValue

      public Object getPropValue(String aPropName)
      Override to support props for this class.
      Overrides:
      getPropValue in class ListView<T>
    • setPropValue

      public void setPropValue(String aPropName, Object aValue)
      Override to support props for this class.
      Overrides:
      setPropValue in class ListView<T>
    • toXMLView

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

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