Package | Top Level |
Class | public class DockItem |
isGroup()
function
to differentiate between a shortcut and a group.
See also
Method | Defined by | ||
---|---|---|---|
DockItem(isGroup:Boolean = false)
Constructor.
| DockItem | ||
Only applies to groups. Adds a child dock item to this group.
| DockItem | ||
addToMultiLaunchGroup():void
Adds the shortcut to the multi-launch group.
| DockItem | ||
autoSetName(name:String):void
Auto-sets the name of the shortcut, based on the shortcut target or any other information that Appetizer
can retrieves about the target (such as the file description).
| DockItem | ||
belongsToMultiLaunchGroup():Boolean
Tells whether the shortcut belongs to the multi-launch group or not.
| DockItem | ||
childrenCount():Number
Only applies to groups. Gets the number of children within this group.
| DockItem | ||
getAllGroups(recursively:Boolean = false):Array
Only applies to groups. Gets all the groups within this group.
| DockItem | ||
getChildAt(index:Number):void
Only applies to groups. Gets the sub-dock item at the given index.
| DockItem | ||
getId():Number
Gets the unique id of the dock item.
| DockItem | ||
getName():String
Gets the name of the dock item.
| DockItem | ||
getParameters():String
Gets the shortcut parameters (i.e.
| DockItem | ||
Gets the dock item's parent or
nil if it does not have one. | DockItem | ||
getPath():String
Gets the shortcut file path, which may include special variables.
| DockItem | ||
getResolvedPath():String
Gets the resolved / normalized shortcut file path.
| DockItem | ||
insertChildAt(dockItem:DockItem, index:Number):void
Only applies to groups. Inserts the given dock item at the given index.
| DockItem | ||
isGroup():Boolean
Tells whether the dock item is a group or not.
| DockItem | ||
launch(arguments:String = ""):void
Launches the shortcut.
| DockItem | ||
removeFromMultiLaunchGroup():void
Removes the shortcut from the multi-launch group.
| DockItem | ||
removeFromParent():void
Removes the dock item from its parent.
| DockItem | ||
setName(name:String):void
Sets the dock item name.
| DockItem | ||
setParameters(parameters:String):void
Sets the shortcut parameters (i.e.
| DockItem | ||
setPath(path:String):void
Sets the shortcut path.
| DockItem |
DockItem | () | constructor |
public function DockItem(isGroup:Boolean = false)
Constructor. When creating a new dock item, you must specify whether it is a group or a shortcut by passing a boolean to the constructor.
ParametersisGroup:Boolean (default = false ) — Set this to true if the new dock item is a group; false if it is a shortcut.
|
addChild | () | method |
public function addChild(The:DockItem):void
Only applies to groups. Adds a child dock item to this group.
ParametersThe:DockItem — dock item to add to the group.
|
See also
-- Create the shortcut shortcut = DockItem:new() shortcut:setPath("c:\\window\\system32\\calc.exe") -- Add it to a group someGroup:addChild(shortcut)
addToMultiLaunchGroup | () | method |
public function addToMultiLaunchGroup():void
Adds the shortcut to the multi-launch group.
autoSetName | () | method |
public function autoSetName(name:String):void
Auto-sets the name of the shortcut, based on the shortcut target or any other information that Appetizer can retrieves about the target (such as the file description). This is usually the best way to assign a name to a shortcut.
Parametersname:String — The name.
|
-- Create the shortcut shortcut = DockItem:new() shortcut:setPath("c:\\window\\system32\\calc.exe") shortcut:autoSetName() trace(shortcut:getName()) -- should be "Windows Calculator application file"
belongsToMultiLaunchGroup | () | method |
public function belongsToMultiLaunchGroup():Boolean
Tells whether the shortcut belongs to the multi-launch group or not.
ReturnsBoolean — true if the shortcut belongs to the multi-launch group.
|
childrenCount | () | method |
public function childrenCount():Number
Only applies to groups. Gets the number of children within this group.
ReturnsNumber — The number of children.
|
getAllGroups | () | method |
public function getAllGroups(recursively:Boolean = false):Array
Only applies to groups. Gets all the groups within this group.
Parametersrecursively:Boolean (default = false ) — Sets this to true to also look for the groups in the sub-groups.
|
Array — The groups contained within this group.
|
getChildAt | () | method |
public function getChildAt(index:Number):void
Only applies to groups. Gets the sub-dock item at the given index.
Parametersindex:Number — Index of the child to retrieve.
|
getId | () | method |
public function getId():Number
Gets the unique id of the dock item. You cannot set the id of a dock item as it is automatically assigned on creation. However you can use this id to refer to or look for a particular dock item.
ReturnsNumber — ID of the dock item.
|
getName | () | method |
public function getName():String
Gets the name of the dock item.
ReturnsString — Name of the dock item.
|
getParameters | () | method |
public function getParameters():String
Gets the shortcut parameters (i.e. command line arguments).
ReturnsString — The parameters.
|
getParent | () | method |
public function getParent():DockItem
Gets the dock item's parent or nil
if it does not have one.
DockItem —
The parent.
|
getPath | () | method |
public function getPath():String
Gets the shortcut file path, which may include special variables.
ReturnsString — The file path.
|
See also
getResolvedPath | () | method |
public function getResolvedPath():String
Gets the resolved / normalized shortcut file path. It means that every variables is translated and every relative paths are converted to absolute paths. This is useful if you need to pass the shortcut path to an external tool for example. If the file path is not a relative path and does not contain any variables, it will be equal to the resolved path.
ReturnsString — The resolved file path.
|
insertChildAt | () | method |
public function insertChildAt(dockItem:DockItem, index:Number):void
Only applies to groups. Inserts the given dock item at the given index. If necessary, the dock item is removed from its current parent before being inserted.
ParametersdockItem:DockItem — The dock item to insert.
|
|
index:Number — The insertion index.
|
isGroup | () | method |
public function isGroup():Boolean
Tells whether the dock item is a group or not.
ReturnsBoolean — true if it is a group; false if it is a shortcut.
|
launch | () | method |
public function launch(arguments:String = ""):void
Launches the shortcut. You may also specify additional command line arguments.
Parametersarguments:String (default = " ") — Additional arguments.
|
shortcut = DockItem:new() shortcut:setPath("explorer.exe") shortcut:launch(" /select,c:\\windows")
removeFromMultiLaunchGroup | () | method |
public function removeFromMultiLaunchGroup():void
Removes the shortcut from the multi-launch group.
removeFromParent | () | method |
public function removeFromParent():void
Removes the dock item from its parent.
setName | () | method |
public function setName(name:String):void
Sets the dock item name.
Parametersname:String — The name.
|
See also
setParameters | () | method |
public function setParameters(parameters:String):void
Sets the shortcut parameters (i.e. command line arguments).
Parametersparameters:String — The parameters.
|
setPath | () | method |
public function setPath(path:String):void
Sets the shortcut path. You may use the special variable $(Drive)
to refer to the drive the
application is on. For example, $(Drive)\Total Commander\Total Commander Portable.exe
would
be internally translated to f:\Total Commander\Total Commander Portable.exe
if the application
is on the f:
drive.
path:String — The file path.
|