|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.e4.xwt.XWT
public class XWT
XWT is the main class of the XWT framework. It provides most of the services in API.
Constructor Summary | |
---|---|
XWT()
|
Method Summary | |
---|---|
static void |
addTracking(Tracking tracking)
Add a tracking option |
static java.lang.Object |
convertFrom(java.lang.Class<?> targetType,
java.lang.String string)
Data conversion service from String to a given type |
static java.lang.Object |
convertFrom(IMetaclass type,
java.lang.String string)
Data conversion service from String to a given type |
static org.eclipse.swt.widgets.Composite |
findCompositeParent(org.eclipse.swt.widgets.Widget context)
Find the closet parent of type Composite |
static org.eclipse.core.databinding.conversion.IConverter |
findConvertor(java.lang.Class<?> source,
java.lang.Class<?> target)
Find a Data converter |
static java.lang.Object |
findElementByName(org.eclipse.swt.widgets.Widget context,
java.lang.String name)
Find a named UI element. |
static ILoadingContext |
findLoadingContext(java.lang.Object container)
|
static org.eclipse.e4.xwt.impl.NameContext |
findNameContext(org.eclipse.swt.widgets.Widget widget)
A NameContext is a manager of UI element's name in a scope. |
static org.eclipse.swt.widgets.Shell |
findShell(org.eclipse.swt.widgets.Widget context)
Find the root shell |
static IMetaclass[] |
getAllMetaclasses()
Metaclass services to return all registered Metaclasses. |
static java.lang.Object |
getCLR(org.eclipse.swt.widgets.Widget widget)
Get the CLR (Common Language Runtime) object. |
static ICommand |
getCommand(java.lang.String name)
Find a command by name |
static java.util.Map<java.lang.String,ICommand> |
getCommands()
Return all registered commands |
static org.eclipse.e4.xwt.XWT.ConverterService |
getConverterService()
|
static java.lang.Object |
getDataContext(org.eclipse.swt.widgets.Widget element)
Get the DataContext of given element |
static ILoadingContext |
getLoadingContext()
|
static ILoadingContext |
getLoadingContext(org.eclipse.swt.widgets.Composite object)
|
static ILogger |
getLogger()
Get the system logger. |
static IMetaclass |
getMetaclass(java.lang.Object object)
Get the Metaclass of the given object |
static IMetaclass |
getMetaclass(java.lang.String tagName,
java.lang.String ns)
Get the corresponding Metaclass |
static java.lang.String |
getNamespace(java.lang.Class<?> javaclass)
This namespace service returns the associated or declared namespace for a given class. |
static java.util.Set<Tracking> |
getTrackings()
Get all tracking options |
static boolean |
IsInitialized()
Check if the framework is initialized. |
static boolean |
isTracking(Tracking tracking)
Test if the tracking on argument is enabled. |
static org.eclipse.swt.widgets.Control |
load(org.eclipse.swt.widgets.Composite parent,
java.io.InputStream stream,
java.net.URL file,
int styles,
java.lang.Object dataContext)
load the content from a stream with a style and a DataContext. |
static org.eclipse.swt.widgets.Control |
load(org.eclipse.swt.widgets.Composite parent,
java.io.InputStream stream,
java.net.URL file,
int styles,
java.lang.Object dataContext,
ResourceDictionary dictionary)
load the content from a stream with a style, a DataContext and a ResourceDictionary. |
static org.eclipse.swt.widgets.Control |
load(org.eclipse.swt.widgets.Composite parent,
java.io.InputStream stream,
java.net.URL file,
java.lang.Object dataContext)
load the content from a stream with a given DataContext. |
static org.eclipse.swt.widgets.Control |
load(org.eclipse.swt.widgets.Composite parent,
java.net.URL file)
Load the file content under a Composite. |
static org.eclipse.swt.widgets.Control |
load(org.eclipse.swt.widgets.Composite parent,
java.net.URL file,
int styles,
java.lang.Object dataContext)
Load the file content under a Composite with a style and a DataContext. |
static org.eclipse.swt.widgets.Control |
load(org.eclipse.swt.widgets.Composite parent,
java.net.URL file,
int styles,
java.lang.Object dataContext,
ResourceDictionary dictionary)
Load the file content under a Composite with a style, a DataContext and a ResourceDictionary. |
static org.eclipse.swt.widgets.Control |
load(org.eclipse.swt.widgets.Composite parent,
java.net.URL file,
java.lang.Object dataContext)
Load the file content under a Composite with a DataContext. |
static org.eclipse.swt.widgets.Control |
load(java.io.InputStream stream,
java.net.URL file)
load the file content. |
static org.eclipse.swt.widgets.Control |
load(java.io.InputStream stream,
java.net.URL url,
ILoadData loadData)
Generic load method |
static org.eclipse.swt.widgets.Control |
load(java.net.URL file)
Load the file content. |
static org.eclipse.swt.widgets.Control |
load(java.net.URL file,
int styles,
java.lang.Object dataContext)
Load the file content with a DataContext. |
static org.eclipse.swt.widgets.Control |
load(java.net.URL file,
int styles,
java.lang.Object dataContext,
ResourceDictionary dictionary)
Load the file content with a DataContext and a ResourceDictionary. |
static org.eclipse.swt.widgets.Control |
load(java.net.URL file,
java.lang.Object dataContext)
Load the file content with a DataContext. |
static void |
open(java.net.URL url)
Open and show the file content in a new Shell. |
static void |
open(java.net.URL url,
java.lang.Object dataContext)
load the file content. |
static void |
open(java.net.URL url,
java.lang.Object dataContext,
ResourceDictionary dictionary)
load the file content. |
static IMetaclass |
register(java.lang.Class<?> javaclass,
java.lang.String namespace)
Register UI type |
static void |
registerCommand(java.lang.String name,
ICommand command)
Register a command to a name |
static void |
registerConvertor(org.eclipse.core.databinding.conversion.IConverter converter)
Register a Data converter |
static IMetaclass |
registerMetaclass(java.lang.Class type)
Register UI type |
static void |
registerMetaclassFactory(IMetaclassFactory metaclassFactory)
Register Metaclass factory |
static void |
removeTracking(Tracking tracking)
Remove a tracking option. |
static void |
setDataContext(org.eclipse.swt.widgets.Widget widget,
java.lang.Object dataContext)
Change the DataContext of given element |
static void |
setLoadingContext(ILoadingContext loadingContext)
|
static void |
setLogger(ILogger logger)
Change the system logger |
static void |
unregisterCommand(java.lang.String name)
Unregister a command |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XWT()
Method Detail |
---|
public static ILogger getLogger()
public static void setLogger(ILogger logger)
logger
- public static boolean IsInitialized()
public static java.lang.String getNamespace(java.lang.Class<?> javaclass)
javaclass
-
public static org.eclipse.e4.xwt.impl.NameContext findNameContext(org.eclipse.swt.widgets.Widget widget)
widget
-
public static java.lang.Object findElementByName(org.eclipse.swt.widgets.Widget context, java.lang.String name)
context
- the start point of research.name
-
public static java.lang.Object getDataContext(org.eclipse.swt.widgets.Widget element)
context
-
public static void setDataContext(org.eclipse.swt.widgets.Widget widget, java.lang.Object dataContext)
context
- public static java.lang.Object getCLR(org.eclipse.swt.widgets.Widget widget)
widget
-
public static org.eclipse.swt.widgets.Shell findShell(org.eclipse.swt.widgets.Widget context)
context
-
public static org.eclipse.swt.widgets.Composite findCompositeParent(org.eclipse.swt.widgets.Widget context)
context
-
public static IMetaclass getMetaclass(java.lang.Object object)
context
-
public static org.eclipse.swt.widgets.Control load(java.net.URL file) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(java.net.URL file, int styles, java.lang.Object dataContext) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(java.net.URL file, int styles, java.lang.Object dataContext, ResourceDictionary dictionary) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(java.net.URL file, java.lang.Object dataContext) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(org.eclipse.swt.widgets.Composite parent, java.net.URL file) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(org.eclipse.swt.widgets.Composite parent, java.net.URL file, java.lang.Object dataContext) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(org.eclipse.swt.widgets.Composite parent, java.net.URL file, int styles, java.lang.Object dataContext) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(org.eclipse.swt.widgets.Composite parent, java.net.URL file, int styles, java.lang.Object dataContext, ResourceDictionary dictionary) throws java.lang.Exception
java.lang.Exception
public static void open(java.net.URL url) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(java.io.InputStream stream, java.net.URL file) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(org.eclipse.swt.widgets.Composite parent, java.io.InputStream stream, java.net.URL file, java.lang.Object dataContext) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(org.eclipse.swt.widgets.Composite parent, java.io.InputStream stream, java.net.URL file, int styles, java.lang.Object dataContext) throws java.lang.Exception
java.lang.Exception
public static org.eclipse.swt.widgets.Control load(org.eclipse.swt.widgets.Composite parent, java.io.InputStream stream, java.net.URL file, int styles, java.lang.Object dataContext, ResourceDictionary dictionary) throws java.lang.Exception
java.lang.Exception
public static void open(java.net.URL url, java.lang.Object dataContext) throws java.lang.Exception
java.lang.Exception
public static void open(java.net.URL url, java.lang.Object dataContext, ResourceDictionary dictionary) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object convertFrom(IMetaclass type, java.lang.String string)
type
- string
-
public static java.lang.Object convertFrom(java.lang.Class<?> targetType, java.lang.String string)
targetType
- string
-
public static org.eclipse.swt.widgets.Control load(java.io.InputStream stream, java.net.URL url, ILoadData loadData) throws java.lang.Exception
stream
- url
- loadData
-
java.lang.Exception
public static IMetaclass[] getAllMetaclasses()
stream
- url
- loadData
-
java.lang.Exception
public static IMetaclass getMetaclass(java.lang.String tagName, java.lang.String ns)
tagName
- ns
- The namespace
public static IMetaclass registerMetaclass(java.lang.Class type)
javaclass
- public static void registerMetaclassFactory(IMetaclassFactory metaclassFactory)
javaclass
- public static IMetaclass register(java.lang.Class<?> javaclass, java.lang.String namespace)
javaclass
- public static org.eclipse.e4.xwt.XWT.ConverterService getConverterService()
public static org.eclipse.core.databinding.conversion.IConverter findConvertor(java.lang.Class<?> source, java.lang.Class<?> target)
converter
- type
- public static void registerConvertor(org.eclipse.core.databinding.conversion.IConverter converter)
converter
- type
- public static ILoadingContext findLoadingContext(java.lang.Object container)
public static ILoadingContext getLoadingContext(org.eclipse.swt.widgets.Composite object)
public static ILoadingContext getLoadingContext()
public static void setLoadingContext(ILoadingContext loadingContext)
public static void addTracking(Tracking tracking)
tracking
- public static boolean isTracking(Tracking tracking)
tracking
-
public static java.util.Set<Tracking> getTrackings()
public static void removeTracking(Tracking tracking)
tracking
- public static void registerCommand(java.lang.String name, ICommand command)
name
- command
- public static ICommand getCommand(java.lang.String name)
name
-
public static java.util.Map<java.lang.String,ICommand> getCommands()
public static void unregisterCommand(java.lang.String name)
name
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |