Class VSRow

    • Constructor Detail

      • VSRow

        public VSRow()
        Creates a VirtualSpace Row property with the specified name with a null value.
      • VSRow

        public VSRow​(Atom propertyAtom)
        Creates a VirtualSpace Row property with the specified name with a null value.
        Parameters:
        propertyAtom - The property atom.
      • VSRow

        public VSRow​(Atom propertyAtom,
                     VSField[] fields)
              throws PropException
        Creates a VirtualSpace Row property with the specified name.
        Parameters:
        propertyAtom - The property atom.
        fields - The fields of the row.
        Throws:
        PropException - as structural changes in containers on client is prohibited.
      • VSRow

        public VSRow​(Atom propertyAtom,
                     Value[] values)
              throws PropException
        Creates a VirtualSpace Row property with the specified name.
        Parameters:
        propertyAtom - The property atom.
        values - The values of the row.
        Throws:
        PropException - as structural changes in containers on client is prohibited.
      • VSRow

        public VSRow​(Atom propertyAtom,
                     VSColumnHeader[] columns)
              throws PropException
        Creates a VirtualSpace Row property with the specified name.
        Parameters:
        propertyAtom - The property atom.
        columns - The columns of the table.
        Throws:
        PropException - as structural changes in containers on client is prohibited.
    • Method Detail

      • usesPropIndex

        public final boolean usesPropIndex()
        Use of index for the property container is enabled.
        Specified by:
        usesPropIndex in interface IPropCnr
        Overrides:
        usesPropIndex in class PropCnr
        Returns:
        true for this container.
      • createField

        public VSField createField()
        Creates a new field with a unique name that then can be added to this row.
        Returns:
        A new field, initialized with a value or not depending on if the value is null.
      • createField

        public VSField createField​(Value value)
        Creates a new field with a unique name that then can be added to this row.
        Parameters:
        value - A value to initialize the field with, null for uninitialized field.
        Returns:
        A new field, initialized with a value or not depending on if the value is null.
      • ensureFieldCount

        public void ensureFieldCount​(int columnIndex,
                                     IComplexOperation op)
        Ensures that the row contains fields up to the specified field.
        Parameters:
        columnIndex - The column index.
        op - The complex operation, null for no complex-operation-support.
      • insertField

        public void insertField​(VSField field,
                                int columnIndex,
                                IComplexOperation op)
        Inserts a field to a row that may not have the fields before defined.
        Parameters:
        field - The field to insert.
        columnIndex - The column index.
        op - The complex operation, null for no complex-operation-support.
      • getInsertIndex

        public int getInsertIndex​(int columnIndex)
        Gets the insert position for a FIELD OR COLUMN property.
        Parameters:
        columnIndex - The column index.
        Returns:
        The insert index, or -1 for failure.
      • getComponentIsHidden

        public java.lang.String getComponentIsHidden()
        Gets the focus message for "Component is hidden" but for the component in question.
        Specified by:
        getComponentIsHidden in class VSComponent
      • getComponentIsDisabled

        public java.lang.String getComponentIsDisabled()
        Gets the focus message for "Component is disabled" but for the component in question.
        Specified by:
        getComponentIsDisabled in class VSComponent
      • onParentStateChanged

        public void onParentStateChanged​(IVSComponent parent,
                                         IVSComponentState.State state,
                                         boolean on)
        Called when the column changes state.
        Parameters:
        parent - The parent who's state was changed.
        state - The state change, possible values PARENT_ENABLED, PARENT_READONLY, PARENT_VISIBLE.
        on - New state.
      • getTable

        public VSTable getTable()
        Gets the table of the row.
        Returns:
        The VirtualSpace Table instance, or null if row is not added to a table.
      • isColumnHeader

        public boolean isColumnHeader()
        Checks if this is the column header row and not a row in the table.
      • getRowIndex

        public int getRowIndex()
        Gets the row index of this field in the table.
        Returns:
        The row index, or -1 if the field is not inside a table, or -2 if this field in a header field.
      • getColumnCount

        public int getColumnCount()
        Gets the column count.
        Returns:
        The count of columns, i.e. the count of children (the fields or column headers).
      • getColumnHeaders

        public VSColumnHeader[] getColumnHeaders()
        Gets the headers columns for the header row.
        Returns:
        The array of VSColumnHeader, empty array if it's not a header row (i.e. isColumnHeader() returns false).
      • getColumnHeader

        public VSColumnHeader getColumnHeader​(int columnIndex)
        Gets the headers columns for the header row.
        Parameters:
        columnIndex - The index of the column.
        Returns:
        The column of requested index, null if it's not a header row (i.e. isColumnHeader() returns false), or the column index is out of range.
      • getFields

        public VSField[] getFields()
        Gets the fields for the row.
        Returns:
        The array of VSFields, empty array if it's a header row (isColumnHeader() returns true).
      • getFieldCount

        public int getFieldCount()
        Gets the count of fields in this row.
        Returns:
        The number of fields properties found. This value is sometimes not the same as the column width of the table, typically when editing a table in the Designer.
      • getField

        public VSField getField​(int columnIndex)
        Gets the field at specified column index.
        Parameters:
        columnIndex - The column index.
        Returns:
        The field found, or null for none.
      • getFieldOfColumn

        public VSField getFieldOfColumn​(java.lang.String columnName)
        Gets the field of the specified column.

        Note: the method getField(int) is faster if you know the column index.

        Parameters:
        columnName - The column name.
        Returns:
        The field, or null if the column or field is not found, or if called on the column header row instance.
      • getValues

        public Value[] getValues()
        Gets the values of for the row.
        Returns:
        An array of Value's. If null Value's are encountered (i.e. the row is not initialized properly), the String Value null is used.
      • getValueCount

        public int getValueCount()
        Gets the count of values in this row.
        Returns:
        The number of row values found. This value is sometimes not the same as the column width of the table, typically when editing a table in the Designer.
      • getValue

        public Value getValue​(int columnIndex)
        Gets the value at specified column index.
        Parameters:
        columnIndex - The column index.
        Returns:
        The value found, or null for none.
      • getValueOfColumn

        public Value getValueOfColumn​(java.lang.String columnName)
        Gets the value of specified column name.

        Note: the method getValue(int) is faster if you know the column index.

        Parameters:
        columnName - The column name.
        Returns:
        The value found, or null for none.