Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GEF
3.3

org.eclipse.gef.ui.actions
Class SelectionAction

java.lang.Object
  extended by

org.eclipse.gef.ui.actions.WorkbenchPartAction
      extended by
org.eclipse.gef.ui.actions.SelectionAction
Direct Known Subclasses:
AlignmentAction, DeleteAction, DirectEditAction, org.eclipse.gef.ui.actions.MatchSizeAction

public abstract class SelectionAction
extends WorkbenchPartAction

Superclass for an action needing the current selection.


Constructor Summary
SelectionAction ( IWorkbenchPart part)
          Creates a SelectionAction and associates it with the given workbench part.
SelectionAction ( IWorkbenchPart part, int style)
          Creates a SelectionAction and associates it with the given editor.
 
Method Summary
 void dispose ()
          Disposes the action when it is no longer needed.
protected  java.util.List getSelectedObjects ()
          Returns a List containing the currently selected objects.
protected   ISelection getSelection ()
          Gets the current selection.
protected  void handleSelectionChanged ()
          Called when the selection is changed.
protected  void setSelection ( ISelection selection)
          Sets the current selection and calls on subclasses to handle the selectionChanged event.
 void setSelectionProvider ( ISelectionProvider provider)
          May be used to provide an alternative selection source other than the workbench's selection service.
 void update ()
           
 
Methods inherited from class org.eclipse.gef.ui.actions. WorkbenchPartAction
calculateEnabled, execute, getCommandStack, getWorkbenchPart, init, isEnabled, refresh, setLazyEnablementCalculation, setWorkbenchPart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionAction

public SelectionAction(
IWorkbenchPart part,
                       int style)
Creates a SelectionAction and associates it with the given editor.

Parameters:
part - The workbench part associated with this action
style - the style for this action

SelectionAction

public SelectionAction(
IWorkbenchPart part)
Creates a SelectionAction and associates it with the given workbench part.

Parameters:
part - the workbench part
Method Detail

dispose

public void dispose()
Description copied from class: WorkbenchPartAction
Disposes the action when it is no longer needed.

Overrides:
dispose in class WorkbenchPartAction
See Also:
Disposable.dispose()

getSelectedObjects

protected java.util.List getSelectedObjects()
Returns a List containing the currently selected objects.

Returns:
A List containing the currently selected objects.

getSelection

protected 
ISelection getSelection()
Gets the current selection.

Returns:
The current selection.

handleSelectionChanged

protected void handleSelectionChanged()
Called when the selection is changed.


setSelection

protected void setSelection(
ISelection selection)
Sets the current selection and calls on subclasses to handle the selectionChanged event.

Parameters:
selection - The new selection.

setSelectionProvider

public void setSelectionProvider(
ISelectionProvider provider)
May be used to provide an alternative selection source other than the workbench's selection service. Use of this method is optional. The default value is null, in which case the selection is obtained using the partsite's selection service.

Parameters:
provider - null or a selection provider

update

public void update()
Overrides:
update in class WorkbenchPartAction
See Also:
WorkbenchPartAction.update()

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire