Package | com.adobe.flex.extras.controls.springgraph |
Class | public class Roamer |
Inheritance | Roamer SpringGraph mx.containers.Canvas |
itemLimit
, maxDistanceFromCurrent
, and currentItem properties
.
Property | Defined by | ||
---|---|---|---|
addItemEffect : Effect
An effect that applied to all itemRenderer instances when they are add to the spring graph.
|
SpringGraph | ||
autoFit : Boolean
Enable/disable the auto-fit feature.
|
SpringGraph | ||
backOK : Boolean
[read-only] Whether the back() function will have any effect at the moment.
|
Roamer | ||
currentItem : Item
The item that current acts as the 'center' or 'root' of the graph.
|
Roamer | ||
dataProvider : Object
Defines the data model for this springgraph.
|
Roamer | ||
edgeRenderer : IEdgeRenderer
Defines an Edge Renderer object that we will use to render edges.
|
SpringGraph | ||
forwardOK : Boolean
[read-only] Whether the forward() function will have any effect at the moment
|
Roamer | ||
fullNodeCount : int
[read-only] The total number of items in the dataProvider.
|
Roamer | ||
history : Array
[read-only] An ordered list of all the items that been the current item.
|
Roamer | ||
historyIndex : int
The index into "history" that corresponds to the currentItem.
|
Roamer | ||
itemLimit : int
The maximum number of items that are visible at any time.
|
Roamer | ||
itemRenderer : IFactory
Defines the UIComponent class for rendering an item.
|
SpringGraph | ||
lineColor : int
The color we use to draw the lines that represent links between items.
|
SpringGraph | ||
maxDistanceFromCurrent : int
We only display items that are within this distance from the current item.
|
Roamer | ||
motionThreshold : Number
[for experimental use].
|
SpringGraph | ||
removeItemEffect : Effect
An effect that is applied to all itemRenderer instances when they are removed from the spring graph.
|
SpringGraph | ||
repulsionFactor : Number
How strongly do items push each other away.
|
SpringGraph | ||
showHistory : Boolean
If true, then all items that have been the 'current item' are made visible.
|
Roamer | ||
tidyHistory : Boolean
Keeps all visibleHistoryItems clustered together.
|
Roamer | ||
viewFactory : IViewFactory
A factory that can create views for specific Items.
|
SpringGraph | ||
visibleHistoryItems : Object
[read-only] A list of all the items that are currently visible only because showHistory is enabled.
|
Roamer | ||
visibleNodeCount : int
[read-only] The number of items in the dataProvider that are currently visible.
|
Roamer | ||
xmlNames : Array
The XML element and attribute names to use when parsing an XML dataProvider.
|
SpringGraph |
Method | Defined by | ||
---|---|---|---|
back():void
Sets the currentItem to the previous history Item.
|
Roamer | ||
Calulate the distance between 2 items.
|
Roamer | ||
empty():void
Throw away the dataProvider, leaving an empty graph.
|
SpringGraph | ||
forward():void
Sets the currentItem to the next history Item.
|
Roamer | ||
hasBeenCurrentItem(item:Item):Boolean
Find out if a given item has ever been the currentItem.
|
Roamer | ||
Force the item to not be shown, even if it is inside the limits set by 'maxDistanceFromCurrent'.
|
Roamer | ||
refresh():void
Redraw everything.
|
SpringGraph | ||
resetHistory():void
Forget which items have been the current item.
|
Roamer | ||
resetShowHide():void
Cancels the effect of any prior calls to hideItem and/or showItem.
|
Roamer | ||
setDataProvider(dp:XML, currentId:String):void
sets the data provider and chooses the initial currentItem.
|
Roamer | ||
Force the item to be shown, even if it is outside the limits set by 'maxDistanceFromCurrent'.
|
Roamer |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when there is any change to the nodes and/or links of this graph. | Roamer |
backOK | property |
backOK:Boolean
[read-only]
Whether the back() function will have any effect at the moment.
This property can be used as the source for data binding.
Implementation public function get backOK():Boolean
currentItem | property |
currentItem:Item
[read-write]
The item that current acts as the 'center' or 'root' of the graph. This item defines the subset of the graph that will be visible.
Implementation public function get currentItem():Item
public function set currentItem(value:Item):void
dataProvider | property |
dataProvider:Object
[read-write]
Defines the data model for this springgraph. See SpringGraph.dataProvider for more information.
This property can be used as the source for data binding.
Implementation public function get dataProvider():Object
public function set dataProvider(value:Object):void
forwardOK | property |
forwardOK:Boolean
[read-only]
Whether the forward() function will have any effect at the moment
This property can be used as the source for data binding.
Implementation public function get forwardOK():Boolean
fullNodeCount | property |
fullNodeCount:int
[read-only]
The total number of items in the dataProvider.
Implementation public function get fullNodeCount():int
history | property |
history:Array
[read-only]
An ordered list of all the items that been the current item.
This property can be used as the source for data binding.
Implementation public function get history():Array
historyIndex | property |
historyIndex:int
[read-write]
The index into "history" that corresponds to the currentItem. Can be any number between 0 and the index of the most recent history entry. Usually this is simply the index of the most recent history entry. However, if you've used back() or forward() then this index will vary. You can also set this index to any valid value; this will cause currentItem to become the corresponding history item.
This property can be used as the source for data binding.
Implementation public function get historyIndex():int
public function set historyIndex(value:int):void
itemLimit | property |
itemLimit:int
[read-write]
The maximum number of items that are visible at any time.
This property can be used as the source for data binding.
Implementation public function get itemLimit():int
public function set itemLimit(value:int):void
maxDistanceFromCurrent | property |
maxDistanceFromCurrent:int
[read-write]
We only display items that are within this distance from the current item.
Implementation public function get maxDistanceFromCurrent():int
public function set maxDistanceFromCurrent(value:int):void
showHistory | property |
showHistory:Boolean
[read-write]
If true, then all items that have been the 'current item' are made visible.
This property can be used as the source for data binding.
Implementation public function get showHistory():Boolean
public function set showHistory(value:Boolean):void
tidyHistory | property |
tidyHistory:Boolean
[read-write]
Keeps all visibleHistoryItems clustered together. If this is set to false, history items tend to form a long chain that makes the autoFit mode tend to shrink the repulsionFactor excessively.
This property can be used as the source for data binding.
Implementation public function get tidyHistory():Boolean
public function set tidyHistory(value:Boolean):void
visibleHistoryItems | property |
visibleHistoryItems:Object
[read-only]
A list of all the items that are currently visible only because showHistory is enabled. In other words this list is the entire history minus the items that are currently visible anyway.
This property can be used as the source for data binding.
Implementation public function get visibleHistoryItems():Object
visibleNodeCount | property |
visibleNodeCount:int
[read-only]
The number of items in the dataProvider that are currently visible.
Implementation public function get visibleNodeCount():int
back | () | method |
public function back():void
Sets the currentItem to the previous history Item. "historyIndex" will be decremented. Has no effect if historyIndex is already 0.
distance | () | method |
public function distance(fromItem:Item, toItem:Item):int
Calulate the distance between 2 items. Currently this is a fast-but-cheezy calculation that returns 0 (if the 2 items are the same), 1 (if the 2 items are linked), or 99 otherwise.
ParametersfromItem:Item |
|
toItem:Item |
int — the distance between the two items. |
forward | () | method |
public function forward():void
Sets the currentItem to the next history Item. "historyIndex" will be incremented. Has no effect if historyIndex is already the highest possible index in "history".
hasBeenCurrentItem | () | method |
public function hasBeenCurrentItem(item:Item):Boolean
Find out if a given item has ever been the currentItem.
Parametersitem:Item — an Item that is contained in this graph |
Boolean |
hideItem | () | method |
public function hideItem(item:Item):void
Force the item to not be shown, even if it is inside the limits set by 'maxDistanceFromCurrent'.
Parametersitem:Item |
resetHistory | () | method |
public function resetHistory():void
Forget which items have been the current item. This will affect the history used by 'showHistory' and 'hasBeenCurrentItem'.
resetShowHide | () | method |
public function resetShowHide():void
Cancels the effect of any prior calls to hideItem and/or showItem.
setDataProvider | () | method |
public function setDataProvider(dp:XML, currentId:String):void
sets the data provider and chooses the initial currentItem.
Parametersdp:XML |
|
currentId:String |
showItem | () | method |
public function showItem(item:Item):void
Force the item to be shown, even if it is outside the limits set by 'maxDistanceFromCurrent'.
Parametersitem:Item |
change | event |
flash.events.Event
Dispatched when there is any change to the nodes and/or links of this graph.