| Package | org.aswing |
| Class | public class JTable |
| Inheritance | JTable Container Component AWSprite flash.display.Sprite |
| Implements | CellEditorListener, LayoutManager, TableColumnModelListener, TableModelListener, Viewportable |
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 {
| Property | Defined by | ||
|---|---|---|---|
![]() | bounds : IntRectangle | Component | |
| cellPane : Container | JTable | ||
![]() | children : Array | Container | |
![]() | d_numChildren : int | AWSprite | |
![]() | drawTransparentTrigger : Boolean = true | Component | |
![]() | d_visible : Boolean
Returns the
DisplayObject.visible directly. | Component | |
![]() | d_x : Number
Returns
DisplayObject.x directly. | Component | |
![]() | d_y : Number
Returns
DisplayObject.y directly. | Component | |
| headerPane : Container | JTable | ||
![]() | layout : LayoutManager | Container | |
![]() | readyToPaint : Boolean | Component | |
![]() | ui : ComponentUI | Component | |
![]() | valid : Boolean | Component | |
| Method | Defined by | ||
|---|---|---|---|
|
JTable(dm:TableModel = null)
Constructs a default
JTable. | JTable | ||
|
__listSelectionChanged(e:SelectionEvent):void
Invoked when the row selection changes -- repaints to show the new
selection.
| JTable | ||
![]() |
addChild(dis:DisplayObject):DisplayObject
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
| AWSprite | |
![]() |
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 | ||
![]() |
addDragAcceptableInitiator(com:Component):void
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 | ||
![]() |
On Component just can add to one Container.
| Container | |
![]() |
appendAll(... coms):void
Adds one or more component to the container with null constraints
| Container | |
![]() |
bringToBottom(child:DisplayObject):void
Brings a child to bottom.
| AWSprite | |
![]() |
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 | ||
|
columnAdded(e:TableColumnModelEvent):void
Invoked when a column is added to the table column model.
| JTable | ||
|
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]. | JTable | ||
|
columnMarginChanged(source:TableColumnModel):void
Invoked when a column is moved due to a margin change.
| JTable | ||
|
columnMoved(e:TableColumnModelEvent):void
Invoked when a column is repositioned.
| JTable | ||
|
columnRemoved(e:TableColumnModelEvent):void
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 | ||
![]() | Component | ||
![]() |
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 | ||
|
createDefaultCellFactories():void
| JTable | ||
| JTable | |||
|
Creates default columns for the table from
the data model using the
getColumnCount method
defined in the TableModel interface. | JTable | ||
| JTable | |||
|
createDefaultEditors():void
| 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 | JTable | ||
|
editingCanceled(source:CellEditor):void
Invoked when editing is canceled.
| JTable | ||
|
editingStopped(source:CellEditor):void
Invoked when editing is finished.
| JTable | ||
|
ensureCellIsVisible(row:int, column:int):void
Scrolls the JTable to make the specified cell completely visible.
| JTable | ||
![]() |
fireFocusKeyDownEvent(e:KeyboardEvent):void
| Component | |
![]() |
fireFocusKeyUpEvent(e:KeyboardEvent):void
| Component | |
![]() |
getAlignmentX():Number
Returns the alignment along the x axis.
| Component | |
![]() |
getAlignmentY():Number
Returns the alignment along the y axis.
| Component | |
![]() |
getAlpha():Number
Returns the alpha of this component.
| Component | |
|
getAutoCreateColumnsFromModel():Boolean
Determines whether the table will create default columns from the model.
| JTable | ||
|
getAutoResizeMode():int
Returns the auto resize mode of the table.
| JTable | ||
![]() |
getAwmlID():String
Returns ID used to identify components created from AWML.
| Component | |
![]() |
getAwmlIndex():Number
Returns position index of the component inside its AWML container.
| Component | |
![]() |
getAwmlNamespace():String
Returns namespace name used to identify components created from AWML.
| Component | |
![]() |
Gets the background color of this component.
| Component | |
![]() |
Returns the background decorator of this component.
| Component | |
![]() |
Returns the border.
| Component | |
![]() |
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 | |||
|
getCellEditorOfRowColumn(row:int, column:int):TableCellEditor
| 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 | ||
|
getCellSelectionEnabled():Boolean
Returns true if both row and column selection models are enabled.
| JTable | ||
![]() |
getChildAt(index:int):DisplayObject
| AWSprite | |
![]() |
getChildByName(name:String):DisplayObject
| AWSprite | |
![]() |
getChildIndex(child:DisplayObject):int
| AWSprite | |
![]() |
getClientProperty(key:*):*
Returns the value of the property with the specified key.
| Component | |
![]() |
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 | ||
|
getColumnCount():int
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 | ||
|
getColumnSelectionAllowed():Boolean
Returns true if columns can be selected.
| JTable | ||
![]() |
Stores the bounds value of this component into "return value" rv and returns rv. | Component | |
![]() |
getComponent(index:int):Component
Gets the nth(index) component in this container.
| Container | |
![]() |
getComponentCount():int
Gets the number of components in this container.
| Container | |
![]() |
getConstraints():Object
Gets cpmponent's constraints.
| Component | |
|
getDefaultBasicUIClass():Class
| JTable | ||
|
getDefaultCellFactory(columnClass:String):TableCellFactory
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 | ||
|
getEditingColumn():int
Returns the index of the column that contains the cell currently
being edited.
| JTable | ||
|
getEditingRow():int
Returns the index of the row that contains the cell currently
being edited.
| JTable | ||
| JTable | |||
![]() |
Returns the focus manager for this component's stage,
or null if this component is not on stage.
| Component | |
![]() |
Returns the focus traversal policy of this container, it will return its parent's
focus traversal policy if its self is null.
| Container | |
![]() |
Gets the font of this component.
| Component | |
![]() |
Gets the foreground color of this component.
| Component | |
![]() |
Returns the foreground decorator of this component.
| Component | |
![]() |
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 | ||
|
getHeaderHeight():int
Returns the header height.
| JTable | ||
![]() |
getHeight():int
Returns the current height of this component
| Component | |
![]() |
Returns the current top index for a new child(none forground child).
| AWSprite | |
| JTable | |||
| JTable | |||
![]() |
Returns the index of the child component in this container.
| Container | |
![]() |
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 | ||
![]() |
getInternalFocusObject():InteractiveObject
Returns the object to receive the focus for this component.
| Component | |
![]() |
Returns the keyboard manager of this component's
JRootPane ancestor. | Component | |
![]() | Container | ||
|
getLayoutAlignmentX(target:Container):Number
return 0
| JTable | ||
|
getLayoutAlignmentY(target:Container):Number
return 0
| JTable | ||
![]() |
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 | ||
![]() |
Returns the current bottom index for none background child.
| AWSprite | |
![]() |
getMaximumHeight():int
Returns
getMaximumSize().height
| Component | |
![]() |
| Component | |
![]() |
getMaximumWidth():int
Returns
getMaximumSize().width
| Component | |
![]() |
getMinimumHeight():int
Returns
getMinimumSize().height
| Component | |
![]() |
| Component | |
![]() |
getMinimumWidth():int
Returns
getMinimumSize().width
| Component | |
|
Returns the
TableModel that provides the data displayed by this
JTable. | JTable | ||
![]() |
Returns the coordinate of the mouse position, in pixels, in the component scope.
| Component | |
![]() |
getName():String
Returns the name of the component
| Component | |
![]() |
Returns the bounds that component should paint in.
| Component | |
![]() |
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 | ||
![]() |
getPreferredHeight():int
Returns
getPreferredSize().height
| Component | |
|
Returns the preferred size of the viewport for this table.
| JTable | ||
![]() |
| Component | |
![]() |
getPreferredWidth():int
Returns
getPreferredSize().width
| Component | |
![]() |
Returns the first
JRootPane ancestor of this component. | Component | |
|
getRowCount():int
Returns the number of rows in this table's model.
| JTable | ||
|
getRowHeight():int
Returns the height of a table row, in pixels.
| JTable | ||
|
getRowMargin():int
Gets the amount of empty space, in pixels, between cells.
| JTable | ||
|
getRowSelectionAllowed():Boolean
Returns true if rows can be selected.
| JTable | ||
|
getSelectedColumn():int
Returns the index of the first selected column,
-1 if no column is selected.
| JTable | ||
|
getSelectedColumnCount():int
Returns the number of selected columns.
| JTable | ||
|
getSelectedColumns():Array
Returns the indices of all selected columns.
| JTable | ||
|
getSelectedRow():int
Returns the index of the first selected row, -1 if no row is selected.
| JTable | ||
|
getSelectedRowCount():int
Returns the number of selected rows.
| JTable | ||
|
getSelectedRows():Array
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 | ||
|
getShowHorizontalLines():Boolean
Returns true if the table draws horizontal lines between cells, false if it
doesn't.
| JTable | ||
|
getShowVerticalLines():Boolean
Returns true if the table draws vertical lines between cells, false if it
doesn't.
| JTable | ||
![]() |
Stores the size value of this component into "return value" rv and returns rv.
| Component | |
|
Returns the
tableHeader used by this JTable. | JTable | ||
| JTable | |||
![]() |
getToolTipText():String
Returns the tooltip string that has been set with setToolTipText.
| Component | |
![]() | 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 | |||
|
getVerticalUnitIncrement():int
| JTable | ||
| JTable | |||
| JTable | |||
| JTable | |||
![]() |
getWidth():int
Returns the current width of this component
| Component | |
![]() |
getX():int
Returns the current x coordinate of the components.
| Component | |
![]() |
getY():int
Returns the current y coordinate of the components.
| Component | |
![]() | Component | ||
![]() |
hitTestMouse():Boolean
Returns whether the component hit the mouse.
| Component | |
![]() |
hitTestObject(obj:DisplayObject):Boolean
| AWSprite | |
![]() |
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
| AWSprite | |
![]() |
Add component to spesified index.
| Container | |
![]() |
insertAll(index:int, ... coms):void
Insets one or more component to the container with null constraints at specified starting index.
| Container | |
![]() |
invalidate():void
Invalidates the container.
| Container | |
|
invalidateLayout(target:Container):void
| JTable | ||
![]() |
invalidatePreferSizeCaches():void
Clears this component and all parents above it's preferred size caches.
| Component | |
![]() |
isAncestorOf(c:Component):Boolean
Checks if the component is contained in the component hierarchy of
this container.
| Container | |
![]() |
isCachePreferSizes():Boolean
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 | ||
![]() |
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 | ||
![]() |
isDragAcceptableInitiator(com:Component):Boolean
Returns whether the component is acceptable drag initiator for this component.
| Component | |
![]() |
isDragEnabled():Boolean
Returns whether this component can fire ON_DRAG_RECOGNIZED event.
| Component | |
![]() |
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 | ||
![]() |
isEnabled():Boolean
Returns whether the component is enabled.
| Component | |
![]() |
isFocusable():Boolean
Returns whether this Component can be focused.
| Component | |
![]() |
isFocusableSet():Boolean
Returns whether or not the opaque property is set by user.
| Component | |
![]() |
isFocusOwner():Boolean
Returns
true if this Component is the
focus owner. | Component | |
![]() |
isFontValidated():Boolean
Returns whether the new font are applied and taked effect.
| Component | |
![]() |
isOnStage():Boolean
Determines whether or not this component is on stage(on the display list).
| Component | |
![]() |
isOpaque():Boolean
Returns true if this component is completely opaque.
| Component | |
![]() |
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 | ||
![]() |
isShowing():Boolean
Determines whether this component is showing on screen.
| Component | |
![]() |
isUIElement():Boolean
Returns true if this component is just a ui element component,
false means this component is a regular use created component.
| Component | |
![]() |
isValid():Boolean
Determines whether this component is valid.
| Component | |
![]() |
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 | |
![]() |
isVisible():Boolean
| Component | |
|
layoutContainer(target:Container):void
position and fill cells here
| JTable | ||
![]() |
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 | ||
![]() |
pack():void
Causes this component to be sized to fit the preferred size.
| Component | |
![]() |
paintFocusRect(force:Boolean = false):void
Paints the focus rect if need.
| Component | |
![]() |
paintImmediately():void
Redraw the component UI face immediately if it is visible and ready to paint.
| Component | |
![]() |
parentReAppendChildren():void
Calls parent reAppendChildren if parent is a container.
| Component | |
| JTable | |||
![]() |
putClientProperty(key:*, value:*):void
Adds an arbitrary key/value "client property" to this component.
| Component | |
![]() |
reAppendChildren():void
Removes all children and then append them with their constraints.
| Container | |
![]() |
reAppendToParent(constraints:Object = null):void
Removes this component from its parent and then append it with specified constraints.
| Component | |
![]() |
Remove the specified child component.
| Container | |
![]() |
removeAll():void
Remove all child components.
| Container | |
![]() |
Remove the specified index child component.
| Container | |
![]() |
removeChild(child:DisplayObject):DisplayObject
Removes a normal display object child.
| Container | |
![]() |
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 | ||
![]() |
removeDragAcceptableInitiator(com:Component):void
Removes a component to be the acceptable drag initiator to this component.
| Component | |
|
removeEditor():void
| JTable | ||
![]() |
removeFromContainer():void
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 | |
|
removeLayoutComponent(comp:Component):void
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 | ||
![]() |
repaint():void
Redraws the component face next RENDER event.This method can
be called often, so it needs to execute quickly.
| Component | |
![]() |
repaintAndRevalidate():void
| Component | |
![]() |
requestFocus():Boolean
Requests that this Component get the input focus, and that this
Component's top-level ancestor become the focused Window.
| Component | |
|
resizeAndRepaint():void
| JTable | ||
![]() |
revalidate():void
Supports deferred automatic layout.
| Component | |
![]() |
revalidateIfNecessary():void
| 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 | ||
![]() |
setAlignmentX(ax:Number):void
| Component | |
![]() |
setAlignmentY(ay:Number):void
| Component | |
![]() |
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 | ||
![]() |
setAwmlID(id:String):void
Sets ID used to identify components created from AWML.
| Component | |
![]() |
setAwmlIndex(index:Number):void
Sets ID used to identify components created from AWML.
| Component | |
![]() |
setAwmlNamespace(theNamespace:String):void
Sets namespace used to identify components created from AWML.
| Component | |
![]() |
setBackground(c:ASColor):void
Sets the background color of this component.
| Component | |
![]() |
setBackgroundDecorator(bg:GroundDecorator):void
Sets a decorator to be the component background, it will represent the component background
with a
DisplayObject. | Component | |
![]() |
Sets the border for the component, null to remove border.
| Component | |
![]() |
setBounds(b:IntRectangle):void
This method will call setComBounds()
| Component | |
![]() |
setCachePreferSizes(b:Boolean):void
Sets whether or not turn on the preferred size, minimum size and
max size cache.
| Component | |
|
setCellEditor(anEditor:TableCellEditor):void
| JTable | ||
|
setCellSelectionEnabled(cellSelectionEnabled:Boolean):void
Sets whether this table allows both a column selection and a
row selection to exist simultaneously.
| JTable | ||
![]() |
setChildIndex(child:DisplayObject, index:int):void
| AWSprite | |
![]() |
setClipBounds(b:IntRectangle):void
Sets the clip bounds, a rectangle mask to make specified bounds visible.
| Component | |
![]() |
setClipMasked(m:Boolean):void
Sets whether the component clip should be masked by its bounds.
| AWSprite | |
![]() |
setClipSize(size:IntDimension):void
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 | ||
![]() |
setComBounds(b:IntRectangle):void
Moves and resizes this component.
| Component | |
![]() |
setComBoundsXYWH(x:int, y:int, w:int, h:int):void
Moves and resizes this component.
| Component | |
![]() |
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 | ||
![]() |
setDragAcceptableInitiatorAppraiser(func:Function):void
Sets a function to judge whether a component is acceptable drag initiator.
| Component | |
![]() |
setDragEnabled(b:Boolean):void
Sets whether this component can fire ON_DRAG_RECOGNIZED event.
| Component | |
![]() |
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 | ||
![]() |
setEnabled(b:Boolean):void
Enable or disable the component.
| Component | |
![]() |
setFocusable(b:Boolean):void
Sets the focusable state of this Component to the specified value.
| Component | |
![]() |
setFocusableSet(b:Boolean):void
Indicate that the
focusable property is set by user or not. | Component | |
![]() |
setFocusTraversalPolicy(ftp:FocusTraversalPolicy):void
Sets the focus traversal policy to this container, or sets null to
make this container use its parent's focus traversal policy.
| Container | |
![]() |
Sets the text font for this component.
this method will cause a repaint and revalidate method call. | Component | |
![]() |
setFontValidated(b:Boolean):void
Sets whether the new font are applied and taked effect.
| Component | |
![]() |
setForeground(c:ASColor):void
Sets the foreground color of this component.
| Component | |
![]() |
setForegroundDecorator(fg:GroundDecorator):void
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 | |
![]() |
setGlobalLocation(gp:IntPoint):void
Set the component's location in global coordinate.
| Component | |
![]() |
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 | ||
![]() |
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 | ||
![]() |
setLayout(layout:LayoutManager):void
| Container | |
![]() |
setLocation(newPos:IntPoint):void
Set the component's location, if it is diffs from old location, invalidate it to wait validate.
| Component | |
![]() |
setLocationXY(x:int, y:int):void
| Component | |
![]() |
setMaximumHeight(maximumHeight:int):void
Sets maximum height, -1 means auto count.
| Component | |
![]() |
setMaximumSize(maximumSize:IntDimension):void
setMaximumSize(d:IntDimension)
setMaximumSize(width:Number, height:Number) Set the maximumSize, then the component's maximumSize is specified. | Component | |
![]() |
setMaximumWidth(maximumWidth:int):void
Sets maximum width, -1 means auto count.
| Component | |
![]() |
setMinimumHeight(minimumHeight:int):void
Sets minimum height, -1 means auto count.
| Component | |
![]() |
setMinimumSize(minimumSize:IntDimension):void
setMinimumSize(d:IntDimension)
setMinimumSize(width:Number, height:Number) Set the minimumSize, then the component's minimumSize is specified. | Component | |
![]() |
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 | ||
![]() |
setName(name:String):void
Sets the name of this component
| Component | |
![]() |
setOpaque(b:Boolean):void
If true the component paints every pixel within its bounds.
| Component | |
![]() |
setOpaqueSet(b:Boolean):void
This method will be called to set true when you set the opaque by
setOpaque(). | Component | |
![]() |
setPreferredHeight(preferredHeight:int):void
Sets preferred width, -1 means auto count.
| Component | |
|
setPreferredScrollableViewportSize(size:IntDimension):void
Sets the preferred size of the viewport for this table.
| JTable | ||
![]() |
setPreferredSize(preferredSize:IntDimension):void
setPreferredSize(d:IntDimension)
setPreferredSize(width:Number, height:Number) Set the preferredSize, then the component's preferredSize is specified. | Component | |
![]() |
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 | ||
|
setSelectionModel(newModel:ListSelectionModel):void
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 | ||
![]() |
setSizeWH(w:int, h:int):void
| Component | |
|
setTableHeader(tableHeader:JTableHeader):void
Sets the
tableHeader working with this JTable to newHeader. | JTable | ||
![]() |
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 | ||
![]() |
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 | ||
|
setViewportTestSize(s:IntDimension):void
| JTable | ||
|
setViewPosition(p:IntPoint, programmatic:Boolean = true):void
| JTable | ||
![]() |
setVisible(v:Boolean):void
Set a component to be hide or shown.
| Component | |
![]() |
setWidth(width:int):void
Sets the component's width.
| Component | |
![]() |
setX(x:int):void
Sets the x coordinate of the components.
| Component | |
![]() |
setY(y:int):void
Sets the y coordinate of the components.
| Component | |
![]() |
swapChildren(child1:DisplayObject, child2:DisplayObject):void
| AWSprite | |
![]() |
swapChildrenAt(index1:int, index2:int):void
| AWSprite | |
|
tableChanged(e:TableModelEvent):void
Invoked when this table's
TableModel generates
a TableModelEvent. | JTable | ||
![]() |
toString():String
| Component | |
![]() |
transferFocus():Boolean
Transfers the focus to the next component, as though this Component were
the focus owner.
| Component | |
![]() |
transferFocusBackward():Boolean
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 | ||
![]() |
validate():void
Validates this container and all of its subcomponents.
| Container | |
| Method | Defined by | ||
|---|---|---|---|
|
changeSelectionModel(sm:ListSelectionModel, index:int, toggle:Boolean, extend:Boolean, selected:Boolean, programmatic:Boolean = true):void
| JTable | ||
![]() |
clearPreferSizeCaches():void
| Component | |
![]() |
call the ui, if ui return null, ehn call layout to count.
| Container | |
![]() |
call the ui, if ui return null, ehn call layout to count.
| Container | |
![]() |
call the ui, if ui return null, ehn call layout to count.
| Container | |
![]() |
d_addChild(child:DisplayObject):DisplayObject
| AWSprite | |
![]() |
d_addChildAt(child:DisplayObject, index:int):DisplayObject
| AWSprite | |
![]() |
d_getChildAt(index:int):DisplayObject
| AWSprite | |
![]() |
d_getChildByName(name:String):DisplayObject
| AWSprite | |
![]() |
d_getChildIndex(child:DisplayObject):int
| AWSprite | |
![]() |
d_removeChild(child:DisplayObject):DisplayObject
| AWSprite | |
![]() |
d_removeChildAt(index:int):DisplayObject
| AWSprite | |
![]() |
d_setChildIndex(child:DisplayObject, index:int):void
| AWSprite | |
![]() |
d_swapChildren(child1:DisplayObject, child2:DisplayObject):void
| AWSprite | |
![]() |
d_swapChildrenAt(index1:int, index2:int):void
| AWSprite | |
|
fireStateChanged(programmatic:Boolean = true):void
| JTable | ||
![]() |
getBackgroundChild():DisplayObject
Returns the background child.
| AWSprite | |
![]() |
getChildIndexWithComponentIndex(index:int):int
| Container | |
![]() |
getComponentIndexWithChildIndex(index:int):int
| Container | |
![]() |
Override this to return another component that the focus should be transmit to.
| Component | |
![]() |
getForegroundChild():DisplayObject
Returns the foreground child.
| AWSprite | |
![]() |
| Container | |
![]() |
invalidateTree():void
Makes this component and all parents
above it are marked as needing to be laid out.
| Component | |
![]() |
isChild(child:DisplayObject):Boolean
Returns whether or not the child is this sprite's direct child.
| AWSprite | |
![]() |
locate():void
Locate the component to the current location.
| Component | |
![]() |
paint(b:IntRectangle):void
draw the component interface in specified bounds.
| Component | |
![]() |
removeAtImp(i:int):Component
| Container | |
![]() |
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 | |
![]() |
setClipMaskRect(b:IntRectangle):void
| AWSprite | |
![]() |
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 | |
![]() |
size():void
Do the process when size changed.
| Component | |
|
updateSubComponentUI(componentShell:*):void
| JTable | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
![]() | Dispatched when the component is clicked continuesly. | Component | ||
| Dispatched when the column selection changed. | JTable | |||
![]() | Dispatched when a component is added to a container. | Container | ||
![]() | Dispatched when a component is removed from a container. | Container | ||
![]() | Dispatched when a drag is drop on this component. | Component | ||
![]() | Dispatched when a drag is enter this component area. | Component | ||
![]() | Dispatched when a drag is exit this component area. | Component | ||
![]() | Dispatched when the component is recongnized that it can be drag start. | Component | ||
![]() | Dispatched when the component gained the focus from it is not the focus owner | Component | ||
![]() | Dispatched when the key down and the component is the focus owner. | Component | ||
![]() | Dispatched when the key up and the component is the focus owner. | Component | ||
![]() | Dispatched when the component lost the focus from it was the focus owner. | Component | ||
![]() | Dispatched when the component visible is set to false from true. | Component | ||
![]() | Dispatched when the component is moved. | Component | ||
![]() | Dispatched when the component is painted. | Component | ||
![]() | Dispatched when the mouse released or released out side. | AWSprite | ||
![]() | Dispatched only when the mouse released out side. | AWSprite | ||
![]() | Dispatched when the component is resized. | Component | ||
| Dispatched when the row selection changed. | JTable | |||
![]() | 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 | |||
| Constant | Defined 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 | ||
| cellPane | property |
protected var cellPane:Container
| headerPane | property |
protected var headerPane:Container
| JTable | () | constructor |
public function JTable(dm:TableModel = null)
Constructs a default JTable.
dm:TableModel (default = null) |
See also
| __listSelectionChanged | () | method |
public function __listSelectionChanged(e:SelectionEvent):voidInvoked 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.
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):voidAdds a listener to column selection changed.
Parameterslistener: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
| addLayoutComponent | () | method |
public function addLayoutComponent(comp:Component, constraints:Object):voiddo nothing
Parameterscomp: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.
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):voidAdds a listener to row selection changed.
Parameterslistener: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
| addStateListener | () | method |
public function addStateListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):voidAdd a listener to listen the viewpoat state change event.
When the viewpoat's state changed, the state is all about:
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
| 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:
toggle: false, extend: false.
Clear the previous selection and ensure the new cell is selected.
toggle: false, extend: true.
Extend the previous selection from the anchor to the specified cell,
clearing all other selections.
toggle: true, extend: false.
If the specified cell is selected, deselect it. If it is not selected, select it.
toggle: true, extend: true.
Leave the selection state as it is, but move the anchor index to the specified location.
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):voidDeselects all selected columns and rows.
Parametersprogrammatic:Boolean (default = true) — indicate if this is a programmatic change
|
| columnAdded | () | method |
public function columnAdded(e:TableColumnModelEvent):voidInvoked 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
| 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].
point:IntPoint — point the location of interest
|
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):voidInvoked 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
| columnMoved | () | method |
public function columnMoved(e:TableColumnModelEvent):voidInvoked 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
| columnRemoved | () | method |
public function columnRemoved(e:TableColumnModelEvent):voidInvoked 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
| 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
| 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.
viewColumnIndex:int — viewColumnIndex the index of the column in the view
|
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.
modelColumnIndex:int — modelColumnIndex the index of the column in the model
|
int — the index of the corresponding column in the view
|
See also
| createDefaultCellFactories | () | method |
public function createDefaultCellFactories():void
| createDefaultColumnModel | () | method |
| 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 |
| createDefaultEditors | () | method |
public function createDefaultEditors():void
| createDefaultSelectionModel | () | method |
| createDefaultTableHeader | () | method |
| 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:
Viewport. If the JTable is not
enclosed in a JScrollPane this may
leave parts of the table invisible.
JTable, including the one that is being
adjusted.
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.
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).
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.
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 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.
|
Boolean — false if for any reason the cell cannot be edited,
or if the indices are invalid
|
| editingCanceled | () | method |
public function editingCanceled(source:CellEditor):voidInvoked 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
| editingStopped | () | method |
public function editingStopped(source:CellEditor):voidInvoked 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
| ensureCellIsVisible | () | method |
public function ensureCellIsVisible(row:int, column:int):voidScrolls the JTable to make the specified cell completely visible.
Parametersrow: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.
Boolean — the autoCreateColumnsFromModel of the table
|
See also
| getAutoResizeMode | () | method |
public function getAutoResizeMode():intReturns the auto resize mode of the table. The default mode is AUTO_RESIZE_SUBSEQUENT_COLUMNS.
Returnsint — the autoResizeMode of the table
|
See also
| getCellEditor | () | method |
| getCellEditorOfRowColumn | () | method |
public function getCellEditorOfRowColumn(row:int, column:int):TableCellEditorParameters
row:int |
|
column:int |
TableCellEditor |
| getCellFactory | () | method |
public function getCellFactory(row:int, column:int):TableCellFactoryParameters
row:int |
|
column:int |
TableCellFactory |
| getCellPane | () | method |
public function getCellPane():ContainerReturns the container that holds the cells.
ReturnsContainer —
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
|
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().
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.
identifier:Object — identifier the identifier object
|
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.
columnIndex:int — columnIndex the index of the desired column
|
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.
column:int — column the column in the view being queried
|
String — the type of the column at position column
in the view where the first column is column 0
|
| getColumnCount | () | method |
public function getColumnCount():intReturns the number of columns in the column model. Note that this may be different from the number of columns in the table model.
Returnsint — 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.
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.
column:int — column the column in the view being queried
|
String — the name of the column at position column
in the view where the first column is column 0
|
| getColumnSelectionAllowed | () | method |
public function getColumnSelectionAllowed():BooleanReturns true if columns can be selected.
ReturnsBoolean — 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.
columnClass:String — columnClass return the default cell factory
for this columnClass
|
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.
columnClass:String — columnClass return the default cell editor for this columnClass
|
TableCellEditor —
the default cell editor to be used for this columnClass
|
See also
| getEditingColumn | () | method |
public function getEditingColumn():intReturns the index of the column that contains the cell currently being edited. If nothing is being edited, returns -1.
Returnsint — 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():intReturns the index of the row that contains the cell currently being edited. If nothing is being edited, returns -1.
Returnsint — the index of the row that contains the cell currently
being edited; returns -1 if nothing being edited
|
See also
| getExtentSize | () | method |
| getGridColor | () | method |
public function getGridColor():ASColorReturns the color used to draw grid lines. The default color is look and feel dependent.
ReturnsASColor —
the color used to draw grid lines
|
See also
| getHeaderHeight | () | method |
public function getHeaderHeight():intReturns the header height.
Returnsint |
| getHorizontalBlockIncrement | () | method |
public function getHorizontalBlockIncrement():int
Returns
int |
| getHorizontalUnitIncrement | () | method |
public function getHorizontalUnitIncrement():int
Returns
int |
| getIntercellSpacing | () | method |
public function getIntercellSpacing():IntDimensionReturns the horizontal and vertical space between cells. The default spacing is (1, 1), which provides room to draw the grid.
ReturnsIntDimension —
the horizontal and vertical spacing between cells
|
See also
| getLayoutAlignmentX | () | method |
public function getLayoutAlignmentX(target:Container):Numberreturn 0
Parameterstarget:Container |
Number |
| getLayoutAlignmentY | () | method |
public function getLayoutAlignmentY(target:Container):Numberreturn 0
Parameterstarget:Container |
Number |
| getLogicLocationFromPixelLocation | () | method |
public function getLogicLocationFromPixelLocation(p:IntPoint):IntPointReturns the location in the JTable view area of the logic location.
Parametersp:IntPoint |
IntPoint |
| getModel | () | method |
public function getModel():TableModel
Returns the TableModel that provides the data displayed by this
JTable.
TableModel —
the TableModel that provides the data displayed by this JTable
|
See also
| getPixelLocationFromLogicLocation | () | method |
public function getPixelLocationFromLogicLocation(p:IntPoint):IntPointReturns the location in the JTable view area of the logic location.
Parametersp:IntPoint |
IntPoint |
| getPreferredScrollableViewportSize | () | method |
public function getPreferredScrollableViewportSize():IntDimensionReturns the preferred size of the viewport for this table.
ReturnsIntDimension —
a IntDimension object containing the preferredSize of the JViewport
which displays this table
|
| getRowCount | () | method |
public function getRowCount():intReturns the number of rows in this table's model.
Returnsint — the number of rows in this table's model
|
See also
| getRowHeight | () | method |
public function getRowHeight():intReturns the height of a table row, in pixels. The default row height is 20.0.
Returnsint — 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.
int — the number of pixels between cells in a row
|
See also
| getRowSelectionAllowed | () | method |
public function getRowSelectionAllowed():BooleanReturns true if rows can be selected.
ReturnsBoolean — true if rows can be selected, otherwise false
|
See also
| getSelectedColumn | () | method |
public function getSelectedColumn():intReturns the index of the first selected column, -1 if no column is selected.
Returnsint — the index of the first selected column
|
| getSelectedColumnCount | () | method |
public function getSelectedColumnCount():intReturns the number of selected columns.
Returnsint — the number of selected columns, 0 if no columns are selected
|
| getSelectedColumns | () | method |
public function getSelectedColumns():ArrayReturns the indices of all selected columns.
ReturnsArray — 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():intReturns the index of the first selected row, -1 if no row is selected.
Returnsint — the index of the first selected row
|
| getSelectedRowCount | () | method |
public function getSelectedRowCount():intReturns the number of selected rows.
Returnsint — the number of selected rows, 0 if no rows are selected
|
| getSelectedRows | () | method |
public function getSelectedRows():ArrayReturns the indices of all selected rows.
ReturnsArray — 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():ASColorReturns the background color for selected cells.
ReturnsASColor —
the Color used for the background of selected list items
|
See also
| getSelectionForeground | () | method |
public function getSelectionForeground():ASColorReturns the foreground color for selected cells.
ReturnsASColor —
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.
ListSelectionModel —
the object that provides row selection state, null
if row selection is not allowed
|
See also
| getShowHorizontalLines | () | method |
public function getShowHorizontalLines():BooleanReturns true if the table draws horizontal lines between cells, false if it doesn't. The default is true.
ReturnsBoolean — true if the table draws horizontal lines between cells, false if it
doesn't
|
See also
| getShowVerticalLines | () | method |
public function getShowVerticalLines():BooleanReturns true if the table draws vertical lines between cells, false if it doesn't. The default is true.
ReturnsBoolean — 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.
JTableHeader —
the tableHeader used by this table
|
See also
| getTableUI | () | method |
| getUIClassID | () | method |
public override function getUIClassID():StringReturns the suffix used to construct the name of the L&F class used to render this component.
ReturnsString — the string "TableUI"
|
See also
| 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
|
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 |
| getViewPosition | () | method |
| getViewSize | () | method |
| invalidateLayout | () | method |
| 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
|
Boolean — true if the cell is editable
|
See also
| isCellSelected | () | method |
public function isCellSelected(row:int, column:int):BooleanReturns true if the specified indices are in the valid range of rows and columns and the cell at the specified position is selected.
Parametersrow:int — the row being queried
|
|
column:int — the column being queried
|
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):BooleanReturns true if the specified index is in the valid range of columns, and the column at that index is selected.
Parameterscolumn:int — column the column in the column model
|
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():BooleanReturns true if a cell is being edited.
ReturnsBoolean — true if the table is editing a cell
|
See also
| isRowSelected | () | method |
public function isRowSelected(row:int):BooleanReturns true if the specified index is in the valid range of rows, and the row at that index is selected.
Parametersrow:int |
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):voidposition and fill cells here
Parameterstarget:Container |
| maximumLayoutSize | () | method |
public function maximumLayoutSize(target:Container):IntDimensionParameters
target:Container |
IntDimension |
| minimumLayoutSize | () | method |
public function minimumLayoutSize(target:Container):IntDimensionParameters
target:Container |
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.
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 |
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.
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.
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):voidRemoves a listener from column selection changed listeners.
Parameterslistener:Function — the listener to be removed.
|
See also
| removeEditor | () | method |
public function removeEditor():void
| removeLayoutComponent | () | method |
| removeRowSelectionInterval | () | method |
public function removeRowSelectionInterval(index0:int, index1:int, programmatic:Boolean = true):void
Deselects the rows from index0 to index1, inclusive.
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):voidRemoves a listener from row selection changed listeners.
Parameterslistener:Function — the listener to be removed.
|
See also
| removeStateListener | () | method |
public function removeStateListener(listener:Function):voidRemoves a state listener.
Parameterslistener:Function — the listener to be removed.
|
See also
| 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].
point:IntPoint — point the location of interest
|
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):voidSelects all rows, columns, and cells in the table.
Parametersprogrammatic: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.
autoCreateColumnsFromModel:Boolean — autoCreateColumnsFromModel true if JTable should automatically create columns
|
See also
| setAutoResizeMode | () | method |
public function setAutoResizeMode(mode:int):voidSets the table's auto resize mode when the table is resized.
Parametersmode: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 |
| 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.
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.
columnModel:TableColumnModel — columnModel the new data source for this table
|
See also
| setColumnSelectionAllowed | () | method |
public function setColumnSelectionAllowed(columnSelectionAllowed:Boolean):voidSets whether the columns in this model can be selected.
ParameterscolumnSelectionAllowed: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.
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.
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.
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.
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.
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.
dataModel:TableModel — dataModel the new data source for this table
|
See also
| setPreferredScrollableViewportSize | () | method |
public function setPreferredScrollableViewportSize(size:IntDimension):voidSets the preferred size of the viewport for this table.
Parameterssize: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.
rowHeight:int — rowHeight new row height
|
— RangeError if rowHeight is less than 1
|
See also
| setRowMargin | () | method |
public function setRowMargin(rowMargin:int):voidSets the amount of empty space between cells in adjacent rows.
ParametersrowMargin:int — rowMargin the number of pixels between cells in a row
|
See also
| setRowSelectionAllowed | () | method |
public function setRowSelectionAllowed(rowSelectionAllowed:Boolean):voidSets whether the rows in this model can be selected.
ParametersrowSelectionAllowed: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.
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):voidSets 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):voidSets 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):voidSets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.
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.
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.
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.
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.
showVerticalLines:Boolean — showVerticalLines true if table view should draw vertical lines
|
See also
| setSize | () | method |
| 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.
tableHeader:JTableHeader — tableHeader new tableHeader
|
See also
| setUI | () | method |
public override function setUI(newUI:ComponentUI):voidSets the L&F object that renders this component and repaints.
ParametersnewUI:ComponentUI — the TableUI L&F object
|
— 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 |
| 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
| columnSelectionChanged | event |
org.aswing.event.SelectionEvent
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:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
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. |
currentTarget | The 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. |
target | The 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. |
| rowSelectionChanged | event |
org.aswing.event.SelectionEvent
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:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
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. |
currentTarget | The 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. |
target | The 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
| tableCellEditingCanceled | event |
org.aswing.event.TableCellEditEvent
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:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getRow() | the row be edit |
getColumn() | the column be edit |
currentTarget | The 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. |
target | The 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. |
| tableCellEditingStarted | event |
org.aswing.event.TableCellEditEvent
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:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getRow() | the row be edit |
getColumn() | the column be edit |
getOldValue() | the old value |
currentTarget | The 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. |
target | The 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. |
| tableCellEditingStopped | event |
org.aswing.event.TableCellEditEvent
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:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
getRow() | the row be edit |
getColumn() | the column be edit |
getOldValue() | the old value |
getNewValue() | the new value edited |
currentTarget | The 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. |
target | The 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. |
| AUTO_INCREMENT | constant |
public static const AUTO_INCREMENT:int = -2.147483648E9The default unit/block increment, it means auto count a value.
| AUTO_RESIZE_ALL_COLUMNS | constant |
public static const AUTO_RESIZE_ALL_COLUMNS:int = 4During all resize operations, proportionately resize all columns.
| AUTO_RESIZE_LAST_COLUMN | constant |
public static const AUTO_RESIZE_LAST_COLUMN:int = 3During all resize operations, apply adjustments to the last column only.
| AUTO_RESIZE_NEXT_COLUMN | constant |
public static const AUTO_RESIZE_NEXT_COLUMN:int = 1When a column is adjusted in the UI, adjust the next column the opposite way.
| AUTO_RESIZE_OFF | constant |
public static const AUTO_RESIZE_OFF:int = 0Do not adjust column widths automatically; use a scrollbar.
| AUTO_RESIZE_SUBSEQUENT_COLUMNS | constant |
public static const AUTO_RESIZE_SUBSEQUENT_COLUMNS:int = 2During UI adjustment, change subsequent columns to preserve the total width; this is the default behavior.
| MULTIPLE_SELECTION | constant |
public static const MULTIPLE_SELECTION:int = 1Can select any item at a time.
| SINGLE_SELECTION | constant |
public static const SINGLE_SELECTION:int = 0Only can select one most item at a time.