org.eclipse.gmf.runtime.emf.ui.properties.util
Class PropertyPageSelection
java.lang.Object
org.eclipse.gmf.runtime.emf.ui.properties.util.PropertyPageSelection
-
All Implemented Interfaces:
-
IAdaptable,
ISelection,
IStructuredSelection
-
public class PropertyPageSelection
- extends java.lang.Object
- implements
IAdaptable,
IStructuredSelection
A structured selection for use in the property page dialog. It
adapts to the following types
- IElement
- IStructuredSelection
- IActionFilter
- IPropertySource
- IWorkbenchAdapter
- CellEditor
Constructor Summary
|
PropertyPageSelection
(java.util.List selectedObjects)
Constructs a new instance with a list of selected objects. |
PropertyPageSelection
(java.lang.Object selectedObject)
Constructs a new instance with a single selected object |
Method Summary
|
java.lang.Object
|
getAdapter
(java.lang.Class adapter)
|
java.lang.Object
|
getFirstElement
()
Returns the first element in this selection, or null
if the selection is empty. |
boolean
|
isEmpty
()
Returns whether this selection is empty. |
java.util.Iterator
|
iterator
()
Returns an iterator over the elements of this selection. |
int
|
size
()
Returns the number of elements selected in this selection. |
java.lang.Object[]
|
toArray
()
Returns the elements in this selection as an array. |
java.util.List
|
toList
()
Returns the elements in this selection as a List . |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
PropertyPageSelection
public PropertyPageSelection(java.lang.Object selectedObject)
- Constructs a new instance with a single selected object
-
Parameters:
-
selectedObject
- The selected object
PropertyPageSelection
public PropertyPageSelection(java.util.List selectedObjects)
- Constructs a new instance with a list of selected objects.
-
Parameters:
-
selectedObjects
- The objects that are selected
getAdapter
public java.lang.Object getAdapter(java.lang.Class adapter)
-
-
Specified by:
-
getAdapter
in interface
IAdaptable
-
-
See Also:
-
IAdaptable.getAdapter(Class)
isEmpty
public boolean isEmpty()
- Returns whether this selection is empty.
-
-
Specified by:
-
isEmpty
in interface
ISelection
-
-
Returns:
-
true
if this selection is empty,
and false
otherwise
getFirstElement
public java.lang.Object getFirstElement()
- Returns the first element in this selection, or
null
if the selection is empty.
-
-
Specified by:
-
getFirstElement
in interface
IStructuredSelection
-
-
Returns:
- an element, or
null
if none
iterator
public java.util.Iterator iterator()
- Returns an iterator over the elements of this selection.
-
-
Specified by:
-
iterator
in interface
IStructuredSelection
-
-
Returns:
- an iterator over the selected elements
size
public int size()
- Returns the number of elements selected in this selection.
-
-
Specified by:
-
size
in interface
IStructuredSelection
-
-
Returns:
- the number of elements selected
toArray
public java.lang.Object[] toArray()
- Returns the elements in this selection as an array.
-
-
Specified by:
-
toArray
in interface
IStructuredSelection
-
-
Returns:
- the selected elements as an array
toList
public java.util.List toList()
- Returns the elements in this selection as a
List
.
-
-
Specified by:
-
toList
in interface
IStructuredSelection
-
-
Returns:
- the selected elements as a list
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.