Knopflerfish OSGi 2.4.0

org.knopflerfish.service.desktop
Interface BundleSelectionModel

All Known Implementing Classes:
DefaultBundleSelectionModel

public interface BundleSelectionModel

Model describing which bundles are selected.

See Also:
SwingBundleDisplayer


Method Summary
 void addBundleSelectionListener(BundleSelectionListener l)
          Add a BundleSelectionListener to the set of listeners that gets notified at bundle selection changes.
 void clearSelection()
          Clear the entire selection and notify all listeners.
 long getSelected()
          Get selected bundle.
 int getSelectionCount()
          Get the number of selected bundles.
 boolean isSelected(long bid)
          Get selection status of a bundle Id.
 void removeBundleSelectionListener(BundleSelectionListener l)
          Remove a BundleSelectionListener from the set of listeners that gets notified at bundle selection changes.
 void setSelected(long bid, boolean bSelected)
          Set selection status of a bundle id and notify all listeners.
 

Method Detail

clearSelection

void clearSelection()
Clear the entire selection and notify all listeners.


getSelectionCount

int getSelectionCount()
Get the number of selected bundles.

Returns:
Number of selected bundles.

getSelected

long getSelected()
Get selected bundle. Return the bundle id of one of the selected bundles.

Returns:
The bundle ID of one of the selected bundles (arbitrary). If no selection this method returns -1.

isSelected

boolean isSelected(long bid)
Get selection status of a bundle Id.

Parameters:
bid - Bundle Id to check.
Returns:
true if bid is selected by the model, false otherwise.

setSelected

void setSelected(long bid,
                 boolean bSelected)
Set selection status of a bundle id and notify all listeners.

Parameters:
bid - Bundle Id to set selection status.
bSelected - new selection status of the bundle.

addBundleSelectionListener

void addBundleSelectionListener(BundleSelectionListener l)
Add a BundleSelectionListener to the set of listeners that gets notified at bundle selection changes.

Parameters:
l - listener to add.

removeBundleSelectionListener

void removeBundleSelectionListener(BundleSelectionListener l)
Remove a BundleSelectionListener from the set of listeners that gets notified at bundle selection changes.

Parameters:
l - listener to remove.

Knopflerfish OSGi 2.4.0