Packagecom.theriabook.util.logging
Classpublic class LoggerTreeDataElement
InheritanceLoggerTreeDataElement Inheritance flash.events.EventDispatcher

Data object for representing hierarchical packages structure. Use this structure for custom Log Adjustment Managers.



Public Properties
 PropertyDefined by
  category : String
Category (for real loggers).
LoggerTreeDataElement
  children : ArrayCollection
Child nodes/loggers collection.
LoggerTreeDataElement
  helperMap : Dictionary
[read-only] Children map (by label field).
LoggerTreeDataElement
  isRealLogger : Boolean
[read-only] Is it real logger or just logical node.
LoggerTreeDataElement
  isRoot : Boolean
[read-only] Is it root node.
LoggerTreeDataElement
  label : String
Label for node.
LoggerTreeDataElement
  level : int
Logger level (for nodes is a default level for new children).
LoggerTreeDataElement
  parentData : LoggerTreeDataElement
[read-only] Parent node.
LoggerTreeDataElement
  root : LoggerTreeDataElement
[read-only] Root package for tree.
LoggerTreeDataElement
Public Methods
 MethodDefined by
  
LoggerTreeDataElement
  
appendCategory(categoryString:String):void
Appends new category (with level of parent node).
LoggerTreeDataElement
  
assignLevel(level:int, deepAssign:Boolean = true):void
Assigns the level to this node.
LoggerTreeDataElement
  
getCountByLevel(level:int):int
Returns count of children with level specified.
LoggerTreeDataElement
  
getLevelByCategory(category:String):int
Gets level for category passed.
LoggerTreeDataElement
  
getPlainCategoryList():ArrayCollection
Returns categories of packages tree as plain categories list.
LoggerTreeDataElement
  
makeLevelSnapshot(deepSnapshot:Boolean = true):void
Makes levels copy (for undo possibilities).
LoggerTreeDataElement
  
rollbackLevels(deepRollback:Boolean = true):void
Rollback levels from snapshot.
LoggerTreeDataElement
  
toString():String
LoggerTreeDataElement
Events
 EventSummaryDefined by
   Dispatched when changes in children.LoggerTreeDataElement
   Dispatched when one child's level change.LoggerTreeDataElement
   Dispatched when level change.LoggerTreeDataElement
Public Constants
 ConstantDefined by
  CHILDREN_CHANGE : String = "childrenChange"
[static] Dispatched when changes in children.
LoggerTreeDataElement
  CHILDREN_LEVEL_CHANGE : String = "childrenLevelChange"
[static] Dispatched when one child's level change.
LoggerTreeDataElement
  DEFAULT_LEVEL : int = -1
[static] Constant for representing default log level.
LoggerTreeDataElement
  LEVEL_CHANGE : String = "levelChange"
[static] Dispatched when level change.
LoggerTreeDataElement
Property detail
categoryproperty
public var category:String

Category (for real loggers).

childrenproperty 
children:ArrayCollection  [read-write]

Child nodes/loggers collection.

This property can be used as the source for data binding.

Implementation
    public function get children():ArrayCollection
    public function set children(value:ArrayCollection):void
helperMapproperty 
helperMap:Dictionary  [read-only]

Children map (by label field).

This property can be used as the source for data binding.

Implementation
    public function get helperMap():Dictionary
isRealLoggerproperty 
isRealLogger:Boolean  [read-only]

Is it real logger or just logical node.

This property can be used as the source for data binding.

Implementation
    public function get isRealLogger():Boolean
isRootproperty 
isRoot:Boolean  [read-only]

Is it root node.

This property can be used as the source for data binding.

Implementation
    public function get isRoot():Boolean
labelproperty 
public var label:String

Label for node.

levelproperty 
level:int  [read-write]

Logger level (for nodes is a default level for new children). For real loggers is logging level.

This property can be used as the source for data binding.

Implementation
    public function get level():int
    public function set level(value:int):void
parentDataproperty 
parentData:LoggerTreeDataElement  [read-only]

Parent node.

This property can be used as the source for data binding.

Implementation
    public function get parentData():LoggerTreeDataElement
rootproperty 
root:LoggerTreeDataElement  [read-only]

Root package for tree.

This property can be used as the source for data binding.

Implementation
    public function get root():LoggerTreeDataElement
Constructor detail
LoggerTreeDataElement()constructor
public function LoggerTreeDataElement()
Method detail
appendCategory()method
public function appendCategory(categoryString:String):void

Appends new category (with level of parent node).

Parameters
categoryString:String — Is category as dot-separated string.
assignLevel()method 
public function assignLevel(level:int, deepAssign:Boolean = true):void

Assigns the level to this node.

Parameters
level:int — Level to assign.
 
deepAssign:Boolean (default = true) — Assign recursively to children flag.
getCountByLevel()method 
public function getCountByLevel(level:int):int

Returns count of children with level specified.

Parameters
level:int — Passed level.

Returns
int — Number of children with level level.
getLevelByCategory()method 
public function getLevelByCategory(category:String):int

Gets level for category passed. Returns DEFAULT_LEVEL if no such category.

Parameters
category:String — Target category.

Returns
int — Category level.

See also

getPlainCategoryList()method 
public function getPlainCategoryList():ArrayCollection

Returns categories of packages tree as plain categories list.

Returns
ArrayCollection — Plain categories list.
makeLevelSnapshot()method 
public function makeLevelSnapshot(deepSnapshot:Boolean = true):void

Makes levels copy (for undo possibilities).

Parameters
deepSnapshot:Boolean (default = true) — Make snapshot recursively flag.

See also

rollbackLevels()method 
public function rollbackLevels(deepRollback:Boolean = true):void

Rollback levels from snapshot.

Parameters
deepRollback:Boolean (default = true) — Make rollback recursively flag.

See also

toString()method 
public override function toString():String

Returns
String
Event detail
childrenChangeevent 
Event object type: flash.events.Event

Dispatched when changes in children.

See also

childrenLevelChangeevent  
Event object type: flash.events.Event

Dispatched when one child's level change.

See also

levelChangeevent  
Event object type: flash.events.Event

Dispatched when level change.

See also

Constant detail
CHILDREN_CHANGEconstant
public static const CHILDREN_CHANGE:String = "childrenChange"

Dispatched when changes in children.

CHILDREN_LEVEL_CHANGEconstant 
public static const CHILDREN_LEVEL_CHANGE:String = "childrenLevelChange"

Dispatched when one child's level change.

DEFAULT_LEVELconstant 
public static const DEFAULT_LEVEL:int = -1

Constant for representing default log level.

LEVEL_CHANGEconstant 
public static const LEVEL_CHANGE:String = "levelChange"

Dispatched when level change.