Package | org.samchon.protocol.movie |
Class | public class Window |
Inheritance | Window ![]() |
Implements | IProtocol |
Window is an Application, the top class in Flex-UI.
The Window is separated to three part, TopMenu, Movie and ServerConnector.
TopMenu
: Menu on the top. It's not an essential component. Movie
: Correspond with Service in Server. Movie has domain UI components(Movie) for the matched Service. ServerConnector
: The socket connecting to the Server. 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
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
Window()
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 | ||
goScreenshot():void
Capture current Window's image and save it. | Window | ||
goWindow(movie:String):void
Navigate this browser to another Window. | Window | ||
Handles authority, error and logout. | Window | ||
Window |
Method | Defined By | ||
---|---|---|---|
constructMovie():void | Window | ||
constructTopMenu():void | Window | ||
constructVGroup():void | Window | ||
creationCompleted(event:FlexEvent):void
Handler of Creation Complete. | Window | ||
goAuthority():void
Request the minimum authority for the Service. | Window | ||
goConnect(ip:String, port:int):void
Connect to the C++ cloud server. | Window | ||
goServerInfo():void
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 |
creationFlag | property |
protected var creationFlag:Boolean
Whether the creation was completed or not.
movie | property |
movieName | property |
movieName:String
[read-only]
Default is url.html?movie={SERVICE
}.
If you want to test Window
by fixing Movie
, override this method.
protected function get movieName():String
socket | property |
titleWindow | property |
protected var titleWindow:TitleWindow
A TitleWindow created in the Window.
The default value is null
.
topMenu | property |
vGroup | property |
protected var vGroup:VGroup
A VGroup containing TopMenu and Movie filling Window.
Window | () | Constructor |
public function Window()
Default Constructor.
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}
|
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
|
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.
ReturnsTopMenu |
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 |
getTopMenu | () | method |
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 |