public class UIContextDelegate extends Object implements UIContext
Modifier | Constructor and Description |
---|---|
protected |
UIContextDelegate(UIContext backing)
Creates a UIContextDelegate.
|
Modifier and Type | Method and Description |
---|---|
void |
clearRequestScratchMap()
Reserved for internal framework use.
|
void |
clearRequestScratchMap(WComponent component)
Reserved for internal framework use.
|
void |
clearScratchMap()
Reserved for internal framework use.
|
void |
clearScratchMap(WComponent component)
Reserved for internal framework use.
|
void |
doInvokeLaters()
Runs the runnables that were added using
UIContext.invokeLater(Runnable) . |
UIContext |
getBacking() |
Set |
getComponents() |
long |
getCreationTime()
Returns the creation time of this UIContext, which can be used to approximate the user session creation time.
|
Environment |
getEnvironment()
If we've got an environment, return it.
|
WComponent |
getFocussed() |
String |
getFocussedId() |
Object |
getFwkAttribute(String name)
Reserved for internal framework use.
|
Set |
getFwkAttributeNames()
Reserved for internal framework use.
|
Headers |
getHeaders() |
Locale |
getLocale()
Retrieves the locale for this context.
|
WebModel |
getModel(WebComponent component)
Get the extrinsic state information for the given component.
|
static UIContext |
getPrimaryUIContext(UIContext uic)
Deprecated.
|
Map<Object,Object> |
getRequestScratchMap(WComponent component)
Reserved for internal framework use.
|
Map |
getScratchMap(WComponent component)
Reserved for internal framework use.
|
WComponent |
getUI() |
void |
invokeLater(Runnable runnable)
Adds a runnable to the list of runnables to be invoked later.
|
void |
invokeLater(UIContext uic,
Runnable runnable)
Adds a runnable to the list of runnables to be invoked later against the given UIContext.
|
boolean |
isDummyEnvironment() |
boolean |
isFocusRequired()
Indicates whether a component needs to be given focus.
|
void |
removeFwkAttribute(String name)
Reserved for internal framework use.
|
void |
removeModel(WebComponent component)
Removes the extrinsic state information for the given component.
|
protected void |
setBacking(UIContext backing)
Sets the backing context.
|
void |
setEnvironment(Environment environment)
Explicitly sets the environment.
|
void |
setFocusRequired(boolean b)
Sets whether a component needs to be given focus.
|
void |
setFocussed(WComponent component)
Sets the component in this UIC which is to be the focus of the client browser cursor.
|
void |
setFocussed(WComponent component,
UIContext uic)
Sets the component in this UIC which is to be the focus of the client browser cursor.
|
void |
setFwkAttribute(String name,
Object value)
Reserved for internal framework use.
|
void |
setLocale(Locale locale)
Sets the locale for this context.
|
void |
setModel(WebComponent component,
WebModel model)
Stores the extrinsic state information for the given component.
|
void |
setUI(WComponent ui)
For use by internal framework code only.
|
protected UIContextDelegate(UIContext backing)
backing
- the backing context.protected void setBacking(UIContext backing)
backing
- the backing context.public void clearScratchMap()
clearScratchMap
in interface UIContext
public void clearScratchMap(WComponent component)
clearScratchMap
in interface UIContext
component
- the component to clear the scratch map for.public void doInvokeLaters()
UIContext.invokeLater(Runnable)
.doInvokeLaters
in interface UIContext
public Set getComponents()
getComponents
in interface UIContext
public long getCreationTime()
getCreationTime
in interface UIContext
public Environment getEnvironment()
getEnvironment
in interface UIContext
public WComponent getFocussed()
getFocussed
in interface UIContext
public String getFocussedId()
getFocussedId
in interface UIContext
public Object getFwkAttribute(String name)
getFwkAttribute
in interface UIContext
name
- the attribute name.public Set getFwkAttributeNames()
getFwkAttributeNames
in interface UIContext
public Headers getHeaders()
getHeaders
in interface UIContext
public WebModel getModel(WebComponent component)
public Map getScratchMap(WComponent component)
getScratchMap
in interface UIContext
component
- the component to retrieve the scratch map for.public WComponent getUI()
public void invokeLater(Runnable runnable)
invokeLater
in interface UIContext
runnable
- the runnable to addpublic void invokeLater(UIContext uic, Runnable runnable)
invokeLater
in interface UIContext
uic
- the context to run the runnable in.runnable
- the runnable to addpublic boolean isDummyEnvironment()
isDummyEnvironment
in interface UIContext
public boolean isFocusRequired()
isFocusRequired
in interface UIContext
UIContext.setFocussed(WComponent, UIContext)
public void removeFwkAttribute(String name)
removeFwkAttribute
in interface UIContext
name
- the attribute name.public void removeModel(WebComponent component)
removeModel
in interface UIContext
component
- the component to remove the model for.public void setEnvironment(Environment environment)
setEnvironment
in interface UIContext
environment
- the environment to set.public void setFocusRequired(boolean b)
setFocusRequired
in interface UIContext
b
- true if focus is required, false otherwise.UIContext.setFocussed(WComponent, UIContext)
public void setFocussed(WComponent component, UIContext uic)
setFocussed
in interface UIContext
component
- - the component that sould be the cursor focus in the rendered UI.uic
- - the context that the component exists in.public void setFocussed(WComponent component)
setFocussed
in interface UIContext
component
- the component that sould be the cursor focus in the rendered UI.public void setFwkAttribute(String name, Object value)
setFwkAttribute
in interface UIContext
name
- the attribute name.value
- the attribute value.public void setModel(WebComponent component, WebModel model)
public void setUI(WComponent ui)
public Locale getLocale()
public void setLocale(Locale locale)
public UIContext getBacking()
public Map<Object,Object> getRequestScratchMap(WComponent component)
getRequestScratchMap
in interface UIContext
component
- the component to retrieve the scratch map for.public void clearRequestScratchMap(WComponent component)
clearRequestScratchMap
in interface UIContext
component
- the component to clear the scratch map for.public void clearRequestScratchMap()
clearRequestScratchMap
in interface UIContext
@Deprecated public static UIContext getPrimaryUIContext(UIContext uic)
UIContextHolder.getPrimaryUIContext(com.github.bordertech.wcomponents.UIContext)
instead.uic
- the UIContext to retrieve the primary context for.Copyright © 2021. All rights reserved.