My favorites | Sign in
Project Logo
                
Code license: MIT License
Labels: flex, table, container
Feeds:

Content

About this project

This project is established to create a word table like widget in Flex.

API

Here is the APIs of classes Table, Row, and Cell.

  1. selectedCells:ArrayCollection
    return the selected of the table.

  2. rows:Array
    return all the rows of the table.

  3. cells:Array
    return all the cells of the table.

  4. public static function createTable(width:int,numRows:int,numColumns:int):Table
    create a table with defined width, rows number and columns number.

    Parameters:
    int width -- the width of the table to be created
    int numRows -- the number of the rows to be created.
    int numColumns -- the number of the cells to be created for each row.

  5. public function getChildrenFrom(rowPosition:int,cellPosition:int):Array
    get all the children of the specified cell at the given position

    Parameters:
    int rowPosition -- the position of the row contains the specified cell in the table.
    int cellPosition-- the position of the specified cell in the row.

  6. public function removeChildrenFrom(rowPosition:int,cellPosition:int):void
    remove all the children from the specified cell

    Parameters:
    int rowPosition -- the position of the row contains the specified cell in the table.
    int cellPosition-- the position of the specified cell in the row.

  7. public function insertChildAt(child:UIComponent, rowPosition:int,cellPosition:int):void
    add a component into the specified cell.

    Parameters:
    UIComponent child -- the component to be added into the cell.
    int rowPosition -- the position of the row contains the specified cell in the table.
    int cellPosition-- the position of the specified cell in the row.
  1. previous:Row
    return the previous row of the current one. if the current is the first row of the table, it returns a null object.

  2. next:Row
    return the next row of the current one. if the current is the last row of the table, it returns a null object.

  3. cells:Array
    return all the cells of the row.

  4. position:int
    return the index of the row in the table' children .

  1. selected:Boolean
    indicates whether the cell is selected.

  2. previous:Cell
    return the previous cell of the current one. if the current is the first cell of the parent row, it returns a null object.

  3. next:Cell
    return the next cell of the current one. if the current is the last cell of the parent row, it returns a null object.

  4. position:int
    return the index of the cell in the parent row' children .

Demo

Here is a simple demo of the usage of this widget. The source is published as well.

Let me have a look

Screenshot

Description

  1. insert controls
    insert some flex controls into each cell of the specified table widget.

  2. remove all controls
    remove all the controls from each cell of the specified table widget.

  3. remove controls from selected cell
    remove all the controls from the selected cells of the specified table widget.

  4. the operations of the table
    (click right mouse button on anywhere of the table to show a context menu)

Note

The "wmode" of your SWF using flex-table and embedded in html page should be "opaque", or the context menu won't work.

Related Projects

rightclickmanager









Hosted by Google Code