Package org.eclipse.rap.rwt
Interface Adaptable
- All Known Implementing Classes:
- Browser,- Button,- Canvas,- CBanner,- CCombo,- CLabel,- ColorDialog,- Combo,- Composite,- Control,- CoolBar,- CoolItem,- CTabFolder,- CTabItem,- DateTime,- Decorations,- Dialog,- Display,- DragSource,- DropDown,- DropTarget,- ExpandBar,- ExpandItem,- FileDialog,- FileUpload,- FontDialog,- Grid,- GridColumn,- GridColumnGroup,- GridItem,- Group,- Item,- Label,- Link,- List,- Menu,- MenuItem,- MessageBox,- ProgressBar,- RichTextEditor,- Sash,- SashForm,- Scale,- Scrollable,- ScrollBar,- ScrolledComposite,- Shell,- Slider,- Spinner,- TabFolder,- TabItem,- Table,- TableColumn,- TableItem,- TaskBar,- TaskItem,- Template,- Text,- ToolBar,- ToolItem,- ToolTip,- Tray,- TrayItem,- Tree,- TreeColumn,- TreeItem,- ViewForm,- Widget
public interface Adaptable
Adaptable objects lets you add interfaces to a class and lets clients query whether an object has a particular extension. This means adaptable objects can be dynamically extended. Adapters are created by adapter factories, which are registered with an global adapter manager.
     Adaptable a = ...;
     MyExtension x = a.getAdapter( MyExtension.class );
     if( x != null ) {
       // invoke MyExtension methods on x ...
     }
 
 - Since:
- 2.0
- 
Method SummaryModifier and TypeMethodDescription<T> TgetAdapter(Class<T> adapter) Returns an object which is an instance of the given class parameter associated with this object ornullif no association exists.
- 
Method Details- 
getAdapterReturns an object which is an instance of the given class parameter associated with this object or nullif no association exists.- Parameters:
- adapter- the lookup class
- Returns:
- an object that can be cast to the given class or nullif there is no adapter associated with the given class.
 
 
-