| java.lang.Object org.eclipse.ui.internal.intro.impl.model.AbstractIntroElement org.eclipse.ui.internal.intro.impl.model.AbstractIntroIdElement org.eclipse.ui.internal.intro.impl.model.AbstractBaseIntroElement org.eclipse.ui.internal.intro.impl.model.AbstractIntroContainer org.eclipse.ui.internal.intro.impl.model.AbstractIntroPage
All known Subclasses: org.eclipse.ui.internal.intro.impl.model.IntroPage, org.eclipse.ui.internal.intro.impl.model.IntroHomePage,
AbstractIntroPage | abstract public class AbstractIntroPage extends AbstractIntroContainer (Code) | | Base class for all Intro pages, inlcuding HomePage. Adds page specific
support:
- support for page styles, and style inheritance
- support for XHTML via a DOM instance var. Resolving the page is also
handled here.
- a pge has the concept of being an IFramePage. This is indicated by the
isIFrame flag. A page is an IFramePage when it is not defined in any content
file, but instead is actually created at runtime. This is done to display a
Help System topic embedded in any given div. The current page is cloned, its
id is mangled with "_embedDivId", the content of the div pointed to by
embedDivId is replaced with an IFrame that loads the Help System topic.
|
Method Summary | |
protected void | addAltStyle(String altStyle, Bundle bundle) Adds the given style to the list.Style is not added if it already exists
in the list. | protected void | addAltStyles(Hashtable altStyles) Util method to add map of altstyles to list. | protected void | addStyle(String style) Adds the given style to the list. | protected void | addStyles(String[] styles) Util method to add given styles to the list. | public Object | clone() Deep copy since class has mutable objects. | public Object[] | findDOMTarget(IntroModelRoot model, String path) Finds the child element that corresponds to the given path in the passed
model.
Parameters: model - model containing target path. Parameters: path - the path to look for Parameters: results - two object array that will return the target intro page as thefirst result, and the actual target DOM Element as the secondresult. | public Element | findDomChild(String id, String localElementName) Deep searches all children in this container's DOM for the first child
with the given id. | public Element | findDomChild(String id) Search for any element with the given id. | public String | getAltStyle() | public Hashtable | getAltStyles() Gets all the inherited alt-styles of this page (ie: styles for the SWT
presentation). | public String | getContent() | public Document | getDocument() Returns the DOM representing an external XHTML file. | public IntroHead[] | getHTMLHeads() Returns all head contributions in this page. | public String | getIFrameURL() Return the url of the embedded IFrame, if this page is an IFrame page. | public String | getInitialBase() Returns the raw or unprocessed base location. | protected AbstractIntroElement | getModelChild(Element childElement, Bundle bundle, String base) Override parent behavior to add support for HEAD & Title element in pages
only, and not in divs. | public String | getRawContent() Returns unresolved content value as found in the source file. | public Document | getResolvedDocument() Returns the DOM representing an external XHTML file. | public String | getStyle() | public String[] | getStyles() Gets all the inherited styles of this page. | public String | getTitle() The page's title. | public int | getType() | public String | getUnmangledId() | public boolean | injectIFrame(String url, String embedTarget) | public boolean | injectSharedStyle() Return the url of the embedded IFrame, if this page is an IFrame page. | public void | insertStyle(String style, int location) | public boolean | isIFramePage() Return true if this page is a cloned page that has an IFrame. | public boolean | isXHTMLPage() Returns whether or not we have an XHTML page as the content for this
page. | protected void | loadChildren() load the children of this container. | protected void | resolveChildren() | protected void | resolveIncludes() Resolves all includes in this page. | protected void | resolvePage() Resolves the full page. | public void | setIFrameURL(String url) Set the url of the embedded IFrame, if this page is an IFrame page. | public void | setId(String id) Used when cloning pages to assign a unique id. | public void | setParent(AbstractIntroElement parent) |
AbstractIntroPage | AbstractIntroPage(Element element, Bundle bundle, String base)(Code) | | Parent class for all pages. Make sure to set the bundle to where the
pages are loaded from. This means that the bundle for root may be
different from the bundle for all the other pages. Only pages do this
logic and so other model objects might have the wrong bundle cached if
the resource was loaded from an nl directory.
Parameters: element - |
addAltStyle | protected void addAltStyle(String altStyle, Bundle bundle)(Code) | | Adds the given style to the list.Style is not added if it already exists
in the list.
Parameters: altStyle - |
addAltStyles | protected void addAltStyles(Hashtable altStyles)(Code) | | Util method to add map of altstyles to list.
|
addStyle | protected void addStyle(String style)(Code) | | Adds the given style to the list. Style is not added if it already exists
in the list.
Parameters: style - |
addStyles | protected void addStyles(String[] styles)(Code) | | Util method to add given styles to the list.
|
findDOMTarget | public Object[] findDOMTarget(IntroModelRoot model, String path)(Code) | | Finds the child element that corresponds to the given path in the passed
model.
Parameters: model - model containing target path. Parameters: path - the path to look for Parameters: results - two object array that will return the target intro page as thefirst result, and the actual target DOM Element as the secondresult. It is gauranteed to not be null. Content may be null. target DOM element |
findDomChild | public Element findDomChild(String id, String localElementName)(Code) | | Deep searches all children in this container's DOM for the first child
with the given id. The element retrieved must have the passed local name.
Note that in an XHTML file (aka DOM) elements should have a unique id
within the scope of a document. We use local name because this allows for
finding intro anchors, includes and dynamic content element regardless of
whether or not an xmlns was used in the xml. note: could not have used
inheritance from parent container because return type for parent is intro
legacy model.
|
findDomChild | public Element findDomChild(String id)(Code) | | Search for any element with the given id.
Parameters: id - |
getAltStyle | public String getAltStyle()(Code) | | Returns the alt_style. |
getAltStyles | public Hashtable getAltStyles()(Code) | | Gets all the inherited alt-styles of this page (ie: styles for the SWT
presentation). A hashtable is returned that has inhertied alt-styles as
keys, and plugin descriptors as values. This is needed to be able to load
resources from the inherited target plugin. Note: this call needs to get
all the children of this page, and so its will resolve this page. might
be expensive.
Returns all the inherited styles of this page. Returns an emptyhashtable if page is not expandable, does not have any includes,or has includes that do not merge styles. |
getContent | public String getContent()(Code) | | Returns the content. |
getDocument | public Document getDocument()(Code) | | Returns the DOM representing an external XHTML file. May return null if
extension content is 3.0 format. The page is NOT resolved before
returning. It is retruned as given by the dom parser.
|
getHTMLHeads | public IntroHead[] getHTMLHeads()(Code) | | Returns all head contributions in this page. There can be more than one
head contribution in the page;
|
getIFrameURL | public String getIFrameURL()(Code) | | Return the url of the embedded IFrame, if this page is an IFrame page.
Parameters: url - |
getInitialBase | public String getInitialBase()(Code) | | Returns the raw or unprocessed base location.
|
getRawContent | public String getRawContent()(Code) | | Returns unresolved content value as found in the source file.
the source file.
the unresolved content value |
getResolvedDocument | public Document getResolvedDocument()(Code) | | Returns the DOM representing an external XHTML file. May return null if
extension content is 3.0 format. The page is resolved before returning,
meaning includes are resolved, and the base of the page is defined.
|
getStyles | public String[] getStyles()(Code) | | Gets all the inherited styles of this page. Styles can be inherited from
includes or from configExtensions.
Note: this call needs to get all the children of this page, and so it
will resolve this page. might be expensive.
Returns all the inherited styles of this page. Returns an emptyarray if page is not expandable or does not have inheritedstyles. |
getTitle | public String getTitle()(Code) | | The page's title. Each page can have one title.
Returns the title of this page. |
getType | public int getType()(Code) | | |
injectSharedStyle | public boolean injectSharedStyle()(Code) | | Return the url of the embedded IFrame, if this page is an IFrame page.
Parameters: url - |
insertStyle | public void insertStyle(String style, int location)(Code) | | |
isIFramePage | public boolean isIFramePage()(Code) | | Return true if this page is a cloned page that has an IFrame.
|
isXHTMLPage | public boolean isXHTMLPage()(Code) | | Returns whether or not we have an XHTML page as the content for this
page. The XHTML page is defined through the content attribute. This
method forces the content file to be parsed and loaded in memory.
|
loadChildren | protected void loadChildren()(Code) | | load the children of this container. Override parent behavior because we
want to support loading content from other xml files. The design is that
only the id and content from the existing page are honored. All other
attributes are what they are defined in the external paget. For XHTML
content, all info is in the xhtml page. If we fail to load the page,
display the Invalid Page page.
|
resolveChildren | protected void resolveChildren()(Code) | | |
resolveIncludes | protected void resolveIncludes()(Code) | | Resolves all includes in this page. This means importing the DOM of the
target path into the current page DOM, and resolving XHTML attributes for
resources.
|
resolvePage | protected void resolvePage()(Code) | | Resolves the full page. It is called just before the page needs to be
displayed.
adds a BASE child to the DOM HEAD element, if one is not defined.
All intro documents must have a base defined to resolve all urls.
resolves all includes in the page. This means importing target DOM.
resolves all XHTML attributes for resources, eg: src, href
attributes.
|
setIFrameURL | public void setIFrameURL(String url)(Code) | | Set the url of the embedded IFrame, if this page is an IFrame page.
Parameters: url - |
setId | public void setId(String id)(Code) | | Used when cloning pages to assign a unique id. Cache original id before
setting.
Parameters: id - |
Methods inherited from org.eclipse.ui.internal.intro.impl.model.AbstractIntroContainer | public void addChild(AbstractIntroElement child)(Code)(Java Doc) public void clearChildren()(Code)(Java Doc) public Object clone() throws CloneNotSupportedException(Code)(Java Doc) protected AbstractIntroElement cloneTarget(AbstractIntroElement target)(Code)(Java Doc) public AbstractIntroElement findChild(String elementId)(Code)(Java Doc) public AbstractIntroElement findChild(String elementId, int elementMask)(Code)(Java Doc) public AbstractIntroElement findTarget(AbstractIntroContainer container, String path)(Code)(Java Doc) public AbstractIntroElement findTarget(AbstractIntroContainer container, String path, String extensionId)(Code)(Java Doc) public AbstractIntroElement findTarget(String path)(Code)(Java Doc) public String getBackgroundImage()(Code)(Java Doc) public String getBase()(Code)(Java Doc) public AbstractIntroElement[] getChildren()(Code)(Java Doc) public Object[] getChildrenOfType(int elementMask)(Code)(Java Doc) public Element getElement()(Code)(Java Doc) protected AbstractIntroElement getModelChild(Element childElement, Bundle bundle, String base)(Code)(Java Doc) public int getType()(Code)(Java Doc) protected void insertElementsBefore(Element[] childElements, Bundle bundle, String base, int index, String mixinStyle)(Code)(Java Doc) protected void insertElementsBefore(Element[] childElements, Bundle bundle, String base, AbstractIntroElement child, String mixinStyle)(Code)(Java Doc) protected void loadChildren()(Code)(Java Doc) public void removeChild(AbstractIntroElement child)(Code)(Java Doc) protected void resolveChildren()(Code)(Java Doc)
|
Methods inherited from org.eclipse.ui.internal.intro.impl.model.AbstractIntroIdElement | public String getId()(Code)(Java Doc)
|
|
|