Class UITableColumn

    • Field Detail

      • ROW_CELL_HORIZONTAL_ALIGN

        public static final java.lang.String ROW_CELL_HORIZONTAL_ALIGN
        The property name: row cell horizontal alignment.
        See Also:
        Constant Field Values
      • ROW_CELL_VERTICAL_ALIGN

        public static final java.lang.String ROW_CELL_VERTICAL_ALIGN
        The property name: row cell horizontal alignment.
        See Also:
        Constant Field Values
      • FILTER_COLUMN

        public static final java.lang.String FILTER_COLUMN
        The property name: column filtering.
        See Also:
        Constant Field Values
    • Constructor Detail

      • UITableColumn

        public UITableColumn()
        Creates the container without name with a null value.
      • UITableColumn

        public UITableColumn​(Atom propertyAtom)
        Creates the container with the specified name with a null value.
        Parameters:
        propertyAtom - the property atom.
      • UITableColumn

        public UITableColumn​(Atom propertyAtom,
                             GProp<?>[] properties)
                      throws PropException
        Creates the container with the specified name and properties.
        Parameters:
        propertyAtom - the property atom.
        properties - the property array value for the container.
        Throws:
        PropException - when properties are not correctly defined.
    • Method Detail

      • getDeviceType

        public final int getDeviceType()
        Gets the device type: -1=mobile, 0=both, 1=desktop.
        Specified by:
        getDeviceType in interface IUIComp
        Returns:
        Zero: 0=both.
      • clone

        public UITableColumn clone()
        Creates a clone out of this property. The cloning is overridden by the subclasses in order to handle cloning of its class variables appropriately.
        Overrides:
        clone in class UIComp
      • isFilterColumn

        public boolean isFilterColumn()
        Get the filtering column flag.
        Returns:
        true (default) if this column is used for filtering, false to ignore the column.
      • setFilterColumn

        public boolean setFilterColumn​(boolean on)
        Sets the filtering column flag.
        Parameters:
        on - true if this column is used for filtering, false to ignore the column.
        Returns:
        true for changed, false for no change.
      • getTable

        public UITable getTable()
        Gets the table instance.
        Returns:
        The table, or null if table column is orphaned.
      • isUnhidable

        public boolean isUnhidable()
        Returns if the column is unhidable, used when the table option for column hiding is enabled.
        Returns:
        true, the column cannot be hidden, false for column hidable.
      • setUnhidable

        public boolean setUnhidable​(boolean isUnhidable)
        Sets the column unhidable state, used when the table option for column hiding is enabled.
        Parameters:
        isUnhidable - The new unhidable state: true, the column cannot be hidden, false for column hidable.
        Returns:
        true for value changed, false for no change.
      • isHidden

        public boolean isHidden()
        Returns if the column is initially hidden, used when the table option for column hiding is enabled and the unhidable option for the column is false.
        Returns:
        true, the column is initially hidden, false for column visible.
      • setHidden

        public boolean setHidden​(boolean isHidden)
        Sets the column initially hidden state, used when the table option for column hiding is enabled and the unhidable option for the column is false.
        Parameters:
        isHidden - the new column hidden state: true, the column is initially hidden, false for column visible.
        Returns:
        true for value changed, false for no change.
      • getRowCellHorizontalAlignment

        public int getRowCellHorizontalAlignment()
        Gets the row cell horizontal alignment.
        Returns:
        0=default, 4=left, 44=leading, 5=center, 6=right, 66=trailing.
      • getRowCellVerticalAlignment

        public int getRowCellVerticalAlignment()
        Gets the row cell vertical alignment.
        Returns:
        0=default (middle), 8=top, 5=middle or 2=bottom.
      • getVSColumn

        public VSColumnHeader getVSColumn()
        Gets the VS column for this table column.
        Returns:
        The VS column, or null for none.
      • getVSTable

        public VSTable getVSTable()
        Gets the VS table.
        Returns:
        The VS table, or null if not connected.
      • getVSTable

        public VSTable getVSTable​(VSTableColumnReference ref)
        Gets the VSTable for a VSTableColumnReference instance.
        Specified by:
        getVSTable in interface IVSTableColumnReferenceOwner
        Parameters:
        ref - The reference instance, null when property-editing the reference in the Designer.
        Returns:
        The table for the reference, or null if not found.
      • onResolved

        public void onResolved​(VSRelativeReference<?> reference,
                               VSColumnHeader column)
        Called when the property reference has been resolved. UI components use this method to set its state according to the field.
        Specified by:
        onResolved in interface IVSColumnListener
        Parameters:
        reference - The VSRelativeReference instance holding the reference.
        column - The target reference.
      • onBroken

        public void onBroken​(VSRelativeReference<?> reference,
                             VSColumnHeader column)
        Called when the property reference has been broken, i.e. unresolved.
        Specified by:
        onBroken in interface IVSColumnListener
        Parameters:
        reference - The VSRelativeReference instance holding the reference.
        column - The target reference.
      • onSingleSelectionChanged

        public void onSingleSelectionChanged​(VSColumnHeader column,
                                             int rowIndex)
        Called when the row selection in table single-selection mode is changed to forward to column listeners.
        Specified by:
        onSingleSelectionChanged in interface IVSColumnListener
        Parameters:
        column - The column.
        rowIndex - The row index selected, -1 for none.
      • onSelectionChanged

        public void onSelectionChanged​(VSColumnHeader column,
                                       VSRow row,
                                       int rowIndex,
                                       boolean isSelected)
        Called when the row selection is changed to forward to column listeners.
        Specified by:
        onSelectionChanged in interface IVSColumnListener
        Parameters:
        column - The column.
        row - The row that was changed.
        rowIndex - The row index.
        isSelected - The selected state.
      • onRowAdded

        public void onRowAdded​(VSColumnHeader column,
                               VSRow row,
                               int rowIndex)
        Called when a row has been added to the table.
        Specified by:
        onRowAdded in interface IVSColumnListener
        Parameters:
        column - The column.
        row - The row that was added.
        rowIndex - The row index where it was inserted.
      • onRowRemoved

        public void onRowRemoved​(VSColumnHeader column,
                                 VSRow row,
                                 int rowIndex)
        Called when a row has been removed from the table.
        Specified by:
        onRowRemoved in interface IVSColumnListener
        Parameters:
        column - The column.
        row - The row that was removed.
        rowIndex - The row index before removal.
      • onCellValueChanged

        public void onCellValueChanged​(VSColumnHeader column,
                                       VSField cell,
                                       Value value,
                                       GProp<?> trigger,
                                       IPostEventProcessing postProcessing)
        Called when the cell value is set in the column.
        Specified by:
        onCellValueChanged in interface IVSColumnListener
        Parameters:
        column - The VS column.
        cell - The VS field.
        value - The value, never null, but value.isNull() could be true.
        trigger - The trigger property that may be null.
        postProcessing - Post-processing instance.
      • getApproximateSize

        public Size getApproximateSize()
        Returns the size of the component in pixels. The size is a calculation and does not exactly reflect the real size that may be different due to additional styles not taken into account by this method. The size is calculated from the font of the component and default or defined values (such as character length or number of lines for text area).
        Specified by:
        getApproximateSize in class UIComp
        Returns:
        The size of the component.