PTP
Release 7.0

org.eclipse.ptp.services.ui.widgets
Class ServiceConfigurationSelectionWidget

java.lang.Object
  extended by Composite
      extended by org.eclipse.ptp.services.ui.widgets.ServiceConfigurationSelectionWidget

public class ServiceConfigurationSelectionWidget
extends Composite

Standard widget for selecting a service configuration. Displays a table view of service configurations so that the user can easily see what services and providers are available in the configuration. Provides "Add...", "Remove", and "Rename" buttons to allow the creation, removal and renaming of service configurations. These buttons can be enabled/disabled by using the buttons constructor parameter. The excluded constructor parameter can be used to supply a list of configurations to be exclude from the list. The whole control can be enabled/disabled using the setEnabled method.


Constructor Summary
ServiceConfigurationSelectionWidget(Composite parent, int style)
           
ServiceConfigurationSelectionWidget(Composite parent, int style, java.util.Set<IServiceConfiguration> excluded, java.util.Set<IService> services, boolean enableButtons)
           
 
Method Summary
 void addSelectionChangedListener(ISelectionChangedListener listener)
           
 IServiceConfiguration[] getCheckedServiceConfigurations()
          Gets the elements that have been checked in the viewer
 boolean getEnabled()
           
 IServiceConfiguration getSelectedConfiguration()
          Return the service configuration selected by the user
 ISelection getSelection()
           
 void removeSelectionChangedListener(ISelectionChangedListener listener)
           
 void setAllChecked(boolean state)
          Sets all elements in the viewer to the given checked state.
 void setConfigurations(IServiceConfiguration[] configurations)
          Set the service configurations to display in the viewer.
 void setEnabled(boolean enabled)
           
 void setSelection(ISelection selection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceConfigurationSelectionWidget

public ServiceConfigurationSelectionWidget(Composite parent,
                                           int style)

ServiceConfigurationSelectionWidget

public ServiceConfigurationSelectionWidget(Composite parent,
                                           int style,
                                           java.util.Set<IServiceConfiguration> excluded,
                                           java.util.Set<IService> services,
                                           boolean enableButtons)
Method Detail

addSelectionChangedListener

public void addSelectionChangedListener(ISelectionChangedListener listener)

getCheckedServiceConfigurations

public IServiceConfiguration[] getCheckedServiceConfigurations()
Gets the elements that have been checked in the viewer

Returns:
array containing the elements that are checked

getEnabled

public boolean getEnabled()

getSelectedConfiguration

public IServiceConfiguration getSelectedConfiguration()
Return the service configuration selected by the user

Returns:
Selected service configuration

getSelection

public ISelection getSelection()

removeSelectionChangedListener

public void removeSelectionChangedListener(ISelectionChangedListener listener)

setAllChecked

public void setAllChecked(boolean state)
Sets all elements in the viewer to the given checked state.

Parameters:
state -

setConfigurations

public void setConfigurations(IServiceConfiguration[] configurations)
Set the service configurations to display in the viewer. Passing null will display all known configurations (default).

Parameters:
configurations - configurations to display, or null to display all

setEnabled

public void setEnabled(boolean enabled)

setSelection

public void setSelection(ISelection selection)

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.