public class DataManagerImpl extends DataManager
Modifier and Type | Class and Description |
---|---|
static class |
DataManagerImpl.MyDataContext
Deprecated.
use
DataManager.getDataContext(Component) instead |
CLIENT_PROPERTY_DATA_PROVIDER
Constructor and Description |
---|
DataManagerImpl() |
Modifier and Type | Method and Description |
---|---|
DataContext |
getDataContext() |
DataContext |
getDataContext(java.awt.Component component) |
DataContext |
getDataContext(java.awt.Component component,
int x,
int y) |
Promise<DataContext> |
getDataContextFromFocusAsync() |
DataContext |
getDataContextTest(java.awt.Component component) |
java.lang.Object |
getDataFromProvider(DataProvider provider,
java.lang.String dataId,
java.util.Set<java.lang.String> alreadyComputedIds) |
static DataProvider |
getDataProviderEx(java.lang.Object component) |
GetDataRule |
getDataRule(java.lang.String dataId) |
<T> T |
loadFromDataContext(DataContext dataContext,
Key<T> dataKey) |
<T> void |
saveInDataContext(DataContext dataContext,
Key<T> dataKey,
T data) |
static Editor |
validateEditor(Editor editor) |
getDataContextFromFocus, getDataProvider, getInstance, getInstanceIfCreated, registerDataProvider, removeDataProvider
public java.lang.Object getDataFromProvider(DataProvider provider, java.lang.String dataId, java.util.Set<java.lang.String> alreadyComputedIds)
public static DataProvider getDataProviderEx(java.lang.Object component)
public GetDataRule getDataRule(java.lang.String dataId)
public DataContext getDataContext(java.awt.Component component)
getDataContext
in class DataManager
DataContext
constructed by the specified component
public DataContext getDataContext(java.awt.Component component, int x, int y)
getDataContext
in class DataManager
DataContext
constructed be the specified component
and the point specified by x
and y
coordinate inside the
component.public DataContext getDataContext()
getDataContext
in class DataManager
DataContext
constructed by the currently focused componentpublic Promise<DataContext> getDataContextFromFocusAsync()
getDataContextFromFocusAsync
in class DataManager
DataContext
constructed by the currently focused component.public DataContext getDataContextTest(java.awt.Component component)
public <T> void saveInDataContext(DataContext dataContext, Key<T> dataKey, T data)
saveInDataContext
in class DataManager
dataContext
- should be instance of UserDataHolder
dataKey
- key to store valuedata
- value to storepublic <T> T loadFromDataContext(DataContext dataContext, Key<T> dataKey)
loadFromDataContext
in class DataManager
dataContext
- find by key if instance of UserDataHolder
dataKey
- key to find value byDataManager.saveInDataContext(DataContext, Key, Object)