PTP
Release 7.0

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

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by org.eclipse.ptp.services.ui.widgets.ServiceProviderConfigurationWidget
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class ServiceProviderConfigurationWidget
extends org.eclipse.swt.widgets.Composite

A widget for configuring the services providers for a given service configuration. Displays a table containing the service providers grouped by category on the left part of the widget. When a provider is selected, the right hand part of the widget will display the provider configuration along with a check box to enable/disable the provider and a combo to select a different provider for the service. The configuration UI for the selected provider is supplied by the providerContributor extension point.


Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
view
 
Constructor Summary
ServiceProviderConfigurationWidget(org.eclipse.swt.widgets.Composite parent, int style)
           
 
Method Summary
 void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
          Adds the listener to the collection of listeners who will be notified when the users selects a service configuration
 void applyChangesToConfiguration()
           
protected  void changeServiceState(boolean disabled)
           
 IServiceConfiguration getServiceConfiguration()
          Returns the service configuration object that is being displayed by this widget.
 void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
          Removes the listener from the collection of listeners who will be notified when a service configuration is selected by the user.
 void setServiceConfiguration(IServiceConfiguration conf)
          Causes the tree to display all the services that are available in the system.
 void setServiceConfiguration(IServiceConfiguration configuration, java.util.Set<java.lang.String> natureIds)
          Causes the tree to display all the services that are available in the system.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceProviderConfigurationWidget

public ServiceProviderConfigurationWidget(org.eclipse.swt.widgets.Composite parent,
                                          int style)
Method Detail

addSelectionListener

public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Adds the listener to the collection of listeners who will be notified when the users selects a service configuration

Parameters:
listener - the listener that will be notified of the selection

applyChangesToConfiguration

public void applyChangesToConfiguration()

getServiceConfiguration

public IServiceConfiguration getServiceConfiguration()
Returns the service configuration object that is being displayed by this widget. In order for the changes made by the user to be reflected in the configuration the applyChangesToConfiguration() method must be called first.


removeSelectionListener

public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Removes the listener from the collection of listeners who will be notified when a service configuration is selected by the user.

Parameters:
listener - the listener which will no longer be notified

setServiceConfiguration

public void setServiceConfiguration(IServiceConfiguration conf)
Causes the tree to display all the services that are available in the system. Services that are not part of the given service configuration will be shown as disabled. Services that are part of the given configuration will show as enabled. Any changes made by the user will only be applied to the given configuration when the applyChangesToConfiguration() method is called.


setServiceConfiguration

public void setServiceConfiguration(IServiceConfiguration configuration,
                                    java.util.Set<java.lang.String> natureIds)
Causes the tree to display all the services that are available in the system. Services that are not part of the given service configuration will be shown as disabled. Services that are part of the given configuration will show as enabled. Any changes made by the user will only be applied to the given configuration when the applyChangesToConfiguration() method is called. Additionally the services tree will be filtered to exclude services that do not apply to the given set of project nature IDs. This is useful when the widget is used as part of a project properties page as only the services that apply to the project will be shown.


changeServiceState

protected void changeServiceState(boolean disabled)

PTP
Release 7.0

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