1 11 12 package org.eclipse.ui.internal.intro.impl.model; 13 14 import org.osgi.framework.Bundle; 15 import org.w3c.dom.Element ; 16 17 22 public abstract class AbstractTextElement extends AbstractIntroContainer { 23 24 AbstractTextElement(Element element, Bundle bundle) { 25 super(element, bundle); 26 } 27 28 31 public IntroText getIntroText() { 32 AbstractIntroElement[] children = getChildren(); 33 for (int i=0;i<children.length;++i) { 34 if (children[i] instanceof IntroText) { 35 return (IntroText)children[i]; 36 } 37 } 38 return null; 39 } 40 41 44 public String getText() { 45 IntroText text = getIntroText(); 47 if (text != null) { 48 return text.getText(); 49 } 50 return null; 51 } 52 53 58 public int getType() { 59 return AbstractIntroElement.ABSTRACT_TEXT; 60 } 61 } 62 | Popular Tags |