Class fvaswing.cells.FvListCellFactory

Implemented Interfaces

ListCellFactory

Description

Cell renderer factory for JList.

Example

   var itemDelete : FvContextMenuItem = new FvContextMenuItem( "delete" );
   var itemDisplay : FvContextMenuItem = new FvContextMenuItem( "show" );
  
   var list : JList = new JList( 
 
  	["male", "female", "others ?"], 
  	
  	new FvListCellFactory ( 
  		new FvDefaultContextMenuCell(), 
  		[ itemDelete, itemDisplay ]
  	)
  	
   );
  
   list.addEventListener( FvContextMenuCellEvent.onContextCellItemEVENT, _onListClick, this );
 

Method Index

new FvListCellFactory()
createNewCell(), getCellHeight(), isAllCellHasSameHeight(), isShareCells(), setAllCellHasSameHeight(), setShareCells(), toString()

Constructor Detail

FvListCellFactory

public function FvListCellFactory(template:ListCell, height:Number)

Constructor.

Parameters

Method Detail

createNewCell

public function createNewCell():ListCell

Creates a new list cell.

setAllCellHasSameHeight

public function setAllCellHasSameHeight(b:Boolean):Void

Defines if all cells are the same height true or not false.

isAllCellHasSameHeight

public function isAllCellHasSameHeight():Boolean

Returns true if all cells have the same height.

setShareCells

public function setShareCells(enabled:Boolean):Void

Sets share cells status.

isShareCells

public function isShareCells():Boolean

Returns share cells status.

getCellHeight

public function getCellHeight():Number

Returns the height for all cells.

toString

public function toString():String

Returns string representation.