[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

GridView

abstract
inherits from Box
inherits from Scroller

Object <- Viewable <- Box <- GridView



Operations

Get list of all operations

AddColumn
ApplyText
CalcInsidePart
CanAcceptCoupon
CellBounds
ColumnBounds
ColumnFlags
ColumnKey
ColumnOffset
ColumnTitle
ColumnTitleBounds
ColumnTitleHeight
ColumnTitlesBounds
ColumnWidth
Draw
DrawCell
DrawColumnTitles
DrawGridLines
DrawRow
DrawRowTitles
DrawSelection
DrawTitleAsLetter
DrawTitleAsNumber
FirstCell
GridBounds
GridHeight
GridLineBounds
GridWidth
HasColumn
HasRow
InsideCell
InsideColumn
InsideColumnTitle
InsideRow
InsideRowTitle
MaximumScrollOffset
MovePress
PageDown
PageLeft
PageRight
PageUp
RedrawSelectedBounds
RemoveColumn
Render
RenderPageCount
RowBounds
RowHeight
RowTitleBounds
RowTitleWidth
RowTitlesBounds
SelectedBounds
SelectedCell
SetColumnFlags
SetColumnKey
SetColumnOffset
SetColumnTitle
SetFirstCell
SetSelectedCell
SetTextStyle
ShowRow
ShowSelection
TextStyle
TotalHeight
TotalWidth
TrackMoveColumn
TrackSelect
TrackSelectCell
TrackSelectColumn
TrackSelectRow
VisibleCellRange


Attributes

Get list of all attributes

CellTextStyle
ColumnCount
ColumnFlagsList
ColumnKeysList
ColumnOffsetsList
ColumnTitles
ConstantRowHeight
DontTrack
FirstColumn
FirstRow
LastColumn
LastRow
MenuResizeH
RowCount
SelectedColumn
SelectedRow
ShowColumnLines
ShowExtraRowLines
ShowRowLines
TitleTextStyle
UseListElementPerCell


Fields

Field Type
Viewable: superview: Viewable
relativeOrigin: Dot
contentSize: Dot
viewFlags: Flags
labelStyle: TextStyle
color: Unsigned
altColor: Unsigned
shadow: Shadow
sound: Playable
HasBorder: border: Border
ScrollableByMicron: scrollOffset: Dot
GridView: selectMode: Boolean
showCount: Boolean
useContainerList: Boolean
showColumnTitles: Boolean
keyboardScroll: Boolean
scrollToSelected: Boolean
showColumnLines: Boolean
showRowLines: Boolean
showExtraRowLines: Boolean
showTitleLines: Boolean
menuResizeH: Boolean
alwaysOneSelected: Boolean
setCurrentContact: Boolean
dontTrack: Boolean
showRemaining: Boolean
showColumnTitleAsLetter: Boolean
showColumnTitleAsNumber: Boolean
showRowTitles: Boolean
showRowTitleAsLetter: Boolean
showRowTitleAsNumber: Boolean
useListElementPerCell: Boolean
noPartialCell: Boolean
grayTitleBackground: Boolean
gridViewCenteredTitle: Boolean
forPrinting: Boolean
emboldenGroups: Boolean
confirmOnSelect: Boolean
removePlural: Boolean
listViewArrow: Boolean
cellTextStyle: TextStyle
columnTitles: Text
emptyMessage: Text
selectedColumn: Unsigned
selectedRow: Unsigned
titleTextStyle: TextStyle
columnKeysList: OperationNumberList
columnOffsetsList: IntegerList
columnFlagsList: IntegerList


Instance template

Class GridView cannot be instantiated.


Class definition

 
 
Define Class GridView;
    abstract;
    inherits from Box;
    inherits from Scroller;
    uses shared extra;
    has dispatcher hintdata;

    field selectMode:               Boolean;
        // ListView: if set, leave item selected, otherwise call TouchedObject
    field showCount:                Boolean;
        // put number of rows in front of every column title
    field useContainerList:         Boolean;
        // ListView: get list from card or immediate superview
    field showColumnTitles:         Boolean;
        // draw column titles
    field keyboardScroll:           Boolean;
        // ListView: scroll to next line matching typed character
    field scrollToSelected:         Boolean;
        // ListView: after touching element, scroll to its corresponding object in scene
    field showColumnLines:          Boolean, getter, setter;
        // draw lines between columns
    field showRowLines:             Boolean, getter, setter;
        // draw lines between rows
    field showExtraRowLines:        Boolean, getter, setter;
        // include extra row lines
    field showTitleLines:           Boolean;
        // draw line under column titles and right of row titles (if any)
    field menuResizeH:              Boolean, getter, setter;
        // ListView
    field alwaysOneSelected:        Boolean;
        // ListView: one of the items must always be selected
    field setCurrentContact:        Boolean;
        // ListView: keep iCurrentContact synched with selection
    field dontTrack:                Boolean, getter, setter;
        // ListView: don't track or change selection during touch (used for read-only list views)
    field showRemaining:            Boolean;
        // ListView: if more items than can be seen, display "(and x more...)" in last line
    field showColumnTitleAsLetter:  Boolean;
        // draw titles as A B C...
    field showColumnTitleAsNumber:  Boolean;
        // draw titles as 1 2 3...
    field showRowTitles:            Boolean;
        // draw row titles
    field showRowTitleAsLetter:     Boolean;
        // draw titles as A B C...
    field showRowTitleAsNumber:     Boolean;
        // draw titles as 1 2 3...
    field useListElementPerCell:    Boolean, getter, setter;
        // ListView: list element per cell, not per row
    field noPartialCell:            Boolean;
    field grayTitleBackground:      Boolean;
    field gridViewCenteredTitle:    Boolean;
    field forPrinting:              Boolean;
        // ListView: if set, this list is being used for print rendering
    field emboldenGroups:           Boolean;
        // ListView
    field confirmOnSelect:          Boolean;
        // ListView: call Confirm() on self every time selection changes
    field removePlural:             Boolean;
    field listViewArrow:            Boolean;
        // ListView: if set, draw and hit-test scroll arrows if necessary

    field cellTextStyle: TextStyle;
        // also determines row height
    field columnTitles: Text, getter, setter;
        // 1 line per title
    field emptyMessage: Text;
        // shown if row count is 0 and no row lines
    field selectedColumn: Unsigned, getter;
        // selected column
    field selectedRow: Unsigned, getter;
        // selected row
    field titleTextStyle: TextStyle;
        // used for both columns and rows

    field columnKeysList: OperationNumberList, getter, setter;
    field columnOffsetsList: IntegerList, getter, setter;
    field columnFlagsList: IntegerList, getter, setter;
    
    
    // Columns
    
    attribute ShowColumnLines: Boolean;
    operation AddColumn(column: Unsigned);
        // adds column at index
    attribute ColumnCount: Unsigned;
        // total number of columns
    operation ColumnFlags(column: Unsigned): Flags;
        // stored in extra (see Utilities.h for flags)
    operation ColumnKey(column: Unsigned): OperationNumber;     
    operation ColumnOffset(column: Unsigned): Micron;
        // offset from left edge
    operation ColumnTitle(column: Unsigned): Text;
        // a line in columnTitles
    operation ColumnWidth(column: Unsigned): Micron;
        // stored in extra
    attribute FirstColumn: Unsigned;
        // scrolled-to column (1-based)
    operation HasColumn(column: Unsigned): Boolean;
        // returns true if index is in range
    attribute LastColumn: Unsigned, readOnly;
        // last visible column (may be partial)
    operation RemoveColumn(column: Unsigned);
        // removes column at index
    attribute SelectedColumn: Unsigned;
        // column or cell's column
    operation SetColumnFlags(column: Unsigned; key: Unsigned);
        // stored in extra (see Utilities.h for flags)
    operation SetColumnKey(column: Unsigned; key: OperationNumber);
    operation SetColumnOffset(column: Unsigned; width: Micron);
        // offset from left edge
    operation SetColumnTitle(column: Unsigned; title: HasText);
        // a line in columnTitles
    attribute ColumnTitles: Text;
        // Change all column titles en masse.
    attribute ColumnKeysList: OperationNumberList;
    attribute ColumnOffsetsList: IntegerList;
    attribute ColumnFlagsList: IntegerList;
    
    
    // Rows
    
    attribute ShowRowLines: Boolean;
    attribute ShowExtraRowLines: Boolean;
    attribute FirstRow: Unsigned;                               
        // scrolled-to row (1-based)
    operation HasRow(row: Unsigned): Boolean;                   
        // returns true if index is in range
    attribute LastRow: Unsigned, readOnly;                      
        // last visible row (may be partial)
    attribute RowCount: Unsigned, readOnly;                     
        // total number of rows
    operation RowHeight(row: Unsigned): Micron;                 
        // derived from textStyle
    attribute ConstantRowHeight: Boolean, readOnly;             
        // returns false; override to return true and gain performance
    attribute SelectedRow: Unsigned;                        
        // row or cell's row
    operation ShowRow(row: Unsigned);                           
        // make row visible
    operation ShowSelection();                                  
        // make selected row visible

    // Cells

    attribute CellTextStyle: TextStyle;
    operation FirstCell(var column: Unsigned; var row: Unsigned);
    operation SelectedCell(var column: Unsigned; var row: Unsigned);
    operation SetFirstCell(column: Unsigned; row: Unsigned);
    operation SetSelectedCell(column: Unsigned; row: Unsigned);
    attribute TitleTextStyle: TextStyle;
    attribute UseListElementPerCell:    Boolean;

    // Drawing

    overrides Draw;
    operation DrawCell(column: Unsigned; row: Unsigned; bounds: Box), noMethod;
    operation DrawColumnTitles();
    operation DrawGridLines();
    operation DrawRow(row: Unsigned);
    operation DrawRowTitles();
    operation DrawSelection(bounds: Box);
    overrides Render;                   
        // renders to a full page
    overrides RenderPageCount;
        // to count how many pages will print

    // Bounds

    operation CellBounds(column: Unsigned; row: Unsigned; var bounds: Box; drawing: Boolean): Boolean;
    operation ColumnBounds(column: Unsigned; var bounds: Box; drawing: Boolean): Boolean;
    operation ColumnTitleBounds(column: Unsigned; var bounds: Box; drawing: Boolean): Boolean;
    operation ColumnTitlesBounds(var bounds: Box; drawing: Boolean);
    operation ColumnTitleHeight(): Micron;                          
        // derived from titleTextStyle
    operation GridBounds(var bounds: Box);                          
        // content bounds minus title areas
    operation GridLineBounds(var bounds: Box);                      
        // content bounds used for drawing column & row lines (defaults to GridBounds)
    operation GridHeight(): Micron;                                 
        // content height minus column title area
    operation GridWidth(): Micron;                                  
        // content width minus row title area
    operation RowBounds(row: Unsigned; var bounds: Box; drawing: Boolean): Boolean;
    operation RowTitleBounds(row: Unsigned; var bounds: Box; drawing: Boolean): Boolean;
    operation RowTitleWidth(): Micron;
    operation RowTitlesBounds(var bounds: Box; drawing: Boolean);
    operation SelectedBounds(var bounds: Box): Boolean;
    operation TotalHeight(): Micron;                                
        // sum of all rows
    operation TotalWidth(): Micron;                                 
        // sum of all columns

    // Hit testing

    operation InsideCell(where: Dot; var column: Unsigned; var row: Unsigned): Boolean;
    operation InsideColumn(where: Dot): Unsigned;
    operation InsideColumnTitle(where: Dot): Unsigned;
    operation InsideRow(where: Dot): Unsigned;
    operation InsideRowTitle(where: Dot): Unsigned;

    // Interaction

    operation TrackMoveColumn(touchInput: TouchInput);              
        // reorder column
    operation TrackSelectCell(touchInput: TouchInput);              
        // select by cells
    operation TrackSelectColumn(touchInput: TouchInput): Unsigned;  
        // select by columns
    operation TrackSelectRow(touchInput: TouchInput): Unsigned;     
        // select by rows

    overrides CalcInsidePart;
    overrides CanAcceptCoupon;
    overrides MaximumScrollOffset;
    overrides MovePress;
    overrides PageDown, PageUp, PageLeft, PageRight;
    overrides ApplyText;
    overrides TextStyle, SetTextStyle;

    intrinsic DrawTitleAsLetter(value: Unsigned; bounds: Box; style: TextStyle);
    intrinsic DrawTitleAsNumber(value: Unsigned; bounds: Box; style: TextStyle);
    operation RedrawSelectedBounds(bounds: Box; needsRedraw: Boolean), intrinsic;
    operation TrackSelect(touchInput: TouchInput; columnOnly: Boolean; rowOnly: Boolean), intrinsic;
    operation VisibleCellRange(doRows: Boolean; proposedTop: Micron; var firstPartiallyVisible: Unsigned; var lastPartiallyVisible: Unsigned; var firstFullyVisible: Unsigned; var lastFullyVisible: Unsigned), intrinsic;
    attribute DontTrack: Boolean;
    attribute MenuResizeH: Boolean;
end class;