|
Knopflerfish OSGi 2.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SwingBundleDisplayer
Interface for services wishing to become visible as components in the desktop Swing window.
The desktop window can be extended by new components, displaying bundle details. To extend the desktop, create and register an instance of SwingBundleDisplayer.
In fact, all internal views in the desktop bundle are created by such services.
Additionally, displayers may provide an icon which will be displayed next to the name/description.
The bundle selection is described by an BundleSelectionModel, and displayer should be prepared to display different content depending on which bundles are selected. To modify the selection (and thus update all other registered displayers), use the setSelection and clearSelection methods in the BundleSelectionModel
Field Summary | |
---|---|
static java.lang.String |
PROP_DESCRIPTION
Service Property (String) |
static java.lang.String |
PROP_ISDETAIL
Service Property (Boolean) |
static java.lang.String |
PROP_NAME
Service Property (String) |
Method Summary | |
---|---|
javax.swing.JComponent |
createJComponent()
Create the actual component that should be displayed. |
void |
disposeJComponent(javax.swing.JComponent comp)
Perform any necessary cleanup operations. |
javax.swing.Icon |
getLargeIcon()
Get a large icon (48x48) for the displayer. |
javax.swing.Icon |
getSmallIcon()
Get a smaller icon (22x22) for the displayer. |
void |
setBundleSelectionModel(BundleSelectionModel model)
|
void |
setTargetBundleContext(BundleContext bc)
Allow access to another bundle context than the displayer's own. |
void |
showBundle(Bundle b)
Attempt to show the specified bundle. |
Field Detail |
---|
static final java.lang.String PROP_NAME
Value is org.knopflerfish.service.desktop.displayer.name
static final java.lang.String PROP_DESCRIPTION
Value is org.knopflerfish.service.desktop.displayer.description
static final java.lang.String PROP_ISDETAIL
Value is org.knopflerfish.service.desktop.displayer.isdetail
Method Detail |
---|
javax.swing.JComponent createJComponent()
New components must be created for each createJComponent call.
void disposeJComponent(javax.swing.JComponent comp)
comp
- Component previously created by createJComponentvoid setBundleSelectionModel(BundleSelectionModel model)
model
- Selection model describing which bundles are
selected. The actual bundle list must be managed
by the displayer itself.javax.swing.Icon getLargeIcon()
null can be returned if no icon is provided.
javax.swing.Icon getSmallIcon()
null can be returned if no icon is provided.
void setTargetBundleContext(BundleContext bc)
This method might never be called - the displayer should in that case use its own context. The normal case is to start with the displayer's own context and later switch to another context.
If
void showBundle(Bundle b)
|
Knopflerfish OSGi 2.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |