| java.lang.Object org.eclipse.ui.internal.intro.impl.model.AbstractIntroElement
All known Subclasses: org.eclipse.ui.internal.intro.impl.model.IntroHead, org.eclipse.ui.internal.intro.impl.model.IntroPartPresentation, org.eclipse.ui.internal.intro.impl.model.IntroInclude, org.eclipse.ui.internal.intro.impl.model.IntroExtensionContent, org.eclipse.ui.internal.intro.impl.model.IntroURLAction, org.eclipse.ui.internal.intro.impl.model.IntroLaunchBarShortcut, org.eclipse.ui.internal.intro.impl.model.IntroLaunchBarElement, org.eclipse.ui.internal.intro.impl.model.AbstractIntroIdElement,
AbstractIntroElement | abstract public class AbstractIntroElement implements Cloneable(Code) | | An intro config component. All config components can get to their defining
config element or bundle depending from where the element was loaded.
Class Rules:
- If an element does not appear as a child under any node, then that
element does not need a type to be defined.
- Each subclass must ensure that it properly supports cloning. This means
that if a deep copy is needed, the subclass must override the base behavior
here.
- if cloning is not needed, override clone method and throw an unsupported
cloning exception. For now, only pages and targets of includes are cloneable.
Note: This is an abstract base class for all classes in the Intro Model.
Clients are not expected to implement or subclass this class, or any of its
subclasses.
|
Field Summary | |
final public static int | ABSTRACT_CONTAINER Type constant which identifies the AbstractIntroContainer element. | final public static int | ABSTRACT_PAGE Type constant which identifies the AbstractIntroPage element. | final public static int | ABSTRACT_TEXT Type constant which identifies the AbstractText element. | final public static int | ANCHOR Type constant which identifies the IntroAnchor element. | final public static int | BASE_ELEMENT Type constant which identifies the AbstractCommonIntroElement element. | final public static int | CONTAINER_EXTENSION Type constant which identifies the IntroContainerExtension element. | final public static int | CONTENT_PROVIDER Type constant which identifies the IntroContentProvider element. | final public static int | ELEMENT Type constant which identifies any element in the Intro Model. | final public static int | GROUP Type constant which identifies an IntroDiv element. | final public static int | HEAD Type constant which identifies the IntroHead element. | final public static int | HOME_PAGE Type constant which identifies an IntroHomePage element. | final public static int | HR Type constant for the hr element. | final public static int | HTML Type constant which identifies the IntroHtml element. | final public static int | ID_ELEMENT Type constant which identifies any element in the Intro Model which can
have an id. | final public static int | IMAGE Type constant which identifies the IntroImage element. | final public static int | INCLUDE Type constant which identifies the IntroInclude element. | final public static int | INJECTED_IFRAME Type constant which identifies am injected IFrame model element. | final public static int | LAUNCH_BAR Type constant which identifies the LaunchBarElement. | final public static int | LAUNCH_BAR_SHORTCUT Type constant which identifies the launch bar shortcut. | final public static int | LINK Type constant which identifies the IntroLink element. | final public static int | MODEL_ROOT Type constant which identifies an IntroModelRoot element. | final public static int | PAGE Type constant which identifies the IntroPage element. | final public static int | PAGE_TITLE Type constant which identifies the IntroHead element. | final public static int | PRESENTATION Type constant which identifies an IntroPartPresentation element. | final public static int | TEXT Type constant which identifies the IntroText element. | final public static int | THEME Type constant for the theme element. |
Constructor Summary | |
| AbstractIntroElement(IConfigurationElement element) Constructor used when model elements are being loaded from plugin.xml. | | AbstractIntroElement(Element element, Bundle bundle) Constructor used when model elements are being loaded from an xml content
file. | | AbstractIntroElement(Element element, Bundle bundle, String base) Constructor used when model elements are being loaded from an xml content
file. |
Method Summary | |
final public static boolean | allElementsAreOfType(AbstractIntroElement[] elements, int elementMask) Returns whether the types of all the elements in the given array are
among the specified element types. | public Object | clone() Shallow copy. | protected String | getAttribute(Element element, String att) DOM getAttribute retruns an empty string (not null) if attribute is not
defined. | protected String[] | getAttributeList(Element element, String att) | public Bundle | getBundle() Returns the plugin descriptor of the plugin from which this intro element
was loaded. | public IConfigurationElement | getCfgElement() Returns the configuration element from which this intro element was
loaded. | public Element | getElement() | public String | getMixinStyle() | public IntroModelRoot | getModelRoot() | public AbstractIntroElement | getParent() Returns the parent of this intro element.
Rules:
- For the model root, it retruns null.
- For the introPart presentation it returns a model root.
- For Pages, it returns an intro model root.
- For all other elements, it retruns a subclass of abstract container.
- for divs that are children of configs (shared divs), it returns the
holding model root.
- for Head elements that are children of Implementation elements
(shared Heads), it returns the holding presentation element.
returns the parent of this intro element. | public AbstractIntroPage | getParentPage() Returns the parent page holding this intro element. | abstract public int | getType() Returns the specific model type of this intro element. | public boolean | isOfType(int elementMask) Returns whether the element is among the specified element types. | protected void | loadFromParent() | public void | setBundle(Bundle bundle) | public void | setMixinStyle(String mixinStyle) | public void | setParent(AbstractIntroElement parent) |
ABSTRACT_CONTAINER | final public static int ABSTRACT_CONTAINER(Code) | | Type constant which identifies the AbstractIntroContainer element.
|
ABSTRACT_PAGE | final public static int ABSTRACT_PAGE(Code) | | Type constant which identifies the AbstractIntroPage element.
|
ABSTRACT_TEXT | final public static int ABSTRACT_TEXT(Code) | | Type constant which identifies the AbstractText element.
|
ANCHOR | final public static int ANCHOR(Code) | | Type constant which identifies the IntroAnchor element.
|
BASE_ELEMENT | final public static int BASE_ELEMENT(Code) | | Type constant which identifies the AbstractCommonIntroElement element.
|
CONTAINER_EXTENSION | final public static int CONTAINER_EXTENSION(Code) | | Type constant which identifies the IntroContainerExtension element.
|
CONTENT_PROVIDER | final public static int CONTENT_PROVIDER(Code) | | Type constant which identifies the IntroContentProvider element.
|
ELEMENT | final public static int ELEMENT(Code) | | Type constant which identifies any element in the Intro Model.
|
GROUP | final public static int GROUP(Code) | | Type constant which identifies an IntroDiv element.
|
HEAD | final public static int HEAD(Code) | | Type constant which identifies the IntroHead element.
|
HOME_PAGE | final public static int HOME_PAGE(Code) | | Type constant which identifies an IntroHomePage element.
|
HR | final public static int HR(Code) | | Type constant for the hr element.
|
HTML | final public static int HTML(Code) | | Type constant which identifies the IntroHtml element.
|
ID_ELEMENT | final public static int ID_ELEMENT(Code) | | Type constant which identifies any element in the Intro Model which can
have an id. Note: eventhough IntroStandbyContentPart has an id, it does
not appear as a child in the model, and so it does not have a type.
|
IMAGE | final public static int IMAGE(Code) | | Type constant which identifies the IntroImage element.
|
INCLUDE | final public static int INCLUDE(Code) | | Type constant which identifies the IntroInclude element.
|
INJECTED_IFRAME | final public static int INJECTED_IFRAME(Code) | | Type constant which identifies am injected IFrame model element.
|
LAUNCH_BAR | final public static int LAUNCH_BAR(Code) | | Type constant which identifies the LaunchBarElement.
|
LAUNCH_BAR_SHORTCUT | final public static int LAUNCH_BAR_SHORTCUT(Code) | | Type constant which identifies the launch bar shortcut.
|
LINK | final public static int LINK(Code) | | Type constant which identifies the IntroLink element.
|
MODEL_ROOT | final public static int MODEL_ROOT(Code) | | Type constant which identifies an IntroModelRoot element.
|
PAGE | final public static int PAGE(Code) | | Type constant which identifies the IntroPage element.
|
PAGE_TITLE | final public static int PAGE_TITLE(Code) | | Type constant which identifies the IntroHead element.
|
PRESENTATION | final public static int PRESENTATION(Code) | | Type constant which identifies an IntroPartPresentation element.
|
TEXT | final public static int TEXT(Code) | | Type constant which identifies the IntroText element.
|
THEME | final public static int THEME(Code) | | Type constant for the theme element.
|
AbstractIntroElement | AbstractIntroElement(IConfigurationElement element)(Code) | | Constructor used when model elements are being loaded from plugin.xml.
|
AbstractIntroElement | AbstractIntroElement(Element element, Bundle bundle)(Code) | | Constructor used when model elements are being loaded from an xml content
file. Bundle is propagated down the model to enable resolving resources
relative to the base of the bundle.
Parameters: element - Parameters: pd - |
AbstractIntroElement | AbstractIntroElement(Element element, Bundle bundle, String base)(Code) | | Constructor used when model elements are being loaded from an xml content
file. Bundle AND base is propagated down the model to enable resolving
resources relative to the xml content file. The base is set to point to
the relative location of the parent folder that holds the content file.
In the case of a configExtension, it is set to point to the relative
position of the parent folder that holds the extension. Only when needed,
the base field is stored in a model element. This saves memory.
Parameters: element - Parameters: pd - |
allElementsAreOfType | final public static boolean allElementsAreOfType(AbstractIntroElement[] elements, int elementMask)(Code) | | Returns whether the types of all the elements in the given array are
among the specified element types.
An example of an element mask is as follows:
int elementMask = IntroElement.DIV | IntroElement.DEFAULT_LINK;
true if all elements are of the right type, andfalse if the list is empty, or at least oneelement is not of the specified types. |
clone | public Object clone() throws CloneNotSupportedException(Code) | | Shallow copy. The design of cloning this model assumes that when a
container is cloned, all its children must be cloned and reparented to
it, hence one clone of this container object. This is why we have a
shallow copy here.
|
getAttribute | protected String getAttribute(Element element, String att)(Code) | | DOM getAttribute retruns an empty string (not null) if attribute is not
defined. Override this behavior to be consistent with Intro Model, and
IConfiguration element.
Parameters: element - Parameters: att - |
getAttributeList | protected String[] getAttributeList(Element element, String att)(Code) | | Util method to parse a comma separated list of values
Parameters: element - Parameters: att - |
getBundle | public Bundle getBundle()(Code) | | Returns the plugin descriptor of the plugin from which this intro element
was loaded. In the case of extension, returns the plugin descriptor of
the plugin defining the extension.
|
getCfgElement | public IConfigurationElement getCfgElement()(Code) | | Returns the configuration element from which this intro element was
loaded. In the case of extension, returns the configuration element of
the defining extension.
|
getParent | public AbstractIntroElement getParent()(Code) | | Returns the parent of this intro element.
Rules:
- For the model root, it retruns null.
- For the introPart presentation it returns a model root.
- For Pages, it returns an intro model root.
- For all other elements, it retruns a subclass of abstract container.
- for divs that are children of configs (shared divs), it returns the
holding model root.
- for Head elements that are children of Implementation elements
(shared Heads), it returns the holding presentation element.
returns the parent of this intro element. Null only for modelroot. |
getParentPage | public AbstractIntroPage getParentPage()(Code) | | Returns the parent page holding this intro element. For the model root
and the introPart presentation it returns null. For Pages, it returns the
page itself. For all other element, returns the holding page.
Exceptions:
- for divs that are children of configs (shared divs), it returns
null.
- for Head elements that are children of Implementation elements
(shared Heads), it returns null.
|
getType | abstract public int getType()(Code) | | Returns the specific model type of this intro element. To be implemented
by all subclasses.
returns one of the model class types defined in this class. |
isOfType | public boolean isOfType(int elementMask)(Code) | | Returns whether the element is among the specified element types. An
example of an element mask is as follows:
int elementMask = IntroElement.ABSTRACT_CONTAINER;
int elementMask = IntroElement.DIV | IntroElement.DEFAULT_LINK;
Parameters: elementMask - element mask formed by bitwise OR of element type constantsdefined in this class. true if this element has a matching type, andfalse otherwise. |
loadFromParent | protected void loadFromParent()(Code) | | |
setBundle | public void setBundle(Bundle bundle)(Code) | | |
setMixinStyle | public void setMixinStyle(String mixinStyle)(Code) | | |
|
|