org.topcased.modeler.sam.editor.outline
Class InstanciableModel
java.lang.Object
org.topcased.modeler.sam.editor.outline.InstanciableModel
- All Implemented Interfaces:
- IDisposable, IWrapperItemProvider
public class InstanciableModel
- extends java.lang.Object
- implements IWrapperItemProvider
Class acting as a wrapper around a ModelContent
(ie a System
or an Automaton
) so that it will not be seen as a 'normal' model
elsewhere (eg in content/label providers) and so that custom actions on
instances of this class may be added.
Implements IWrapperItemProvider
so that a selection containing an
InstanciableModel
object can be understood for the drag and drop in
OutlineDragAdapter#getSelection
(only really interested in getValue
here)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InstanciableModel
public InstanciableModel(ModelContent model)
- Parameters:
model
- the wrapped modelcontent that can be instanciated.
getModelContent
public ModelContent getModelContent()
- Returns:
- the system or automaton wrapped by this instance.
getChildren
public java.lang.Object[] getChildren()
- Returns:
- an empty array, since only first level automatas and systems can
be instanciated.
hasChildren
public boolean hasChildren()
- Returns:
- false, only first level modelcontents can be instanciated.
getFeature
public EStructuralFeature getFeature()
- Specified by:
getFeature
in interface IWrapperItemProvider
getIndex
public int getIndex()
- Specified by:
getIndex
in interface IWrapperItemProvider
getOwner
public java.lang.Object getOwner()
- Specified by:
getOwner
in interface IWrapperItemProvider
getValue
public java.lang.Object getValue()
- Returns the system or automaton wrapped by this instance.
- Specified by:
getValue
in interface IWrapperItemProvider
- See Also:
IWrapperItemProvider.getValue()
setIndex
public void setIndex(int index)
- Specified by:
setIndex
in interface IWrapperItemProvider
dispose
public void dispose()
- Specified by:
dispose
in interface IDisposable
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.