public class CallBacksManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<CallBackEntry> |
callbacks
lists of registred callback.
|
protected CallBackFinalizer |
finalizer
optional callbacks finalizer
|
| Constructor and Description |
|---|
CallBacksManager() |
| Modifier and Type | Method and Description |
|---|---|
protected CallBackEntry |
getCallBack(OptionModel option)
Get the first callBack for a given option.
|
protected CallBackEntry |
getCallBack(String name)
Obtain a registred callBack from his name.
|
CallBackMap |
getCallBacks(CategoryModel category,
boolean saved,
boolean modified)
Scan a category and grab per callBack the options.
|
CallBackMap |
getCallBacks(ConfigUIModel model,
boolean saved,
boolean modified)
Scan a model and grab per callBack the options.
|
CallBackMap |
getCallBacksForSaved(CategoryModel category)
Scan a category and grab per callBack the options saved.
|
CallBackMap |
getCallBacksForSaved(ConfigUIModel model)
Scan a model and grab per callBack the options saved.
|
CallBackFinalizer |
getFinalizer()
Obtain the finalizer to use.
|
void |
registerCallBack(String name,
String description,
Icon icon,
Runnable action)
Registers a new callback.
|
void |
registerOption(String name,
OptionModel option)
Registers a option into a known callback.
|
void |
setFinalizer(CallBackFinalizer finalizer)
Sets the finalizer.
|
protected final List<CallBackEntry> callbacks
protected CallBackFinalizer finalizer
public CallBackFinalizer getFinalizer()
null).CallBackFinalizerpublic void setFinalizer(CallBackFinalizer finalizer)
finalizer - the new finalizerCallBackFinalizerpublic void registerCallBack(String name, String description, Icon icon, Runnable action)
name - the unique name of a callbackdescription - the i18n key to describe the actionicon - icon of callBack (used in ui)action - the action of the callbackpublic void registerOption(String name, OptionModel option)
name - the name of the callbackoption - the option to register for the given callbackpublic CallBackMap getCallBacksForSaved(ConfigUIModel model)
model - the model to scanpublic CallBackMap getCallBacksForSaved(CategoryModel category)
category - the category to scanpublic CallBackMap getCallBacks(ConfigUIModel model, boolean saved, boolean modified)
model - the model to scanmodified - true to include modified optionssaved - true to include saved optionspublic CallBackMap getCallBacks(CategoryModel category, boolean saved, boolean modified)
category - the category to scanmodified - true to include modified optionssaved - true to include saved optionsprotected CallBackEntry getCallBack(OptionModel option)
option - the optionprotected CallBackEntry getCallBack(String name)
name - the name of the searched callBacknull if not found).Copyright © 2008–2018 Ultreia.io. All rights reserved.