public class BasicAddOnPresenter extends Object implements AddOnPresenter
Constructor and Description |
---|
BasicAddOnPresenter() |
Modifier and Type | Method and Description |
---|---|
void |
activateAddOn(Class<? extends JComponent> addOnComponentClass,
ViewComponent context)
Activate an existing add-on component of the given class within the context of the given view
component.
|
void |
deactivateAddOn(Class<? extends JComponent> addOnComponentClass,
ViewComponent context)
Deactivate an existing add-on component of the given class within the context of the given view
component.
|
void |
disposeAddOn(Class<? extends JComponent> addOnComponentClass,
ViewComponent context)
Deactivate and dispose an existing add-on component of the given class within the context of
the given view component.
|
<T extends JComponent> |
getAddOn(Class<T> addOnComponentClass,
ViewComponent context)
Return the add-on component of the given class within the context of the given view component.
|
HashMap<ViewComponent,List<JComponent>> |
getAddOns()
Return a map of currently managed add-ons, indexed by context.
|
boolean |
isAddOnActive(Class<? extends JComponent> addOnComponentClass,
ViewComponent context)
Determine whether there is a registered and active (visible) add-on component of the given
class within the context of the given view component.
|
boolean |
isAddOnRegistered(Class<? extends JComponent> addOnComponentClass,
ViewComponent context)
Determine whether there is a registered (displayable) add-on component of the given class
within the context of the given view component.
|
void |
manageAddOn(JComponent addOn,
ViewComponent context)
Register an add-on component of the given class within the context of the given view component.
|
public boolean isAddOnRegistered(Class<? extends JComponent> addOnComponentClass, ViewComponent context)
AddOnPresenter
isAddOnRegistered
in interface AddOnPresenter
addOnComponentClass
- the add-on classcontext
- the view componenttrue
if there is a matching add-on, false
otherwisepublic boolean isAddOnActive(Class<? extends JComponent> addOnComponentClass, ViewComponent context)
AddOnPresenter
isAddOnActive
in interface AddOnPresenter
addOnComponentClass
- the add-on classcontext
- the view componenttrue
if there is a matching add-on, false
otherwisepublic <T extends JComponent> T getAddOn(Class<T> addOnComponentClass, ViewComponent context)
AddOnPresenter
null
if there is no such add-on component.getAddOn
in interface AddOnPresenter
T
- the type of add-onaddOnComponentClass
- the add-on classcontext
- the view componentnull
public void activateAddOn(Class<? extends JComponent> addOnComponentClass, ViewComponent context)
AddOnPresenter
activateAddOn
in interface AddOnPresenter
addOnComponentClass
- the add-on classcontext
- the view componentpublic void deactivateAddOn(Class<? extends JComponent> addOnComponentClass, ViewComponent context)
AddOnPresenter
deactivateAddOn
in interface AddOnPresenter
addOnComponentClass
- the add-on classcontext
- the view componentpublic void manageAddOn(JComponent addOn, ViewComponent context)
AddOnPresenter
manageAddOn
in interface AddOnPresenter
addOn
- the add-on classcontext
- the view componentpublic void disposeAddOn(Class<? extends JComponent> addOnComponentClass, ViewComponent context)
AddOnPresenter
disposeAddOn
in interface AddOnPresenter
addOnComponentClass
- the add-on classcontext
- the view componentpublic HashMap<ViewComponent,List<JComponent>> getAddOns()
AddOnPresenter
getAddOns
in interface AddOnPresenter
Copyright © 2024 levigo holding gmbh. All rights reserved.