Packageorg.aswing
Classpublic class JTable
InheritanceJTable Inheritance Container Inheritance Component Inheritance AWSprite Inheritance flash.display.Sprite
ImplementsCellEditorListener, LayoutManager, TableColumnModelListener, TableModelListener, Viewportable

The JTable is used to display and edit regular two-dimensional tables of cells.

The JTable has many facilities that make it possible to customize its rendering and editing but provides defaults for these features so that simple tables can be set up easily. For example, to set up a table with 10 rows and 10 columns of numbers:

      class MyTableModel extends AbstractTableModel{
          public function getColumnCount():int { return 10; }
          public function getRowCount():int { return 10;}
          public getValueAt(row:int, col:int) { return rowol; }
      };
      var dataModel:MyTableModel = new MyTableModel();
      var table:JTable = new JTable(dataModel);
      var scrollpane:JScrollPane = new JScrollPane(table);
 

Note that if you wish to use a JTable in a standalone view (outside of a JScrollPane) and want the header displayed, you can get it using {



Public Properties
 PropertyDefined by
 InheritedcacheAsBitmap : Boolean
AWSprite
 Inheritedcontainer : Container
Component
 Inheritedfilters : Array
AWSprite
 Inheritedheight : Number
Component
 Inheritedmask : DisplayObject
AWSprite
 InheritednumChildren : int
AWSprite
 Inheritedvisible : Boolean
Component
 Inheritedwidth : Number
Component
 Inheritedx : Number
Component
 Inheritedy : Number
Component
Protected Properties
 PropertyDefined by
 Inheritedbounds : IntRectangle
Component
  cellPane : Container
JTable
 Inheritedchildren : Array
Container
 Inheritedd_numChildren : int
AWSprite
 InheriteddrawTransparentTrigger : Boolean = true
Component
 Inheritedd_visible : Boolean
Returns the DisplayObject.visible directly.
Component
 Inheritedd_x : Number
Returns DisplayObject.x directly.
Component
 Inheritedd_y : Number
Returns DisplayObject.y directly.
Component
  headerPane : Container
JTable
 Inheritedlayout : LayoutManager
Container
 InheritedreadyToPaint : Boolean
Component
 Inheritedui : ComponentUI
Component
 Inheritedvalid : Boolean
Component
Public Methods
 MethodDefined by
  
JTable(dm:TableModel = null)
Constructs a default JTable.
JTable
  
Invoked when the row selection changes -- repaints to show the new selection.
JTable
 Inherited
addChild(dis:DisplayObject):DisplayObject
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
AWSprite
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
AWSprite
  
addColumn(aColumn:TableColumn):void
Appends aColumn to the end of the array of columns held by this JTable's column model.
JTable
  
addColumnSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Adds the columns from index0 to index1, inclusive, to the current selection.
JTable
  
addColumnSelectionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Adds a listener to column selection changed.
JTable
 Inherited
Adds a component to be the acceptable drag initiator to this component.
Component
  
addLayoutComponent(comp:Component, constraints:Object):void
do nothing
JTable
  
addRowSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Adds the rows from index0 to index1, inclusive, to the current selection.
JTable
  
addSelectionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Adds a listener to row selection changed.
JTable
  
addStateListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a listener to listen the viewpoat state change event.
JTable
 Inherited
append(com:Component, constraints:Object = null):void
On Component just can add to one Container.
Container
 Inherited
appendAll(... coms):void
Adds one or more component to the container with null constraints
Container
 Inherited
bringToBottom(child:DisplayObject):void
Brings a child to bottom.
AWSprite
 Inherited
bringToTop(child:DisplayObject):void
Brings a child to top.
AWSprite
  
changeSelection(rowIndex:int, columnIndex:int, toggle:Boolean, extend:Boolean, programmatic:Boolean = true):void
Updates the selection models of the table, depending on the state of the two flags: toggle and extend.
JTable
  
clearSelection(programmatic:Boolean = true):void
Deselects all selected columns and rows.
JTable
  
Invoked when a column is added to the table column model.
JTable
  
Returns the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1].
JTable
  
Invoked when a column is moved due to a margin change.
JTable
  
Invoked when a column is repositioned.
JTable
  
Invoked when a column is removed from the table column model.
JTable
  
columnSelectionChanged(source:TableColumnModel, firstIndex:int, lastIndex:int, programmatic:Boolean):void
Invoked when the selection model of the TableColumnModel is changed.
JTable
 Inherited
Component
 Inherited
containsChild(child:DisplayObject):Boolean
Returns whether child is directly child of this sprite, true only if getChildIndex(child) >= 0.
AWSprite
  
convertColumnIndexToModel(viewColumnIndex:int):int
Maps the index of the column in the view at viewColumnIndex to the index of the column in the table model.
JTable
  
convertColumnIndexToView(modelColumnIndex:int):int
Maps the index of the column in the table model at modelColumnIndex to the index of the column in the view.
JTable
  
JTable
  
JTable
  
Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.
JTable
  
JTable
  
JTable
  
JTable
  
JTable
  
doLayout():void
Causes this table to lay out its rows and columns.
JTable
  
editCellAt(row:int, column:int, clickCount:int = -1):Boolean
editCellAt(row:int, column:int, clickCount:int):Boolean
editCellAt(row:int, column:int):Boolean

Programmatically starts editing the cell at row and column, if those indices are in the valid range, and the cell at those indices is editable.

JTable
  
Invoked when editing is canceled.
JTable
  
Invoked when editing is finished.
JTable
  
ensureCellIsVisible(row:int, column:int):void
Scrolls the JTable to make the specified cell completely visible.
JTable
 Inherited
fireFocusKeyDownEvent(e:KeyboardEvent):void
Component
 Inherited
fireFocusKeyUpEvent(e:KeyboardEvent):void
Component
 Inherited
getAlignmentX():Number
Returns the alignment along the x axis.
Component
 Inherited
getAlignmentY():Number
Returns the alignment along the y axis.
Component
 Inherited
getAlpha():Number
Returns the alpha of this component.
Component
  
Determines whether the table will create default columns from the model.
JTable
  
Returns the auto resize mode of the table.
JTable
 Inherited
getAwmlID():String
Returns ID used to identify components created from AWML.
Component
 Inherited
getAwmlIndex():Number
Returns position index of the component inside its AWML container.
Component
 Inherited
Returns namespace name used to identify components created from AWML.
Component
 Inherited
Gets the background color of this component.
Component
 Inherited
Returns the background decorator of this component.
Component
 Inherited
Returns the border.
Component
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
Same to DisplayObject.getBounds(), just add a explaination here that if you want to get the component bounds, see {
Component
  
JTable
  
JTable
  
getCellFactory(row:int, column:int):TableCellFactory
JTable
  
Returns the container that holds the cells.
JTable
  
getCellRect(row:int, column:int, includeSpacing:Boolean):IntRectangle
Returns a rectangle for the cell that lies at the intersection of row and column.
JTable
  
Returns true if both row and column selection models are enabled.
JTable
 Inherited
getChildAt(index:int):DisplayObject
AWSprite
 Inherited
getChildByName(name:String):DisplayObject
AWSprite
 Inherited
getChildIndex(child:DisplayObject):int
AWSprite
 Inherited
Returns the value of the property with the specified key.
Component
 Inherited
Returns the clip bounds.
Component
  
getColumn(identifier:Object):TableColumn
Returns the TableColumn object for the column in the table whose identifier is equal to identifier, when compared using equals.
JTable
  
getColumnAt(columnIndex:int):TableColumn
Returns the TableColumn object for the column at columnIndex.
JTable
  
getColumnClass(column:int):String
Returns the type of the column appearing in the view at column position column.
JTable
  
Returns the number of columns in the column model.
JTable
  
Returns the TableColumnModel that contains all column information of this table.
JTable
  
getColumnName(column:int):String
Returns the name of the column appearing in the view at column position column.
JTable
  
Returns true if columns can be selected.
JTable
 Inherited

Stores the bounds value of this component into "return value" rv and returns rv.

Component
 Inherited
getComponent(index:int):Component
Gets the nth(index) component in this container.
Container
 Inherited
Gets the number of components in this container.
Container
 Inherited
getConstraints():Object
Gets cpmponent's constraints.
Component
  
JTable
  
Returns the cell factory to be used when no factory has been set in a TableColumn.
JTable
  
getDefaultEditor(columnClass:String):TableCellEditor
Returns the editor to be used when no editor has been set in a TableColumn.
JTable
  
Returns the index of the column that contains the cell currently being edited.
JTable
  
Returns the index of the row that contains the cell currently being edited.
JTable
  
JTable
 Inherited
Returns the focus manager for this component's stage, or null if this component is not on stage.
Component
 Inherited
Returns the focus traversal policy of this container, it will return its parent's focus traversal policy if its self is null.
Container
 Inherited
Gets the font of this component.
Component
 Inherited
Gets the foreground color of this component.
Component
 Inherited
Returns the foreground decorator of this component.
Component
 Inherited
Stores the global location value of this component into "return value" p and returns p.
Component
  
Returns the color used to draw grid lines.
JTable
  
Returns the header height.
JTable
 Inherited
getHeight():int
Returns the current height of this component
Component
 Inherited
Returns the current top index for a new child(none forground child).
AWSprite
  
JTable
  
JTable
 Inherited
Returns the index of the child component in this container.
Container
 Inherited
If a border has been set on this component, returns the border's insets; otherwise returns an empty insets.
Component
  
Returns the horizontal and vertical space between cells.
JTable
 Inherited
getInternalFocusObject():InteractiveObject
Returns the object to receive the focus for this component.
Component
 Inherited
Returns the keyboard manager of this component's JRootPane ancestor.
Component
 Inherited
Container
  
return 0
JTable
  
return 0
JTable
 Inherited
Stores the location value of this component into "return value" rv and returns rv.
Component
  
Returns the location in the JTable view area of the logic location.
JTable
 Inherited
Returns the current bottom index for none background child.
AWSprite
 Inherited
Returns getMaximumSize().height
Component
 Inherited
Component
 Inherited
Returns getMaximumSize().width
Component
 Inherited
Returns getMinimumSize().height
Component
 Inherited
Component
 Inherited
Returns getMinimumSize().width
Component
  
Returns the TableModel that provides the data displayed by this JTable.
JTable
 Inherited
Returns the coordinate of the mouse position, in pixels, in the component scope.
Component
 Inherited
getName():String
Returns the name of the component
Component
 Inherited
Returns the bounds that component should paint in.
Component
 Inherited
Returns the Container parent, if it parent is not a Container, null will be returned.
Component
  
Returns the location in the JTable view area of the logic location.
JTable
 Inherited
Returns getPreferredSize().height
Component
  
Returns the preferred size of the viewport for this table.
JTable
 Inherited
Component
 Inherited
Returns getPreferredSize().width
Component
 Inherited
Returns the first JRootPane ancestor of this component.
Component
  
Returns the number of rows in this table's model.
JTable
  
Returns the height of a table row, in pixels.
JTable
  
Gets the amount of empty space, in pixels, between cells.
JTable
  
Returns true if rows can be selected.
JTable
  
Returns the index of the first selected column, -1 if no column is selected.
JTable
  
Returns the number of selected columns.
JTable
  
Returns the indices of all selected columns.
JTable
  
Returns the index of the first selected row, -1 if no row is selected.
JTable
  
Returns the number of selected rows.
JTable
  
Returns the indices of all selected rows.
JTable
  
Returns the background color for selected cells.
JTable
  
Returns the foreground color for selected cells.
JTable
  
Returns the ListSelectionModel that is used to maintain row selection state.
JTable
  
Returns true if the table draws horizontal lines between cells, false if it doesn't.
JTable
  
Returns true if the table draws vertical lines between cells, false if it doesn't.
JTable
 Inherited
Stores the size value of this component into "return value" rv and returns rv.
Component
  
Returns the tableHeader used by this JTable.
JTable
  
JTable
 Inherited
getToolTipText():String
Returns the tooltip string that has been set with setToolTipText.
Component
 Inherited
Component
  
getUIClassID():String
Returns the suffix used to construct the name of the L&F class used to render this component.
JTable
  
getValueAt(row:int, column:int):Object
Returns the cell value at row and column.
JTable
  
JTable
  
JTable
  
JTable
  
JTable
  
JTable
 Inherited
getWidth():int
Returns the current width of this component
Component
 Inherited
getX():int
Returns the current x coordinate of the components.
Component
 Inherited
getY():int
Returns the current y coordinate of the components.
Component
 Inherited
Component
 Inherited
hitTestMouse():Boolean
Returns whether the component hit the mouse.
Component
 Inherited
hitTestObject(obj:DisplayObject):Boolean
AWSprite
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
AWSprite
 Inherited
insert(i:int, com:Component, constraints:Object = null):void
Add component to spesified index.
Container
 Inherited
insertAll(index:int, ... coms):void
Insets one or more component to the container with null constraints at specified starting index.
Container
 Inherited
invalidate():void
Invalidates the container.
Container
  
JTable
 Inherited
Clears this component and all parents above it's preferred size caches.
Component
 Inherited
Checks if the component is contained in the component hierarchy of this container.
Container
 Inherited
Returns whether or not the preferred size, minimum size and max size cache is turned on.
Component
  
isCellEditable(row:int, column:int):Boolean
Returns true if the cell at row and column is editable.
JTable
  
isCellSelected(row:int, column:int):Boolean
Returns true if the specified indices are in the valid range of rows and columns and the cell at the specified position is selected.
JTable
 Inherited
isClipMasked():Boolean
Returns whether the component clip should be masked by its bounds.
AWSprite
  
isColumnSelected(column:int):Boolean
Returns true if the specified index is in the valid range of columns, and the column at that index is selected.
JTable
 Inherited
Returns whether the component is acceptable drag initiator for this component.
Component
 Inherited
isDragEnabled():Boolean
Returns whether this component can fire ON_DRAG_RECOGNIZED event.
Component
 Inherited
isDropTrigger():Boolean
Returns whether this component can trigger dragging component to fire drag events when dragging over to this component.(Default value is false)
Component
  
isEditing():Boolean
Returns true if a cell is being edited.
JTable
 Inherited
isEnabled():Boolean
Returns whether the component is enabled.
Component
 Inherited
isFocusable():Boolean
Returns whether this Component can be focused.
Component
 Inherited
isFocusableSet():Boolean
Returns whether or not the opaque property is set by user.
Component
 Inherited
isFocusOwner():Boolean
Returns true if this Component is the focus owner.
Component
 Inherited
isFontValidated():Boolean
Returns whether the new font are applied and taked effect.
Component
 Inherited
isOnStage():Boolean
Determines whether or not this component is on stage(on the display list).
Component
 Inherited
isOpaque():Boolean
Returns true if this component is completely opaque.
Component
 Inherited
isOpaqueSet():Boolean
Returns whether or not the opaque property is set by user.
Component
  
isRowSelected(row:int):Boolean
Returns true if the specified index is in the valid range of rows, and the row at that index is selected.
JTable
 Inherited
isShowing():Boolean
Determines whether this component is showing on screen.
Component
 Inherited
isUIElement():Boolean
Returns true if this component is just a ui element component, false means this component is a regular use created component.
Component
 Inherited
isValid():Boolean
Determines whether this component is valid.
Component
 Inherited
isValidateRoot():Boolean
If this method returns true, revalidate calls by descendants of this component will cause the entire tree beginning with this root to be validated.
Component
 Inherited
isVisible():Boolean
Component
  
position and fill cells here
JTable
 Inherited
makeFocus():void
Makes this component's internal focus object to be the stage focus directly, without any judgement.
Component
  
JTable
  
JTable
  
moveColumn(column:int, targetColumn:int):void
Moves the column column to the position currently occupied by the column targetColumn in the view.
JTable
 Inherited
pack():void
Causes this component to be sized to fit the preferred size.
Component
 Inherited
paintFocusRect(force:Boolean = false):void
Paints the focus rect if need.
Component
 Inherited
Redraw the component UI face immediately if it is visible and ready to paint.
Component
 Inherited
Calls parent reAppendChildren if parent is a container.
Component
  
JTable
 Inherited
putClientProperty(key:*, value:*):void
Adds an arbitrary key/value "client property" to this component.
Component
 Inherited
Removes all children and then append them with their constraints.
Container
 Inherited
reAppendToParent(constraints:Object = null):void
Removes this component from its parent and then append it with specified constraints.
Component
 Inherited
Remove the specified child component.
Container
 Inherited
removeAll():void
Remove all child components.
Container
 Inherited
Remove the specified index child component.
Container
 Inherited
removeChild(child:DisplayObject):DisplayObject
Removes a normal display object child.
Container
 Inherited
removeChildAt(index:int):DisplayObject
Removes a normal display object child with index.
Container
  
removeColumn(aColumn:TableColumn):void
Removes aColumn from this JTable's array of columns.
JTable
  
removeColumnSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Deselects the columns from index0 to index1, inclusive.
JTable
  
removeColumnSelectionListener(listener:Function):void
Removes a listener from column selection changed listeners.
JTable
 Inherited
Removes a component to be the acceptable drag initiator to this component.
Component
  
removeEditor():void
JTable
 Inherited
Removes this component from its parent, whatever it is as a component child or only a display object child, or it's parent is just a display object container.
Component
  
do nothing
JTable
  
removeRowSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Deselects the rows from index0 to index1, inclusive.
JTable
  
removeSelectionListener(listener:Function):void
Removes a listener from row selection changed listeners.
JTable
  
removeStateListener(listener:Function):void
Removes a state listener.
JTable
 Inherited
repaint():void
Redraws the component face next RENDER event.This method can be called often, so it needs to execute quickly.
Component
 Inherited
Component
 Inherited
requestFocus():Boolean
Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.
Component
  
JTable
 Inherited
revalidate():void
Supports deferred automatic layout.
Component
 Inherited
Component
  
rowAtPoint(point:IntPoint):int
Returns the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1].
JTable
  
scrollRectToVisible(contentRect:IntRectangle, programmatic:Boolean = true):void
JTable
  
selectAll(programmatic:Boolean = true):void
Selects all rows, columns, and cells in the table.
JTable
 Inherited
setAlignmentX(ax:Number):void
Component
 Inherited
setAlignmentY(ay:Number):void
Component
 Inherited
setAlpha(alpha:Number):void
Indicates the alpha transparency value of the component.
Component
  
setAutoCreateColumnsFromModel(autoCreateColumnsFromModel:Boolean):void
Sets this table's autoCreateColumnsFromModel flag.
JTable
  
setAutoResizeMode(mode:int):void
Sets the table's auto resize mode when the table is resized.
JTable
 Inherited
setAwmlID(id:String):void
Sets ID used to identify components created from AWML.
Component
 Inherited
setAwmlIndex(index:Number):void
Sets ID used to identify components created from AWML.
Component
 Inherited
setAwmlNamespace(theNamespace:String):void
Sets namespace used to identify components created from AWML.
Component
 Inherited
Sets the background color of this component.
Component
 Inherited
Sets a decorator to be the component background, it will represent the component background with a DisplayObject.
Component
 Inherited
setBorder(b:Border):void
Sets the border for the component, null to remove border.
Component
 Inherited
This method will call setComBounds()
Component
 Inherited
setCachePreferSizes(b:Boolean):void
Sets whether or not turn on the preferred size, minimum size and max size cache.
Component
  
JTable
  
setCellSelectionEnabled(cellSelectionEnabled:Boolean):void
Sets whether this table allows both a column selection and a row selection to exist simultaneously.
JTable
 Inherited
setChildIndex(child:DisplayObject, index:int):void
AWSprite
 Inherited
Sets the clip bounds, a rectangle mask to make specified bounds visible.
Component
 Inherited
setClipMasked(m:Boolean):void
Sets whether the component clip should be masked by its bounds.
AWSprite
 Inherited
Sets the clip size, a rectangle mask to make specified bounds visible.
Component
  
setColumnModel(columnModel:TableColumnModel):void
Sets the column model for this table to newModel and registers for listener notifications from the new column model.
JTable
  
setColumnSelectionAllowed(columnSelectionAllowed:Boolean):void
Sets whether the columns in this model can be selected.
JTable
  
setColumnSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Selects the columns from index0 to index1, inclusive.
JTable
 Inherited
Moves and resizes this component.
Component
 Inherited
setComBoundsXYWH(x:int, y:int, w:int, h:int):void
Moves and resizes this component.
Component
 Inherited
setConstraints(constraints:Object):void
Sets component's constraints.
Component
  
setDefaultCellFactory(columnClass:String, renderer:TableCellFactory):void
Sets a default cell factory to be used if no renderer has been set in a TableColumn.
JTable
  
setDefaultEditor(columnClass:String, editor:TableCellEditor):void
Sets a default cell editor to be used if no editor has been set in a TableColumn.
JTable
 Inherited
Sets a function to judge whether a component is acceptable drag initiator.
Component
 Inherited
setDragEnabled(b:Boolean):void
Sets whether this component can fire ON_DRAG_RECOGNIZED event.
Component
 Inherited
setDropTrigger(b:Boolean):void
Sets whether this component can trigger dragging component to fire drag events when dragging over to this component.
Component
  
setEditingColumn(aColumn:int):void
JTable
  
setEditingRow(aRow:int):void
JTable
 Inherited
setEnabled(b:Boolean):void
Enable or disable the component.
Component
 Inherited
setFocusable(b:Boolean):void
Sets the focusable state of this Component to the specified value.
Component
 Inherited
setFocusableSet(b:Boolean):void
Indicate that the focusable property is set by user or not.
Component
 Inherited
Sets the focus traversal policy to this container, or sets null to make this container use its parent's focus traversal policy.
Container
 Inherited
setFont(newFont:ASFont):void
Sets the text font for this component.
this method will cause a repaint and revalidate method call.
Component
 Inherited
setFontValidated(b:Boolean):void
Sets whether the new font are applied and taked effect.
Component
 Inherited
Sets the foreground color of this component.
Component
 Inherited
Sets a decorator to be the component foreground, it will represent the component foreground with a DisplayObject on top of other children of this component.
Component
 Inherited
Set the component's location in global coordinate.
Component
 Inherited
setGlobalLocationXY(x:int, y:int):void
Set the component's location in global coordinate.
Component
  
setGridColor(gridColor:ASColor):void
Sets the color used to draw grid lines to gridColor and redisplays.
JTable
 Inherited
setHeight(height:Number):void
Sets the component's height.
Component
  
setHorizontalBlockIncrement(increment:int):void
JTable
  
setHorizontalUnitIncrement(increment:int):void
JTable
  
setIntercellSpacing(intercellSpacing:IntDimension):void
Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.
JTable
 Inherited
setLayout(layout:LayoutManager):void
Container
 Inherited
setLocation(newPos:IntPoint):void
Set the component's location, if it is diffs from old location, invalidate it to wait validate.
Component
 Inherited
setLocationXY(x:int, y:int):void
Component
 Inherited
setMaximumHeight(maximumHeight:int):void
Sets maximum height, -1 means auto count.
Component
 Inherited
setMaximumSize(maximumSize:IntDimension):void
setMaximumSize(d:IntDimension)
setMaximumSize(width:Number, height:Number)

Set the maximumSize, then the component's maximumSize is specified.

Component
 Inherited
setMaximumWidth(maximumWidth:int):void
Sets maximum width, -1 means auto count.
Component
 Inherited
setMinimumHeight(minimumHeight:int):void
Sets minimum height, -1 means auto count.
Component
 Inherited
setMinimumSize(minimumSize:IntDimension):void
setMinimumSize(d:IntDimension)
setMinimumSize(width:Number, height:Number)

Set the minimumSize, then the component's minimumSize is specified.

Component
 Inherited
setMinimumWidth(minimumWidth:int):void
Sets minimum width, -1 means auto count.
Component
  
setModel(dataModel:TableModel):void
Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.
JTable
 Inherited
setName(name:String):void
Sets the name of this component
Component
 Inherited
setOpaque(b:Boolean):void
If true the component paints every pixel within its bounds.
Component
 Inherited
setOpaqueSet(b:Boolean):void
This method will be called to set true when you set the opaque by setOpaque().
Component
 Inherited
setPreferredHeight(preferredHeight:int):void
Sets preferred width, -1 means auto count.
Component
  
Sets the preferred size of the viewport for this table.
JTable
 Inherited
setPreferredSize(preferredSize:IntDimension):void
setPreferredSize(d:IntDimension)
setPreferredSize(width:Number, height:Number)

Set the preferredSize, then the component's preferredSize is specified.

Component
 Inherited
setPreferredWidth(preferredWidth:int):void
Sets preferred width, -1 means auto count.
Component
  
setRowHeight(rowHeight:int):void
Sets the height, in pixels, of all cells to rowHeight, revalidates, and repaints.
JTable
  
setRowMargin(rowMargin:int):void
Sets the amount of empty space between cells in adjacent rows.
JTable
  
setRowSelectionAllowed(rowSelectionAllowed:Boolean):void
Sets whether the rows in this model can be selected.
JTable
  
setRowSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Selects the rows from index0 to index1, inclusive.
JTable
  
setSelectionBackground(selectionBackground:ASColor):void
Sets the background color for selected cells.
JTable
  
setSelectionForeground(selectionForeground:ASColor):void
Sets the foreground color for selected cells.
JTable
  
setSelectionMode(selectionMode:int):void
Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.
JTable
  
Sets the row selection model for this table to newModel and registers for listener notifications from the new selection model.
JTable
  
setShowGrid(showGrid:Boolean):void
Sets whether the table draws grid lines around cells.
JTable
  
setShowHorizontalLines(showHorizontalLines:Boolean):void
Sets whether the table draws horizontal lines between cells.
JTable
  
setShowVerticalLines(showVerticalLines:Boolean):void
Sets whether the table draws vertical lines between cells.
JTable
  
setSize(newSize:IntDimension):void
JTable
 Inherited
setSizeWH(w:int, h:int):void
Component
  
setTableHeader(tableHeader:JTableHeader):void
Sets the tableHeader working with this JTable to newHeader.
JTable
 Inherited
setToolTipText(t:String):void
Registers the text to display in a tool tip.
Component
  
setUI(newUI:ComponentUI):void
Sets the L&F object that renders this component and repaints.
JTable
 Inherited
setUIElement(b:Boolean):void
Sets the component is a ui element or not.
Component
  
setValueAt(aValue:Object, row:int, column:int):void
Sets the value for the cell in the table model at row and column.
JTable
  
setVerticalBlockIncrement(increment:int):void
JTable
  
setVerticalUnitIncrement(increment:int):void
JTable
  
JTable
  
setViewPosition(p:IntPoint, programmatic:Boolean = true):void
JTable
 Inherited
setVisible(v:Boolean):void
Set a component to be hide or shown.
Component
 Inherited
setWidth(width:int):void
Sets the component's width.
Component
 Inherited
setX(x:int):void
Sets the x coordinate of the components.
Component
 Inherited
setY(y:int):void
Sets the y coordinate of the components.
Component
 Inherited
swapChildren(child1:DisplayObject, child2:DisplayObject):void
AWSprite
 Inherited
swapChildrenAt(index1:int, index2:int):void
AWSprite
  
Invoked when this table's TableModel generates a TableModelEvent.
JTable
 Inherited
toString():String
Component
 Inherited
transferFocus():Boolean
Transfers the focus to the next component, as though this Component were the focus owner.
Component
 Inherited
Transfers the focus to the previous component, as though this Component were the focus owner.
Component
  
updateUI():void
Notification from the UIManager that the L&F has changed.
JTable
 Inherited
validate():void
Validates this container and all of its subcomponents.
Container
Protected Methods
 MethodDefined by
  
changeSelectionModel(sm:ListSelectionModel, index:int, toggle:Boolean, extend:Boolean, selected:Boolean, programmatic:Boolean = true):void
JTable
 Inherited
Component
 Inherited
call the ui, if ui return null, ehn call layout to count.
Container
 Inherited
call the ui, if ui return null, ehn call layout to count.
Container
 Inherited
call the ui, if ui return null, ehn call layout to count.
Container
 Inherited
d_addChild(child:DisplayObject):DisplayObject
AWSprite
 Inherited
d_addChildAt(child:DisplayObject, index:int):DisplayObject
AWSprite
 Inherited
d_getChildAt(index:int):DisplayObject
AWSprite
 Inherited
d_getChildByName(name:String):DisplayObject
AWSprite
 Inherited
d_getChildIndex(child:DisplayObject):int
AWSprite
 Inherited
d_removeChild(child:DisplayObject):DisplayObject
AWSprite
 Inherited
d_removeChildAt(index:int):DisplayObject
AWSprite
 Inherited
d_setChildIndex(child:DisplayObject, index:int):void
AWSprite
 Inherited
d_swapChildren(child1:DisplayObject, child2:DisplayObject):void
AWSprite
 Inherited
d_swapChildrenAt(index1:int, index2:int):void
AWSprite
  
fireStateChanged(programmatic:Boolean = true):void
JTable
 Inherited
getBackgroundChild():DisplayObject
Returns the background child.
AWSprite
 Inherited
Container
 Inherited
Container
 Inherited
Override this to return another component that the focus should be transmit to.
Component
 Inherited
getForegroundChild():DisplayObject
Returns the foreground child.
AWSprite
 Inherited
insertImp(i:int, com:Component, constraints:Object = null):void
Container
 Inherited
Makes this component and all parents above it are marked as needing to be laid out.
Component
 Inherited
isChild(child:DisplayObject):Boolean
Returns whether or not the child is this sprite's direct child.
AWSprite
 Inherited
locate():void
Locate the component to the current location.
Component
 Inherited
draw the component interface in specified bounds.
Component
 Inherited
Container
 Inherited
setBackgroundChild(child:DisplayObject = null):void
Sets the child to be the component background, it will be add to the bottom of all other children.
AWSprite
 Inherited
AWSprite
 Inherited
setForegroundChild(child:DisplayObject = null):void
Sets the child to be the component foreground, it will be add to the top of all other children.
AWSprite
 Inherited
size():void
Do the process when size changed.
Component
  
updateSubComponentUI(componentShell:*):void
JTable
Events
 EventSummaryDefined by
 Inherited Dispatched when the component is clicked continuesly.Component
   Dispatched when the column selection changed.JTable
 Inherited Dispatched when a component is added to a container.Container
 Inherited Dispatched when a component is removed from a container.Container
 Inherited Dispatched when a drag is drop on this component.Component
 Inherited Dispatched when a drag is enter this component area.Component
 Inherited Dispatched when a drag is exit this component area.Component
 Inherited Dispatched when the component is recongnized that it can be drag start.Component
 Inherited Dispatched when the component gained the focus from it is not the focus owner Component
 Inherited Dispatched when the key down and the component is the focus owner.Component
 Inherited Dispatched when the key up and the component is the focus owner.Component
 Inherited Dispatched when the component lost the focus from it was the focus owner.Component
 Inherited Dispatched when the component visible is set to false from true.Component
 Inherited Dispatched when the component is moved.Component
 Inherited Dispatched when the component is painted.Component
 Inherited Dispatched when the mouse released or released out side.AWSprite
 Inherited Dispatched only when the mouse released out side.AWSprite
 Inherited Dispatched when the component is resized.Component
   Dispatched when the row selection changed.JTable
 Inherited Dispatched when the component visible is set to true from false.Component
   Dispatched when the cell editing canceled.JTable
   Dispatched when the cell editing started.JTable
   Dispatched when the cell editing finished.JTable
Public Constants
 ConstantDefined by
  AUTO_INCREMENT : int = -2.147483648E9
[static] The default unit/block increment, it means auto count a value.
JTable
  AUTO_RESIZE_ALL_COLUMNS : int = 4
[static] During all resize operations, proportionately resize all columns.
JTable
  AUTO_RESIZE_LAST_COLUMN : int = 3
[static] During all resize operations, apply adjustments to the last column only.
JTable
  AUTO_RESIZE_NEXT_COLUMN : int = 1
[static] When a column is adjusted in the UI, adjust the next column the opposite way.
JTable
  AUTO_RESIZE_OFF : int = 0
[static] Do not adjust column widths automatically; use a scrollbar.
JTable
  AUTO_RESIZE_SUBSEQUENT_COLUMNS : int = 2
[static] During UI adjustment, change subsequent columns to preserve the total width; this is the default behavior.
JTable
  MULTIPLE_SELECTION : int = 1
[static] Can select any item at a time.
JTable
  SINGLE_SELECTION : int = 0
[static] Only can select one most item at a time.
JTable
Property detail
cellPaneproperty
protected var cellPane:Container
headerPaneproperty 
protected var headerPane:Container
Constructor detail
JTable()constructor
public function JTable(dm:TableModel = null)

Constructs a default JTable.

Parameters
dm:TableModel (default = null)

See also

Method detail
__listSelectionChanged()method
public function __listSelectionChanged(e:SelectionEvent):void

Invoked when the row selection changes -- repaints to show the new selection.

Application code will not use these methods explicitly, they are used internally by JTable. Parameters

e:SelectionEvent — the event received
addColumn()method 
public function addColumn(aColumn:TableColumn):void

Appends aColumn to the end of the array of columns held by this JTable's column model. If the column name of aColumn is null, sets the column name of aColumn to the name returned by getModel().getColumnName().

To add a column to this JTable to display the modelColumn'th column of data in the model with a given width, cellRenderer, and cellEditor you can use:

         addColumn(new TableColumn(modelColumn, width, cellRenderer, cellEditor));
     
[Any of the TableColumn constructors can be used instead of this one.] The model column number is stored inside the TableColumn and is used during rendering and editing to locate the appropriates data values in the model. The model column number does not change when columns are reordered in the view. Parameters
aColumn:TableColumn — aColumn the TableColumn to be added

See also

addColumnSelectionInterval()method 
public function addColumnSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void

Adds the columns from index0 to index1, inclusive, to the current selection.

Parameters
index0:int — index0 one end of the interval
 
index1:int — index1 the other end of the interval
 
programmatic:Boolean (default = true) — indicate if this is a programmatic change
addColumnSelectionListener()method 
public function addColumnSelectionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void

Adds a listener to column selection changed.

Parameters
listener:Function — the listener to be add.
 
priority:int (default = 0) — the priority
 
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak.

See also

org.aswing.event.SelectionEvent
addSelectionListener()
addLayoutComponent()method 
public function addLayoutComponent(comp:Component, constraints:Object):void

do nothing

Parameters
comp:Component
 
constraints:Object
addRowSelectionInterval()method 
public function addRowSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void

Adds the rows from index0 to index1, inclusive, to the current selection.

Parameters
index0:int — index0 one end of the interval
 
index1:int — index1 the other end of the interval
 
programmatic:Boolean (default = true) — indicate if this is a programmatic change
addSelectionListener()method 
public function addSelectionListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void

Adds a listener to row selection changed.

Parameters
listener:Function — the listener to be add.
 
priority:int (default = 0) — the priority
 
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak.

See also

org.aswing.event.SelectionEvent
addStateListener()method 
public function addStateListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void

Add a listener to listen the viewpoat state change event.

When the viewpoat's state changed, the state is all about:

Parameters
listener:Function — the listener
 
priority:int (default = 0) — the priority
 
useWeakReference:Boolean (default = false) — Determines whether the reference to the listener is strong or weak.

See also

org.aswing.event.InteractiveEvent.STATE_CHANGED
changeSelection()method 
public function changeSelection(rowIndex:int, columnIndex:int, toggle:Boolean, extend:Boolean, programmatic:Boolean = true):void

Updates the selection models of the table, depending on the state of the two flags: toggle and extend. Most changes to the selection that are the result of keyboard or mouse events received by the UI are channeled through this method so that the behavior may be overridden by a subclass. Some UIs may need more functionality than this method provides, such as when manipulating the lead for discontiguous selection, and may not call into this method for some selection changes.

This implementation uses the following conventions:

Parameters
rowIndex:int — rowIndex affects the selection at row
 
columnIndex:int — columnIndex affects the selection at column
 
toggle:Boolean — toggle see description above
 
extend:Boolean — extend if true, extend the current selection
 
programmatic:Boolean (default = true) — indicate if this is a programmatic change
changeSelectionModel()method 
protected function changeSelectionModel(sm:ListSelectionModel, index:int, toggle:Boolean, extend:Boolean, selected:Boolean, programmatic:Boolean = true):voidParameters
sm:ListSelectionModel
 
index:int
 
toggle:Boolean
 
extend:Boolean
 
selected:Boolean
 
programmatic:Boolean (default = true)
clearSelection()method 
public function clearSelection(programmatic:Boolean = true):void

Deselects all selected columns and rows.

Parameters
programmatic:Boolean (default = true) — indicate if this is a programmatic change
columnAdded()method 
public function columnAdded(e:TableColumnModelEvent):void

Invoked when a column is added to the table column model.

Application code will not use these methods explicitly, they are used internally by JTable. Parameters

e:TableColumnModelEvent

See also

TableColumnModelListener
columnAtPoint()method 
public function columnAtPoint(point:IntPoint):int

Returns the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1].

Parameters
point:IntPoint — point the location of interest

Returns
int — the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1]

See also

columnMarginChanged()method 
public function columnMarginChanged(source:TableColumnModel):void

Invoked when a column is moved due to a margin change. If a cell is being edited, then editing is stopped and the cell is redrawn.

Application code will not use these methods explicitly, they are used internally by JTable. Parameters

source:TableColumnModel — e the event received

See also

TableColumnModelListener
columnMoved()method 
public function columnMoved(e:TableColumnModelEvent):void

Invoked when a column is repositioned. If a cell is being edited, then editing is stopped and the cell is redrawn.

Application code will not use these methods explicitly, they are used internally by JTable. Parameters

e:TableColumnModelEvent — the event received

See also

TableColumnModelListener
columnRemoved()method 
public function columnRemoved(e:TableColumnModelEvent):void

Invoked when a column is removed from the table column model.

Application code will not use these methods explicitly, they are used internally by JTable. Parameters

e:TableColumnModelEvent

See also

TableColumnModelListener
columnSelectionChanged()method 
public function columnSelectionChanged(source:TableColumnModel, firstIndex:int, lastIndex:int, programmatic:Boolean):void

Invoked when the selection model of the TableColumnModel is changed.

Application code will not use these methods explicitly, they are used internally by JTable. Parameters

source:TableColumnModel — e the event received
 
firstIndex:int
 
lastIndex:int
 
programmatic:Boolean

See also

TableColumnModelListener
convertColumnIndexToModel()method 
public function convertColumnIndexToModel(viewColumnIndex:int):int

Maps the index of the column in the view at viewColumnIndex to the index of the column in the table model. Returns the index of the corresponding column in the model. If viewColumnIndex is less than zero, returns viewColumnIndex.

Parameters
viewColumnIndex:int — viewColumnIndex the index of the column in the view

Returns
int — the index of the corresponding column in the model

See also

convertColumnIndexToView()method 
public function convertColumnIndexToView(modelColumnIndex:int):int

Maps the index of the column in the table model at modelColumnIndex to the index of the column in the view. Returns the index of the corresponding column in the view; returns -1 if this column is not being displayed. If modelColumnIndex is less than zero, returns modelColumnIndex.

Parameters
modelColumnIndex:int — modelColumnIndex the index of the column in the model

Returns
int — the index of the corresponding column in the view

See also

createDefaultCellFactories()method 
public function createDefaultCellFactories():void
createDefaultColumnModel()method 
public function createDefaultColumnModel():TableColumnModel

Returns
TableColumnModel
createDefaultColumnsFromModel()method 
public function createDefaultColumnsFromModel():void

Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.

Clears any existing columns before creating the new columns based on information from the model.

See also

createDefaultDataModel()method 
public function createDefaultDataModel():TableModel

Returns
TableModel
createDefaultEditors()method 
public function createDefaultEditors():void
createDefaultSelectionModel()method 
public function createDefaultSelectionModel():ListSelectionModel

Returns
ListSelectionModel
createDefaultTableHeader()method 
public function createDefaultTableHeader():JTableHeader

Returns
JTableHeader
doLayout()method 
public override function doLayout():void

Causes this table to lay out its rows and columns. Overridden so that columns can be resized to accomodate a change in the size of a containing parent. Resizes one or more of the columns in the table so that the total width of all of this JTable's columns is equal to the width of the table.

Before the layout begins the method gets the resizingColumn of the tableHeader. When the method is called as a result of the resizing of an enclosing window, the resizingColumn is null. This means that resizing has taken place "outside" the JTable and the change - or "delta" - should be distributed to all of the columns regardless of this JTable's automatic resize mode.

If the resizingColumn is not null, it is one of the columns in the table that has changed size rather than the table itself. In this case the auto-resize modes govern the way the extra (or deficit) space is distributed amongst the available columns.

The modes are:

Note: When a JTable makes adjustments to the widths of the columns it respects their minimum and maximum values absolutely. It is therefore possible that, even after this method is called, the total width of the columns is still not equal to the width of the table. When this happens the JTable does not put itself in AUTO_RESIZE_OFF mode to bring up a scroll bar, or break other commitments of its current auto-resize mode -- instead it allows its bounds to be set larger (or smaller) than the total of the column minimum or maximum, meaning, either that there will not be enough room to display all of the columns, or that the columns will not fill the JTable's bounds. These respectively, result in the clipping of some columns or an area being painted in the JTable's background color during painting.

The mechanism for distributing the delta amongst the available columns is provided in a private method in the JTable class:

    adjustSizes(long targetSize, final Resizable3 r, boolean inverse)
  
an explanation of which is provided in the following section. Resizable3 is a private interface that allows any data structure containing a collection of elements with a size, preferred size, maximum size and minimum size to have its elements manipulated by the algorithm.

Distributing the delta

Overview

Call "DELTA" the difference between the target size and the sum of the preferred sizes of the elements in r. The individual sizes are calculated by taking the original preferred sizes and adding a share of the DELTA - that share being based on how far each preferred size is from its limiting bound (minimum or maximum).

Definition

Call the individual constraints min[i], max[i], and pref[i].

Call their respective sums: MIN, MAX, and PREF.

Each new size will be calculated using:

           size[i] = pref[i] + delta[i]
  
where each individual delta[i] is calculated according to:

If (DELTA < 0) we are in shrink mode where:

                         DELTA
           delta[i] = ------------ (pref[i] - min[i])
                      (PREF - MIN)
  
If (DELTA > 0) we are in expand mode where:

                         DELTA
           delta[i] = ------------ (max[i] - pref[i])
                       (MAX - PREF)
  

The overall effect is that the total size moves that same percentage, k, towards the total minimum or maximum and that percentage guarantees accomodation of the required space, DELTA.

Details

Naive evaluation of the formulae presented here would be subject to the aggregated rounding errors caused by doing this operation in finite precision (using ints). To deal with this, the multiplying factor above, is constantly recalculated and this takes account of the rounding errors in the previous iterations. The result is an algorithm that produces a set of integers whose values exactly sum to the supplied targetSize, and does so by spreading the rounding errors evenly over the given elements.

When the MAX and MIN bounds are hit

When targetSize is outside the [MIN, MAX] range, the algorithm sets all sizes to their appropriate limiting value (maximum or minimum).

editCellAt()method 
public function editCellAt(row:int, column:int, clickCount:int = -1):Boolean

editCellAt(row:int, column:int, clickCount:int):Boolean
editCellAt(row:int, column:int):Boolean

Programmatically starts editing the cell at row and column, if those indices are in the valid range, and the cell at those indices is editable. Parameters

row:int — row the row to be edited
 
column:int — column the column to be edited
 
clickCount:int (default = -1) — the click count, if force to edite, pass -1 to this param.

Returns
Boolean — false if for any reason the cell cannot be edited, or if the indices are invalid
editingCanceled()method 
public function editingCanceled(source:CellEditor):void

Invoked when editing is canceled. The editor object is discarded and the cell is rendered once again.

Application code will not use these methods explicitly, they are used internally by JTable. Parameters

source:CellEditor — e the event received

See also

CellEditorListener
editingStopped()method 
public function editingStopped(source:CellEditor):void

Invoked when editing is finished. The changes are saved and the editor is discarded.

Application code will not use these methods explicitly, they are used internally by JTable. Parameters

source:CellEditor — e the event received

See also

CellEditorListener
ensureCellIsVisible()method 
public function ensureCellIsVisible(row:int, column:int):void

Scrolls the JTable to make the specified cell completely visible.

Parameters
row:int — the row index
 
column:int — the column index
fireStateChanged()method 
protected function fireStateChanged(programmatic:Boolean = true):voidParameters
programmatic:Boolean (default = true)
getAutoCreateColumnsFromModel()method 
public function getAutoCreateColumnsFromModel():Boolean

Determines whether the table will create default columns from the model. If true, setModel will clear any existing columns and create new columns from the new model. Also, if the event in the tableChanged notification specifies that the entire table changed, then the columns will be rebuilt. The default is true.

Returns
Boolean — the autoCreateColumnsFromModel of the table

See also

getAutoResizeMode()method 
public function getAutoResizeMode():int

Returns the auto resize mode of the table. The default mode is AUTO_RESIZE_SUBSEQUENT_COLUMNS.

Returns
int — the autoResizeMode of the table

See also

getCellEditor()method 
public function getCellEditor():TableCellEditor

Returns
TableCellEditor
getCellEditorOfRowColumn()method 
public function getCellEditorOfRowColumn(row:int, column:int):TableCellEditorParameters
row:int
 
column:int

Returns
TableCellEditor
getCellFactory()method 
public function getCellFactory(row:int, column:int):TableCellFactoryParameters
row:int
 
column:int

Returns
TableCellFactory
getCellPane()method 
public function getCellPane():Container

Returns the container that holds the cells.

Returns
Container — the container that holds the cells.
getCellRect()method 
public function getCellRect(row:int, column:int, includeSpacing:Boolean):IntRectangle

Returns a rectangle for the cell that lies at the intersection of row and column. If includeSpacing is true then the value returned has the full height and width of the row and column specified. If it is false, the returned rectangle is inset by the intercell spacing to return the true bounds of the rendering or editing component as it will be set during rendering.

If the column index is valid but the row index is less than zero the method returns a rectangle with the y and height values set appropriately and the x and width values both set to zero. In general, when either the row or column indices indicate a cell outside the appropriate range, the method returns a rectangle depicting the closest edge of the closest cell that is within the table's range. When both row and column indices are out of range the returned rectangle covers the closest point of the closest cell.

In all cases, calculations that use this method to calculate results along one axis will not fail because of anomalies in calculations along the other axis. When the cell is not valid the includeSpacing parameter is ignored. Parameters

row:int — row the row index where the desired cell is located
 
column:int — column the column index where the desired cell is located in the display; this is not necessarily the same as the column index in the data model for the table; the {
 
includeSpacing:Boolean — includeSpacing if false, return the true cell bounds - computed by subtracting the intercell spacing from the height and widths of the column and row models

Returns
IntRectangle — the rectangle containing the cell at location row,column
getCellSelectionEnabled()method 
public function getCellSelectionEnabled():Boolean

Returns true if both row and column selection models are enabled. Equivalent to getRowSelectionAllowed() && getColumnSelectionAllowed().

Returns
Boolean — true if both row and column selection models are enabled

See also

getColumn()method 
public function getColumn(identifier:Object):TableColumn

Returns the TableColumn object for the column in the table whose identifier is equal to identifier, when compared using equals.

Parameters
identifier:Object — identifier the identifier object

Returns
TableColumn — the TableColumn object that matches the identifier
getColumnAt()method 
public function getColumnAt(columnIndex:int):TableColumn

Returns the TableColumn object for the column at columnIndex.

Parameters
columnIndex:int — columnIndex the index of the desired column

Returns
TableColumn — the TableColumn object for the column at columnIndex
getColumnClass()method 
public function getColumnClass(column:int):String

Returns the type of the column appearing in the view at column position column.

Parameters
column:int — column the column in the view being queried

Returns
String — the type of the column at position column in the view where the first column is column 0
getColumnCount()method 
public function getColumnCount():int

Returns the number of columns in the column model. Note that this may be different from the number of columns in the table model.

Returns
int — the number of columns in the table

See also

getColumnModel()method 
public function getColumnModel():TableColumnModel

Returns the TableColumnModel that contains all column information of this table.

Returns
TableColumnModel — the object that provides the column state of the table

See also

getColumnName()method 
public function getColumnName(column:int):String

Returns the name of the column appearing in the view at column position column.

Parameters
column:int — column the column in the view being queried

Returns
String — the name of the column at position column in the view where the first column is column 0
getColumnSelectionAllowed()method 
public function getColumnSelectionAllowed():Boolean

Returns true if columns can be selected.

Returns
Boolean — true if columns can be selected, otherwise false

See also

getDefaultBasicUIClass()method 
public override function getDefaultBasicUIClass():Class

Returns
Class
getDefaultCellFactory()method 
public function getDefaultCellFactory(columnClass:String):TableCellFactory

Returns the cell factory to be used when no factory has been set in a TableColumn. During the rendering of cells the factory is fetched from a Hashtable of entries according to the class of the cells in the column. If there is no entry for this columnClass the method returns the entry for the most specific superclass. The JTable installs entries for "Object", "Number", and "Boolean", all of which can be modified or replaced.

Parameters
columnClass:String — columnClass return the default cell factory for this columnClass

Returns
TableCellFactory — the factory for this columnClass

See also

getDefaultEditor()method 
public function getDefaultEditor(columnClass:String):TableCellEditor

Returns the editor to be used when no editor has been set in a TableColumn. During the editing of cells the editor is fetched from a Hashtable of entries according to the class of the cells in the column. If there is no entry for this columnClass the method returns the entry for the most specific superclass. The JTable installs entries for "Object", "Number", and "Boolean", all of which can be modified or replaced.

Parameters
columnClass:String — columnClass return the default cell editor for this columnClass

Returns
TableCellEditor — the default cell editor to be used for this columnClass

See also

getEditingColumn()method 
public function getEditingColumn():int

Returns the index of the column that contains the cell currently being edited. If nothing is being edited, returns -1.

Returns
int — the index of the column that contains the cell currently being edited; returns -1 if nothing being edited

See also

getEditingRow()method 
public function getEditingRow():int

Returns the index of the row that contains the cell currently being edited. If nothing is being edited, returns -1.

Returns
int — the index of the row that contains the cell currently being edited; returns -1 if nothing being edited

See also

getExtentSize()method 
public function getExtentSize():IntDimension

Returns
IntDimension
getGridColor()method 
public function getGridColor():ASColor

Returns the color used to draw grid lines. The default color is look and feel dependent.

Returns
ASColor — the color used to draw grid lines

See also

getHeaderHeight()method 
public function getHeaderHeight():int

Returns the header height.

Returns
int
getHorizontalBlockIncrement()method 
public function getHorizontalBlockIncrement():int

Returns
int
getHorizontalUnitIncrement()method 
public function getHorizontalUnitIncrement():int

Returns
int
getIntercellSpacing()method 
public function getIntercellSpacing():IntDimension

Returns the horizontal and vertical space between cells. The default spacing is (1, 1), which provides room to draw the grid.

Returns
IntDimension — the horizontal and vertical spacing between cells

See also

getLayoutAlignmentX()method 
public function getLayoutAlignmentX(target:Container):Number

return 0

Parameters
target:Container

Returns
Number
getLayoutAlignmentY()method 
public function getLayoutAlignmentY(target:Container):Number

return 0

Parameters
target:Container

Returns
Number
getLogicLocationFromPixelLocation()method 
public function getLogicLocationFromPixelLocation(p:IntPoint):IntPoint

Returns the location in the JTable view area of the logic location.

Parameters
p:IntPoint

Returns
IntPoint
getModel()method 
public function getModel():TableModel

Returns the TableModel that provides the data displayed by this JTable.

Returns
TableModel — the TableModel that provides the data displayed by this JTable

See also

getPixelLocationFromLogicLocation()method 
public function getPixelLocationFromLogicLocation(p:IntPoint):IntPoint

Returns the location in the JTable view area of the logic location.

Parameters
p:IntPoint

Returns
IntPoint
getPreferredScrollableViewportSize()method 
public function getPreferredScrollableViewportSize():IntDimension

Returns the preferred size of the viewport for this table.

Returns
IntDimension — a IntDimension object containing the preferredSize of the JViewport which displays this table
getRowCount()method 
public function getRowCount():int

Returns the number of rows in this table's model.

Returns
int — the number of rows in this table's model

See also

getRowHeight()method 
public function getRowHeight():int

Returns the height of a table row, in pixels. The default row height is 20.0.

Returns
int — the height in pixels of a table row

See also

getRowMargin()method 
public function getRowMargin():int

Gets the amount of empty space, in pixels, between cells. Equivalent to: getIntercellSpacing().height.

Returns
int — the number of pixels between cells in a row

See also

getRowSelectionAllowed()method 
public function getRowSelectionAllowed():Boolean

Returns true if rows can be selected.

Returns
Boolean — true if rows can be selected, otherwise false

See also

getSelectedColumn()method 
public function getSelectedColumn():int

Returns the index of the first selected column, -1 if no column is selected.

Returns
int — the index of the first selected column
getSelectedColumnCount()method 
public function getSelectedColumnCount():int

Returns the number of selected columns.

Returns
int — the number of selected columns, 0 if no columns are selected
getSelectedColumns()method 
public function getSelectedColumns():Array

Returns the indices of all selected columns.

Returns
Array — an array of integers containing the indices of all selected columns, or an empty array if no column is selected

See also

getSelectedRow()method 
public function getSelectedRow():int

Returns the index of the first selected row, -1 if no row is selected.

Returns
int — the index of the first selected row
getSelectedRowCount()method 
public function getSelectedRowCount():int

Returns the number of selected rows.

Returns
int — the number of selected rows, 0 if no rows are selected
getSelectedRows()method 
public function getSelectedRows():Array

Returns the indices of all selected rows.

Returns
Array — an array of integers containing the indices of all selected rows, or an empty array if no row is selected

See also

getSelectionBackground()method 
public function getSelectionBackground():ASColor

Returns the background color for selected cells.

Returns
ASColor — the Color used for the background of selected list items

See also

getSelectionForeground()method 
public function getSelectionForeground():ASColor

Returns the foreground color for selected cells.

Returns
ASColor — the Color object for the foreground property

See also

getSelectionModel()method 
public function getSelectionModel():ListSelectionModel

Returns the ListSelectionModel that is used to maintain row selection state.

Returns
ListSelectionModel — the object that provides row selection state, null if row selection is not allowed

See also

getShowHorizontalLines()method 
public function getShowHorizontalLines():Boolean

Returns true if the table draws horizontal lines between cells, false if it doesn't. The default is true.

Returns
Boolean — true if the table draws horizontal lines between cells, false if it doesn't

See also

getShowVerticalLines()method 
public function getShowVerticalLines():Boolean

Returns true if the table draws vertical lines between cells, false if it doesn't. The default is true.

Returns
Boolean — true if the table draws vertical lines between cells, false if it doesn't

See also

getTableHeader()method 
public function getTableHeader():JTableHeader

Returns the tableHeader used by this JTable.

Returns
JTableHeader — the tableHeader used by this table

See also

getTableUI()method 
public function getTableUI():TableUI

Returns
TableUI
getUIClassID()method 
public override function getUIClassID():String

Returns the suffix used to construct the name of the L&F class used to render this component.

Returns
String — the string "TableUI"

See also

JComponent.getUIClassID
UIDefaults.getUI
getValueAt()method 
public function getValueAt(row:int, column:int):Object

Returns the cell value at row and column.

Note: The column is specified in the table view's display order, and not in the TableModel's column order. This is an important distinction because as the user rearranges the columns in the table, the column at a given index in the view will change. Meanwhile the user's actions never affect the model's column ordering. Parameters

row:int — row the row whose value is to be queried
 
column:int — column the column whose value is to be queried

Returns
Object — the Object at the specified cell
getVerticalBlockIncrement()method 
public function getVerticalBlockIncrement():int

Returns
int
getVerticalUnitIncrement()method 
public function getVerticalUnitIncrement():int

Returns
int
getViewportPane()method 
public function getViewportPane():Component

Returns
Component
getViewPosition()method 
public function getViewPosition():IntPoint

Returns
IntPoint
getViewSize()method 
public function getViewSize():IntDimension

Returns
IntDimension
invalidateLayout()method 
public function invalidateLayout(target:Container):voidParameters
target:Container
isCellEditable()method 
public function isCellEditable(row:int, column:int):Boolean

Returns true if the cell at row and column is editable. Otherwise, invoking setValueAt on the cell will have no effect.

Note: The column is specified in the table view's display order, and not in the TableModel's column order. This is an important distinction because as the user rearranges the columns in the table, the column at a given index in the view will change. Meanwhile the user's actions never affect the model's column ordering. Parameters

row:int — row the row whose value is to be queried
 
column:int — column the column whose value is to be queried

Returns
Boolean — true if the cell is editable

See also

isCellSelected()method 
public function isCellSelected(row:int, column:int):Boolean

Returns true if the specified indices are in the valid range of rows and columns and the cell at the specified position is selected.

Parameters
row:int — the row being queried
 
column:int — the column being queried

Returns
Boolean — true if row and column are valid indices and the cell at index (row, column) is selected, where the first row and first column are at index 0
isColumnSelected()method 
public function isColumnSelected(column:int):Boolean

Returns true if the specified index is in the valid range of columns, and the column at that index is selected.

Parameters
column:int — column the column in the column model

Returns
Boolean — true if column is a valid index and the column at that index is selected (where 0 is the first column)
isEditing()method 
public function isEditing():Boolean

Returns true if a cell is being edited.

Returns
Boolean — true if the table is editing a cell

See also

isRowSelected()method 
public function isRowSelected(row:int):Boolean

Returns true if the specified index is in the valid range of rows, and the row at that index is selected.

Parameters
row:int

Returns
Boolean — true if row is a valid index and the row at that index is selected (where 0 is the first row)
layoutContainer()method 
public function layoutContainer(target:Container):void

position and fill cells here

Parameters
target:Container
maximumLayoutSize()method 
public function maximumLayoutSize(target:Container):IntDimensionParameters
target:Container

Returns
IntDimension
minimumLayoutSize()method 
public function minimumLayoutSize(target:Container):IntDimensionParameters
target:Container

Returns
IntDimension
moveColumn()method 
public function moveColumn(column:int, targetColumn:int):void

Moves the column column to the position currently occupied by the column targetColumn in the view. The old column at targetColumn is shifted left or right to make room.

Parameters
column:int — column the index of column to be moved
 
targetColumn:int — targetColumn the new index of the column
preferredLayoutSize()method 
public function preferredLayoutSize(target:Container):IntDimensionParameters
target:Container

Returns
IntDimension
removeColumn()method 
public function removeColumn(aColumn:TableColumn):void

Removes aColumn from this JTable's array of columns. Note: this method does not remove the column of data from the model; it just removes the TableColumn that was responsible for displaying it.

Parameters
aColumn:TableColumn — aColumn the TableColumn to be removed

See also

removeColumnSelectionInterval()method 
public function removeColumnSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void

Deselects the columns from index0 to index1, inclusive.

Parameters
index0:int — index0 one end of the interval
 
index1:int — index1 the other end of the interval
 
programmatic:Boolean (default = true) — indicate if this is a programmatic change
removeColumnSelectionListener()method 
public function removeColumnSelectionListener(listener:Function):void

Removes a listener from column selection changed listeners.

Parameters
listener:Function — the listener to be removed.

See also

org.aswing.event.SelectionEvent
removeSelectionListener()
removeEditor()method 
public function removeEditor():void
removeLayoutComponent()method 
public function removeLayoutComponent(comp:Component):void

do nothing

Parameters
comp:Component
removeRowSelectionInterval()method 
public function removeRowSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void

Deselects the rows from index0 to index1, inclusive.

Parameters
index0:int — index0 one end of the interval
 
index1:int — index1 the other end of the interval
 
programmatic:Boolean (default = true) — indicate if this is a programmatic change
removeSelectionListener()method 
public function removeSelectionListener(listener:Function):void

Removes a listener from row selection changed listeners.

Parameters
listener:Function — the listener to be removed.

See also

org.aswing.event.SelectionEvent
removeStateListener()method 
public function removeStateListener(listener:Function):void

Removes a state listener.

Parameters
listener:Function — the listener to be removed.

See also

org.aswing.event.InteractiveEvent.STATE_CHANGED
resizeAndRepaint()method 
public function resizeAndRepaint():void
rowAtPoint()method 
public function rowAtPoint(point:IntPoint):int

Returns the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1].

Parameters
point:IntPoint — point the location of interest

Returns
int — the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1]

See also

scrollRectToVisible()method 
public function scrollRectToVisible(contentRect:IntRectangle, programmatic:Boolean = true):voidParameters
contentRect:IntRectangle
 
programmatic:Boolean (default = true)
selectAll()method 
public function selectAll(programmatic:Boolean = true):void

Selects all rows, columns, and cells in the table.

Parameters
programmatic:Boolean (default = true) — indicate if this is a programmatic change
setAutoCreateColumnsFromModel()method 
public function setAutoCreateColumnsFromModel(autoCreateColumnsFromModel:Boolean):void

Sets this table's autoCreateColumnsFromModel flag. This method calls createDefaultColumnsFromModel if autoCreateColumnsFromModel changes from false to true.

Parameters
autoCreateColumnsFromModel:Boolean — autoCreateColumnsFromModel true if JTable should automatically create columns

See also

setAutoResizeMode()method 
public function setAutoResizeMode(mode:int):void

Sets the table's auto resize mode when the table is resized.

Parameters
mode:int — mode One of 5 legal values: AUTO_RESIZE_OFF, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_SUBSEQUENT_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_ALL_COLUMNS

See also

setCellEditor()method 
public function setCellEditor(anEditor:TableCellEditor):voidParameters
anEditor:TableCellEditor
setCellSelectionEnabled()method 
public function setCellSelectionEnabled(cellSelectionEnabled:Boolean):void

Sets whether this table allows both a column selection and a row selection to exist simultaneously. When set, the table treats the intersection of the row and column selection models as the selected cells. Override isCellSelected to change this default behavior. This method is equivalent to setting both the rowSelectionAllowed property and columnSelectionAllowed property of the columnModel to the supplied value.

Parameters
cellSelectionEnabled:Boolean — cellSelectionEnabled true if simultaneous row and column selection is allowed

See also

setColumnModel()method 
public function setColumnModel(columnModel:TableColumnModel):void

Sets the column model for this table to newModel and registers for listener notifications from the new column model. Also sets the column model of the JTableHeader to columnModel.

Parameters
columnModel:TableColumnModel — columnModel the new data source for this table

See also

setColumnSelectionAllowed()method 
public function setColumnSelectionAllowed(columnSelectionAllowed:Boolean):void

Sets whether the columns in this model can be selected.

Parameters
columnSelectionAllowed:Boolean — true if this model will allow column selection

See also

setColumnSelectionInterval()method 
public function setColumnSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void

Selects the columns from index0 to index1, inclusive.

Parameters
index0:int — index0 one end of the interval
 
index1:int — index1 the other end of the interval
 
programmatic:Boolean (default = true) — indicate if this is a programmatic change
setDefaultCellFactory()method 
public function setDefaultCellFactory(columnClass:String, renderer:TableCellFactory):void

Sets a default cell factory to be used if no renderer has been set in a TableColumn. If renderer is null, removes the default factory for this column class.

Parameters
columnClass:String — columnClass set the default cell factory for this columnClass
 
renderer:TableCellFactory — renderer default cell factory to be used for this columnClass

See also

setDefaultEditor()method 
public function setDefaultEditor(columnClass:String, editor:TableCellEditor):void

Sets a default cell editor to be used if no editor has been set in a TableColumn. If no editing is required in a table, or a particular column in a table, uses the isCellEditable method in the TableModel interface to ensure that this JTable will not start an editor in these columns. If editor is null, removes the default editor for this column class.

Parameters
columnClass:String — columnClass set the default cell editor for this columnClass
 
editor:TableCellEditor — editor default cell editor to be used for this columnClass

See also

setEditingColumn()method 
public function setEditingColumn(aColumn:int):voidParameters
aColumn:int
setEditingRow()method 
public function setEditingRow(aRow:int):voidParameters
aRow:int
setGridColor()method 
public function setGridColor(gridColor:ASColor):void

Sets the color used to draw grid lines to gridColor and redisplays. The default color is look and feel dependent.

Parameters
gridColor:ASColor — gridColor the new color of the grid lines

See also

setHorizontalBlockIncrement()method 
public function setHorizontalBlockIncrement(increment:int):voidParameters
increment:int
setHorizontalUnitIncrement()method 
public function setHorizontalUnitIncrement(increment:int):voidParameters
increment:int
setIntercellSpacing()method 
public function setIntercellSpacing(intercellSpacing:IntDimension):void

Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.

Parameters
intercellSpacing:IntDimension — intercellSpacing a IntDimension specifying the new width and height between cells

See also

setModel()method 
public function setModel(dataModel:TableModel):void

Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.

Parameters
dataModel:TableModel — dataModel the new data source for this table

See also

setPreferredScrollableViewportSize()method 
public function setPreferredScrollableViewportSize(size:IntDimension):void

Sets the preferred size of the viewport for this table.

Parameters
size:IntDimension — a IntDimension object specifying the preferredSize of a JViewport whose view is this table
setRowHeight()method 
public function setRowHeight(rowHeight:int):void

Sets the height, in pixels, of all cells to rowHeight, revalidates, and repaints. The height of the cells will be equal to the row height minus the row margin.

Parameters
rowHeight:int — rowHeight new row height

Throws
— RangeError if rowHeight is less than 1

See also

setRowMargin()method 
public function setRowMargin(rowMargin:int):void

Sets the amount of empty space between cells in adjacent rows.

Parameters
rowMargin:int — rowMargin the number of pixels between cells in a row

See also

setRowSelectionAllowed()method 
public function setRowSelectionAllowed(rowSelectionAllowed:Boolean):void

Sets whether the rows in this model can be selected.

Parameters
rowSelectionAllowed:Boolean — true if this model will allow row selection

See also

setRowSelectionInterval()method 
public function setRowSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void

Selects the rows from index0 to index1, inclusive.

Parameters
index0:int — index0 one end of the interval
 
index1:int — index1 the other end of the interval
 
programmatic:Boolean (default = true) — indicate if this is a programmatic change
setSelectionBackground()method 
public function setSelectionBackground(selectionBackground:ASColor):void

Sets the background color for selected cells. Cell renderers can use this color to the fill selected cells.

The default value of this property is defined by the look and feel implementation. Parameters

selectionBackground:ASColor — the Color to use for the background of selected cells

See also

setSelectionForeground()method 
public function setSelectionForeground(selectionForeground:ASColor):void

Sets the foreground color for selected cells. Cell renderers can use this color to render text and graphics for selected cells.

The default value of this property is defined by the look and feel implementation. Parameters

selectionForeground:ASColor — the Color to use in the foreground for selected list items

See also

setSelectionMode()method 
public function setSelectionMode(selectionMode:int):void

Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.

Note: JTable provides all the methods for handling column and row selection. When setting states, such as setSelectionMode, it not only updates the mode for the row selection model but also sets similar values in the selection model of the columnModel. If you want to have the row and column selection models operating in different modes, set them both directly.

Both the row and column selection models for JTable default to using a DefaultListSelectionModel so that JTable works the same way as the JList. See the setSelectionMode method in JList for details about the modes. Parameters

selectionMode:int

See also

setSelectionModel()method 
public function setSelectionModel(newModel:ListSelectionModel):void

Sets the row selection model for this table to newModel and registers for listener notifications from the new selection model.

Parameters
newModel:ListSelectionModel — newModel the new selection model, if it is null, nothing change.

See also

setShowGrid()method 
public function setShowGrid(showGrid:Boolean):void

Sets whether the table draws grid lines around cells. If showGrid is true it does; if it is false it doesn't. There is no getShowGrid method as this state is held in two variables -- showHorizontalLines and showVerticalLines -- each of which can be queried independently.

Parameters
showGrid:Boolean — showGrid true if table view should draw grid lines

See also

setShowHorizontalLines()method 
public function setShowHorizontalLines(showHorizontalLines:Boolean):void

Sets whether the table draws horizontal lines between cells. If showHorizontalLines is true it does; if it is false it doesn't.

Parameters
showHorizontalLines:Boolean — showHorizontalLines true if table view should draw horizontal lines

See also

setShowVerticalLines()method 
public function setShowVerticalLines(showVerticalLines:Boolean):void

Sets whether the table draws vertical lines between cells. If showVerticalLines is true it does; if it is false it doesn't.

Parameters
showVerticalLines:Boolean — showVerticalLines true if table view should draw vertical lines

See also

setSize()method 
public override function setSize(newSize:IntDimension):voidParameters
newSize:IntDimension
setTableHeader()method 
public function setTableHeader(tableHeader:JTableHeader):void

Sets the tableHeader working with this JTable to newHeader. It is legal to have a null tableHeader.

Parameters
tableHeader:JTableHeader — tableHeader new tableHeader

See also

setUI()method 
public override function setUI(newUI:ComponentUI):void

Sets the L&F object that renders this component and repaints.

Parameters
newUI:ComponentUI — the TableUI L&F object

Throws
— when the newUI is not an TableUI instance.
setValueAt()method 
public function setValueAt(aValue:Object, row:int, column:int):void

Sets the value for the cell in the table model at row and column.

Note: The column is specified in the table view's display order, and not in the TableModel's column order. This is an important distinction because as the user rearranges the columns in the table, the column at a given index in the view will change. Meanwhile the user's actions never affect the model's column ordering. aValue is the new value. Parameters

aValue:Object — aValue the new value
 
row:int — row the row of the cell to be changed
 
column:int — column the column of the cell to be changed

See also

setVerticalBlockIncrement()method 
public function setVerticalBlockIncrement(increment:int):voidParameters
increment:int
setVerticalUnitIncrement()method 
public function setVerticalUnitIncrement(increment:int):voidParameters
increment:int
setViewportTestSize()method 
public function setViewportTestSize(s:IntDimension):voidParameters
s:IntDimension
setViewPosition()method 
public function setViewPosition(p:IntPoint, programmatic:Boolean = true):voidParameters
p:IntPoint
 
programmatic:Boolean (default = true)
tableChanged()method 
public function tableChanged(e:TableModelEvent):void

Invoked when this table's TableModel generates a TableModelEvent. The TableModelEvent should be constructed in the coordinate system of the model; the appropriate mapping to the view coordinate system is performed by this JTable when it receives the event.

Application code will not use these methods explicitly, they are used internally by JTable. Parameters

e:TableModelEvent
updateSubComponentUI()method 
protected function updateSubComponentUI(componentShell:*):voidParameters
componentShell:*
updateUI()method 
public override function updateUI():void

Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.

See also

Event detail
columnSelectionChangedevent 
Event object type: org.aswing.event.SelectionEvent
SelectionEvent.type property = org.aswing.event.SelectionEvent.COLUMN_SELECTION_CHANGED

Dispatched when the column selection changed.

The SelectionEvent.COLUMN_SELECTION_CHANGED constant defines the value of the type property of the event object for a listSelectionChanged event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
isProgrammatic()True means this event is fired by the programmatic reason, false means user mouse/keyboard interaction reason.
getFirstIndex()the first changed index.
getLastIndex()the last changed index.
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
rowSelectionChangedevent  
Event object type: org.aswing.event.SelectionEvent
SelectionEvent.type property = org.aswing.event.SelectionEvent.ROW_SELECTION_CHANGED

Dispatched when the row selection changed.

The SelectionEvent.ROW_SELECTION_CHANGED constant defines the value of the type property of the event object for a rowSelectionChanged event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
isProgrammatic()True means this event is fired by the programmatic reason, false means user mouse/keyboard interaction reason.
getFirstIndex()the first changed index.
getLastIndex()the last changed index.
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.

See also

tableCellEditingCanceledevent  
Event object type: org.aswing.event.TableCellEditEvent
TableCellEditEvent.type property = org.aswing.event.TableCellEditEvent.EDITING_CANCELED

Dispatched when the cell editing canceled.

The TableCellEditEvent.EDITING_CANCELED constant defines the value of the type property of the event object for a tableCellEditingCanceled event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
getRow()the row be edit
getColumn()the column be edit
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
tableCellEditingStartedevent  
Event object type: org.aswing.event.TableCellEditEvent
TableCellEditEvent.type property = org.aswing.event.TableCellEditEvent.EDITING_STARTED

Dispatched when the cell editing started.

The TableCellEditEvent.EDITING_STARTED constant defines the value of the type property of the event object for a tableCellEditingStarted event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
getRow()the row be edit
getColumn()the column be edit
getOldValue()the old value
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
tableCellEditingStoppedevent  
Event object type: org.aswing.event.TableCellEditEvent
TableCellEditEvent.type property = org.aswing.event.TableCellEditEvent.EDITING_STOPPED

Dispatched when the cell editing finished.

The TableCellEditEvent.EDITING_STOPPED constant defines the value of the type property of the event object for a tableCellEditingStopped event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
getRow()the row be edit
getColumn()the column be edit
getOldValue()the old value
getNewValue()the new value edited
currentTargetThe Object that defines the event listener that handles the event. For example, if you use comp.addEventListener() to register an event listener, comp is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
Constant detail
AUTO_INCREMENTconstant
public static const AUTO_INCREMENT:int = -2.147483648E9

The default unit/block increment, it means auto count a value.

AUTO_RESIZE_ALL_COLUMNSconstant 
public static const AUTO_RESIZE_ALL_COLUMNS:int = 4

During all resize operations, proportionately resize all columns.

AUTO_RESIZE_LAST_COLUMNconstant 
public static const AUTO_RESIZE_LAST_COLUMN:int = 3

During all resize operations, apply adjustments to the last column only.

AUTO_RESIZE_NEXT_COLUMNconstant 
public static const AUTO_RESIZE_NEXT_COLUMN:int = 1

When a column is adjusted in the UI, adjust the next column the opposite way.

AUTO_RESIZE_OFFconstant 
public static const AUTO_RESIZE_OFF:int = 0

Do not adjust column widths automatically; use a scrollbar.

AUTO_RESIZE_SUBSEQUENT_COLUMNSconstant 
public static const AUTO_RESIZE_SUBSEQUENT_COLUMNS:int = 2

During UI adjustment, change subsequent columns to preserve the total width; this is the default behavior.

MULTIPLE_SELECTIONconstant 
public static const MULTIPLE_SELECTION:int = 1

Can select any item at a time.

SINGLE_SELECTIONconstant 
public static const SINGLE_SELECTION:int = 0

Only can select one most item at a time.