Packageorg.samchon.protocol.movie
Classpublic class Window
InheritanceWindow Inheritance spark.components.Application
Implements IProtocol

Window is an Application, the top class in Flex-UI.

The Window is separated to three part, TopMenu, Movie and ServerConnector.

The Window and its UI-layout is not fixed, essential component for Samchon Framework in Flex, so it's okay to do not use the provided Window and make your custom Window. But the custom Window, your own, has to contain the Movie and keep the construction routine.

Default MXML PropertymxmlContentFactory

See also

Movie
SubMovie
TitleWindow
ServerConnector


Protected Properties
 PropertyDefined By
  creationFlag : Boolean
Whether the creation was completed or not.
Window
  movie : Movie
A movie contained in the Window.
Window
  movieName : String
[read-only] Default is url.html?movie={SERVICE}.
Window
  socket : ServerConnector
A socket for connecting to the Server.
Window
  titleWindow : TitleWindow
A TitleWindow created in the Window.
Window
  topMenu : TopMenu
A TopMenu in the Window.
Window
  vGroup : VGroup
A VGroup containing TopMenu and Movie filling Window.
Window
Public Methods
 MethodDefined By
  
Default Constructor.
Window
  
createMovie(name:String):Movie
Create a Movie by the name in URLVariables.
Window
  
createPopUp($class:Class):TitleWindow
Create a Pop-up; TitleWindow.
Window
  
Factory method for TopMenu.
Window
  
doLogout():void
Log-out was requested in Server by another Window.
Window
  
Get Movie.
Window
  
Get TopMenu.
Window
  
goClose():void
Close this window.
Window
  
goExport(extension:String):void
Save principle Entity(s) in Movie.
Window
  
goLogout():void
Request log-out to Server and navigate to the log-in page.
Window
  
Capture current Window's image and save it.
Window
  
goWindow(movie:String):void
Navigate this browser to another Window.
Window
  
replyData(invoke:Invoke):void
Handles authority, error and logout.
Window
  
sendData(invoke:Invoke):void
Window
Protected Methods
 MethodDefined By
  
Window
  
Window
  
Window
  
creationCompleted(event:FlexEvent):void
Handler of Creation Complete.
Window
  
Request the minimum authority for the Service.
Window
  
goConnect(ip:String, port:int):void
Connect to the C++ cloud server.
Window
  
Fetch Server's ip and port from external configuration file.
Window
  
handleAuthority(level:int, flag:Boolean):void
Window
  
handleConnect(event:Event):void
Window
  
handleServerInfo(event:Event):void
Window
  
replyError(message:String):void
Handling error message from Server.
Window
Property Detail
creationFlagproperty
protected var creationFlag:Boolean

Whether the creation was completed or not.

movieproperty 
protected var movie:Movie

A movie contained in the Window.

movieNameproperty 
movieName:String  [read-only]

Default is url.html?movie={SERVICE}.

If you want to test Window by fixing Movie, override this method.


Implementation
    protected function get movieName():String
socketproperty 
protected var socket:ServerConnector

A socket for connecting to the Server.

titleWindowproperty 
protected var titleWindow:TitleWindow

A TitleWindow created in the Window.

The default value is null.

topMenuproperty 
protected var topMenu:TopMenu

A TopMenu in the Window.

vGroupproperty 
protected var vGroup:VGroup

A VGroup containing TopMenu and Movie filling Window.

Constructor Detail
Window()Constructor
public function Window()

Default Constructor.

Method Detail
constructMovie()method
protected function constructMovie():void

constructTopMenu()method 
protected function constructTopMenu():void

constructVGroup()method 
protected function constructVGroup():void

createMovie()method 
public function createMovie(name:String):Movie

Create a Movie by the name in URLVariables.

Override this method to return a new Movie matched in the name.

Parameters

name:String — Movie name in URLVariables; url.html?movie={name}

Returns
Movie — Matched Movie about the name

See also

createPopUp()method 
public function createPopUp($class:Class):TitleWindow

Create a Pop-up; TitleWindow.

Parameters

$class:Class — Target TitleWindow class wants to create that is dervied from TitleWindow

Returns
TitleWindow — The TitleWindow to be made
createTopMenu()method 
public function createTopMenu():TopMenu

Factory method for TopMenu.

If returns null, then TopMenu will not be constructed.

Returns
TopMenu
creationCompleted()method 
protected function creationCompleted(event:FlexEvent):void

Handler of Creation Complete.

Starts the construction routine. If you want to do something more, override this method.

Parameters

event:FlexEvent

doLogout()method 
public function doLogout():void

Log-out was requested in Server by another Window.

This window will be closed.

getMovie()method 
public function getMovie():Movie

Get Movie.

Returns
Movie
getTopMenu()method 
public function getTopMenu():TopMenu

Get TopMenu.

Returns
TopMenu
goAuthority()method 
protected function goAuthority():void

Request the minimum authority for the Service.

goClose()method 
public function goClose():void

Close this window.

goConnect()method 
protected function goConnect(ip:String, port:int):void

Connect to the C++ cloud server.

Parameters

ip:String — An ip address of the C++ cloud server.
 
port:int — A port number of the C++ cloud server.

goExport()method 
public function goExport(extension:String):void

Save principle Entity(s) in Movie.

The default is to saving as HTML format.

Parameters

extension:String

goLogout()method 
public function goLogout():void

Request log-out to Server and navigate to the log-in page.

When the request was delivered, then doLogout will be called in another Window(s).

By the doLogout() method, all another windows, except this window, will be closed.

goScreenshot()method 
public function goScreenshot():void

Capture current Window's image and save it.

goServerInfo()method 
protected function goServerInfo():void

Fetch Server's ip and port from external configuration file.

goWindow()method 
public function goWindow(movie:String):void

Navigate this browser to another Window.

Parameters

movie:String — If default, make a new Window having same Movie

handleAuthority()method 
protected function handleAuthority(level:int, flag:Boolean):void

Parameters

level:int
 
flag:Boolean

handleConnect()method 
protected function handleConnect(event:Event):void

Parameters

event:Event

handleServerInfo()method 
protected function handleServerInfo(event:Event):void

Parameters

event:Event

replyData()method 
public function replyData(invoke:Invoke):void

Handles authority, error and logout. The others will be shift to the chain.

Send a message.

Sends Invoke message to a network system or shifts the responsibility to related chain.

Parameters

invoke:Invoke — An Invoke message to send to a network system.

replyError()method 
protected function replyError(message:String):void

Handling error message from Server. The default is to showing an alert message.

Parameters

message:String — The error message from Server. Those're almost occured by thrown exception

sendData()method 
public function sendData(invoke:Invoke):void

Parameters

invoke:Invoke