| Package | potomac.ui |
| Class | public class PartEvent |
| Inheritance | PartEvent flash.events.Event |
Part developers may construct PartEvent instances or use one of the convenient static sendmethods.
| Property | Defined By | ||
|---|---|---|---|
| busyText : String
The text to be shown on the busy animation. | PartEvent | ||
| eventToBroadcast : Event
The event to broadcast for a BROADCAST_TO_PARTS event. | PartEvent | ||
| folder : Folder [read-only]
The parent folder of the part. | PartEvent | ||
| input : PartInput [read-only]
The part's input. | PartEvent | ||
| page : Page [read-only]
The part's parent page. | PartEvent | ||
| pageInput : PageInput [read-only]
The part's parent page's input. | PartEvent | ||
| selection : Array [read-only]
The new selection on a SELECTION_CHANGED event. | PartEvent | ||
| Method | Defined By | ||
|---|---|---|---|
PartEvent(type:String, selection:Array = null, input:PartInput = null, folder:Folder = null, page:Page = null, pageInput:PageInput = null)
Parts are encouraged to use one of the static sendmethods rather than constructing the event manually. | PartEvent | ||
clone():Event [override] | PartEvent | ||
sendBroadcast(part:UIComponent, eventToBroadcast:Event):void [static]
Sends an event to inform Potomac to in turn dispatch the given event on all parts. | PartEvent | ||
sendBusy(part:UIComponent, busyText:String):void [static]
Sends an event to inform Potomac that the part is busy. | PartEvent | ||
sendClean(part:UIComponent):void [static]
Sends an event informing Potomac that the given part is now clean. | PartEvent | ||
sendDirty(part:UIComponent):void [static]
Sends an event informing Potomac that the given part is now dirty. | PartEvent | ||
sendIdle(part:UIComponent):void [static]
Sends an event to inform Potomac that the part is no longer busy. | PartEvent | ||
sendSaveComplete(part:UIComponent):void [static]
Sends an event informing Potomac that the save on the given part was successful. | PartEvent | ||
sendSaveError(part:UIComponent):void [static]
Sends an event informing Potomac that the save on the given part did not complete as it
encountered an error. | PartEvent | ||
sendSelectionChanged(part:UIComponent, newSelection:Array):void [static]
Sends an event informing Potomac that the selection of the given part has changed. | PartEvent | ||
| Constant | Defined By | ||
|---|---|---|---|
| BROADCAST_TO_PARTS : String = partBroadcastToParts [static]
The PartEvent.BROADCAST_TO_PARTS constant defines the value of the
type property of the event object
for a partBroadcastToParts event. | PartEvent | ||
| BUSY : String = partBusy [static]
The PartEvent.BUSY constant defines the value of the
type property of the event object
for a partBusy event. | PartEvent | ||
| CLEAN : String = partClean [static]
The PartEvent.CLEAN constant defines the value of the
type property of the event object
for a partClean event. | PartEvent | ||
| DIRTY : String = partDirty [static]
The PartEvent.DIRTY constant defines the value of the
type property of the event object
for a partDirty event. | PartEvent | ||
| DO_SAVE : String = partDoSave [static]
The PartEvent.DO_SAVE constant defines the value of the
type property of the event object
for a partDoSave event. | PartEvent | ||
| IDLE : String = partIdle [static]
The PartEvent.IDLE constant defines the value of the
type property of the event object
for a partIdle event. | PartEvent | ||
| INITIALIZE : String = partInitialize [static]
The PartEvent.INITIALIZE constant defines the value of the
type property of the event object
for a partInitialize event. | PartEvent | ||
| SAVE_COMPLETE : String = partSaveComplete [static]
The PartEvent.SAVE_COMPLETE constant defines the value of the
type property of the event object
for a partSaveComplete event. | PartEvent | ||
| SAVE_ERROR : String = partSaveError [static]
The PartEvent.SAVE_ERROR constant defines the value of the
type property of the event object
for a partSaveError event. | PartEvent | ||
| SELECTION_CHANGED : String = partSelectionChangeIncoming [static]
The PartEvent.SELECTION_CHANGED constant defines the value of the
type property of the event object
for a partSelectionChangeIncoming event. | PartEvent | ||
| busyText | property |
busyText:StringThe text to be shown on the busy animation.
public function get busyText():String public function set busyText(value:String):void| eventToBroadcast | property |
eventToBroadcast:EventThe event to broadcast for a BROADCAST_TO_PARTS event.
public function get eventToBroadcast():Event public function set eventToBroadcast(value:Event):void| folder | property |
folder:Folder [read-only] The parent folder of the part.
public function get folder():Folder| input | property |
| page | property |
| pageInput | property |
pageInput:PageInput [read-only] The part's parent page's input.
public function get pageInput():PageInput| selection | property |
selection:Array [read-only] The new selection on a SELECTION_CHANGED event.
public function get selection():Array| PartEvent | () | Constructor |
public function PartEvent(type:String, selection:Array = null, input:PartInput = null, folder:Folder = null, page:Page = null, pageInput:PageInput = null)Parts are encouraged to use one of the static sendmethods rather than constructing the event manually.
Parameterstype:String — event type.
| |
selection:Array (default = null) — new selection for a SELECTION_CHANGED event.
| |
input:PartInput (default = null) — input for an INITIALIZE event.
| |
folder:Folder (default = null) — folder for an INITIALIZE event.
| |
page:Page (default = null) — page for an INITIALIZE event.
| |
pageInput:PageInput (default = null) — pageInput for an INITIALIZE event.
|
| clone | () | method |
override public function clone():EventReturnsEvent |
| sendBroadcast | () | method |
public static function sendBroadcast(part:UIComponent, eventToBroadcast:Event):voidSends an event to inform Potomac to in turn dispatch the given event on all parts.
Parameters
part:UIComponent — part doing the broadcasting.
| |
eventToBroadcast:Event — event to broadcast to all parts.
|
| sendBusy | () | method |
public static function sendBusy(part:UIComponent, busyText:String):voidSends an event to inform Potomac that the part is busy. Potomac will disable the part and show an animation with the given text.
Parameters
part:UIComponent — part to mark busy.
| |
busyText:String — text to show in busy animation.
|
| sendClean | () | method |
public static function sendClean(part:UIComponent):voidSends an event informing Potomac that the given part is now clean.
Parameters
part:UIComponent — part to mark clean.
|
| sendDirty | () | method |
public static function sendDirty(part:UIComponent):voidSends an event informing Potomac that the given part is now dirty.
Parameters
part:UIComponent — part to mark dirty.
|
| sendIdle | () | method |
public static function sendIdle(part:UIComponent):voidSends an event to inform Potomac that the part is no longer busy. If the part was busy, it will be re-enabled and the animation will be stopped.
Parameters
part:UIComponent — part to mark idle.
|
| sendSaveComplete | () | method |
public static function sendSaveComplete(part:UIComponent):voidSends an event informing Potomac that the save on the given part was successful.
Parameters
part:UIComponent — part which saved successfully.
|
| sendSaveError | () | method |
public static function sendSaveError(part:UIComponent):voidSends an event informing Potomac that the save on the given part did not complete as it encountered an error. Parts are expected to display the error themselves.
Parameters
part:UIComponent — part for which the save failed.
|
| sendSelectionChanged | () | method |
public static function sendSelectionChanged(part:UIComponent, newSelection:Array):voidSends an event informing Potomac that the selection of the given part has changed. Potomac will then dispatch a SelectionEvent.SELECTION_CHANGED event on all parts.
Parameters
part:UIComponent — part whose selection has changed.
| |
newSelection:Array — the new selection.
|
| BROADCAST_TO_PARTS | Constant |
public static const BROADCAST_TO_PARTS:String = partBroadcastToParts
The PartEvent.BROADCAST_TO_PARTS constant defines the value of the
type property of the event object
for a partBroadcastToParts event.
A broadcast event is a mechanism by which parts can have an event dispatched on all currently open parts. This is a useful inter-part communication mechanism.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | null |
folder | null |
page | null |
pageInput | null |
selection | null |
busyText | null |
eventToBroadcast | The event that will be broadcast to all parts. |
| BUSY | Constant |
public static const BUSY:String = partBusy
The PartEvent.BUSY constant defines the value of the
type property of the event object
for a partBusy event.
Busy events are dispatched by parts to tell Potomac that the part is performing a long running activity, typically awaiting the results of a service call. Potomac will disable the part and show an animation. Parts can affect the text shown during this animation with the busyText property.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | null |
folder | null |
page | null |
pageInput | null |
selection | null |
busyText | The text to be shown on the busy animation. |
eventToBroadcast | null |
| CLEAN | Constant |
public static const CLEAN:String = partClean
The PartEvent.CLEAN constant defines the value of the
type property of the event object
for a partClean event.
Clean events are dispatched by parts to tell Potomac that the part no longer has unsaved changes.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | null |
folder | null |
page | null |
pageInput | null |
selection | null |
busyText | null |
eventToBroadcast | null |
| DIRTY | Constant |
public static const DIRTY:String = partDirty
The PartEvent.DIRTY constant defines the value of the
type property of the event object
for a partDirty event.
Dirty events are dispatched by parts to tell Potomac that the part has unsaved changes.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | null |
folder | null |
page | null |
pageInput | null |
selection | null |
busyText | null |
eventToBroadcast | null |
| DO_SAVE | Constant |
public static const DO_SAVE:String = partDoSave
The PartEvent.DO_SAVE constant defines the value of the
type property of the event object
for a partDoSave event.
Do Save events are dispatched by Potomac to parts when the user has requested the part's data be saved. Parts are expected to initiate (asynchronous) save logic and send back a PartEvent.SAVE_COMPLETE or PartEvent.SAVE_ERROR event.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | null |
folder | null |
page | null |
pageInput | null |
selection | null |
busyText | null |
eventToBroadcast | null |
| IDLE | Constant |
public static const IDLE:String = partIdle
The PartEvent.IDLE constant defines the value of the
type property of the event object
for a partIdle event.
Idle events are dispatched by parts to tell Potomac that the part is no longer performing a long running activity. If the part was busy, the busy animation will be stopped and the part will be re-enabled.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | null |
folder | null |
page | null |
pageInput | null |
selection | null |
busyText | null |
eventToBroadcast | null |
| INITIALIZE | Constant |
public static const INITIALIZE:String = partInitialize
The PartEvent.INITIALIZE constant defines the value of the
type property of the event object
for a partInitialize event.
Initialize events are dispatched on parts to give them a chance to inspect their input and retrieve data.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | The part input or null if no input was given. |
folder | The part's parent folder. |
page | The part's parent page. |
pageInput | The part's parent page's input. |
selection | null |
busyText | null |
eventToBroadcast | null |
| SAVE_COMPLETE | Constant |
public static const SAVE_COMPLETE:String = partSaveComplete
The PartEvent.SAVE_COMPLETE constant defines the value of the
type property of the event object
for a partSaveComplete event.
Save complete events are dispatched by parts to inform Potomac that an asynchronous save was successful.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | null |
folder | null |
page | null |
pageInput | null |
selection | null |
busyText | null |
eventToBroadcast | null |
| SAVE_ERROR | Constant |
public static const SAVE_ERROR:String = partSaveError
The PartEvent.SAVE_ERROR constant defines the value of the
type property of the event object
for a partSaveError event.
Save error events are dispatched by parts to Potomac when asynchronous save logic failed. Parts are expected to show the necessary UI to communicate the error to the user.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | null |
folder | null |
page | null |
pageInput | null |
selection | null |
busyText | null |
eventToBroadcast | null |
| SELECTION_CHANGED | Constant |
public static const SELECTION_CHANGED:String = partSelectionChangeIncoming
The PartEvent.SELECTION_CHANGED constant defines the value of the
type property of the event object
for a partSelectionChangeIncoming event.
Selection changed events are dispatched by parts to inform Potomac that the selection in this part has changed. Potomac will in turn dispatch a SelectionEvent.SELECTION_CHANGED event to all parts.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
input | null |
folder | null |
page | null |
pageInput | null |
selection | An array of objects representing the new selection in the part. |
busyText | null |
eventToBroadcast | null |