Class fvaswing.cells.FvAbstractContextMenuCell

Implemented Interfaces

ListCell TableCell TreeCell

Description

Abstract implementation of an AsWing cell component featuring a contextual menu management.

Take a look on Fever side to see Context menu API.

2 Events type are broadcasted when context menu is engaged.


Broadcasted event is FvContextMenuCellEvent

Extends this class to create your own cell.

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 );
 

See Also

Method Index

getCellComponent(), getCellValue(), invalidate(), revalidate(), setCellValue(), setListCellStatus(), setTableCellStatus(), setTreeCellStatus(), toString()

Method Detail

invalidate

public function invalidate():Void

Simpler this method to speed up performance

revalidate

public function revalidate():Void

Simpler this method to speed up performance

setCellValue

public function setCellValue(value):Void

Sets the value of this cell.

Overrides method to keep strong typing with your own value type.

Parameters

valuewhich should represent on the component of this cell.

getCellValue

public function getCellValue()

Returns the value of the cell.

getCellComponent

public function getCellComponent():Component

Returns concrete cell component.

Overrides method to keep strong typing with your own component.

setListCellStatus

public function setListCellStatus(component:JList, isSelected:Boolean, index:Number):Void

Sets the list cell status, include the owner-JList isSelected, index position.

Parameters

isSelectedtrue to set the cell selected, false to set not selected.
indexthe row position

setTableCellStatus

public function setTableCellStatus(component:JTable, isSelected:Boolean, row:Number, column:Number):Void

Sets the table cell status, include the owner-JTable isSelected, row position, column position.

Parameters

isSelectedtrue to set the cell selected, false to set not selected.
rowthe row position
columnthe column position

setTreeCellStatus

public function setTreeCellStatus(tree:JTree, selected:Boolean, expanded:Boolean, leaf:Boolean, row:Number):Void

Sets the table cell status, include the owner-JTree isSelected, row position, column position.

Parameters

expandedtrue the node is currently expanded, false not.
leaftrue the node represets a leaf, false not.
rowthe row position

toString

public function toString():String

Returns string representation.