public class Project extends BaseClass
RPCManager.loadProject()
. A project contains cached screens and DataSources
that can be used to create actual screens by calling createScreen()
or createStartScreen()
.config, configOnly, factoryCreated, factoryProperties, id, scClassName
Constructor and Description |
---|
Project() |
Project(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
com.google.gwt.core.client.JavaScriptObject |
create() |
Canvas |
createScreen(java.lang.String screenName)
Creates a screen from screen definitions cached in the project.
|
Canvas |
createScreen(java.lang.String screenName,
CreateScreenSettings settings)
Creates a screen from screen definitions cached in the project.
|
Canvas |
createScreen(java.lang.String screenName,
java.lang.String[] globals)
|
Canvas |
createStartScreen()
Creates screen from first definition cached in the project.
|
Canvas |
createStartScreen(CreateScreenSettings settings)
Creates screen from first definition cached in the project.
|
Canvas |
createStartScreen(java.lang.String... settings)
Creates screen from first definition cached in the project.
|
void |
destroy()
Releases cached screens and
DataSources associated with this project, and
unregisters it so get() no longer can find it by name. |
static Project |
get(java.lang.String projectName)
Returns a cached project given its name.
|
DataSource |
getDataSource(java.lang.String ID)
Returns an instance of the requested
DataSource by creating it from the project's
cache. |
java.lang.String[] |
getDataSourceNames()
Return the names of the
DataSources cached in this project. |
com.google.gwt.core.client.JavaScriptObject |
getJsObj() |
com.google.gwt.core.client.JavaScriptObject |
getOrCreateJsObj() |
static Project |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.String[] |
getScreenNames()
Return the names of the screens cached in this project.
|
boolean |
isCreated() |
void |
setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj) |
addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName
public Project()
public Project(com.google.gwt.core.client.JavaScriptObject jsObj)
public static Project getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)
setJavaScriptObject
in class BaseClass
public com.google.gwt.core.client.JavaScriptObject create()
public com.google.gwt.core.client.JavaScriptObject getJsObj()
public com.google.gwt.core.client.JavaScriptObject getOrCreateJsObj()
getOrCreateJsObj
in class BaseClass
public Canvas createScreen(java.lang.String screenName)
screenName
- name of screen to createRPCManager.createScreen(java.lang.String)
public Canvas createScreen(java.lang.String screenName, CreateScreenSettings settings)
screenName
- name of screen to createsettings
- widgets to allow to take their global IDs, or a widget remap configRPCManager.createScreen(java.lang.String)
public Canvas createStartScreen()
createScreen(java.lang.String)
,
RPCManager.createScreen(java.lang.String)
public Canvas createStartScreen(CreateScreenSettings settings)
settings
- widgets to allow to take their global IDs, or a widget remap configcreateScreen(java.lang.String)
,
RPCManager.createScreen(java.lang.String)
public Canvas createStartScreen(java.lang.String... settings)
settings
- widgets to allow to take their global IDs, or a widget remap configcreateScreen(java.lang.String)
,
RPCManager.createScreen(java.lang.String)
public void destroy()
DataSources
associated with this project, and
unregisters it so get()
no longer can find it by name. After destroying a
project, it is an error to call any instance method on it.public DataSource getDataSource(java.lang.String ID)
DataSource
by creating it from the project's
cache. If the ID is not globally bound, the framework will globally bind the instance before returning it. Note that when a screen cached in the project is created, all project DataSources in the screen will be automatically instantiated from the project cache, so this method need not be called before creating a screen just to ensure its DataSources are available.
ID
- ID of the DataSource to create.
See Identifier
Identifier
public java.lang.String[] getDataSourceNames()
DataSources
cached in this project.public java.lang.String[] getScreenNames()
createScreen(java.lang.String)
public static Project get(java.lang.String projectName)
projectName
- name of project to retrievepublic Canvas createScreen(java.lang.String screenName, java.lang.String[] globals)
screenName
- name of screen to createglobals
- widgets to allow to take their global IDs, or a widget remap config