KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > intro > impl > model > IntroInclude


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ui.internal.intro.impl.model;
13
14 import org.osgi.framework.Bundle;
15 import org.w3c.dom.Element JavaDoc;
16
17 /**
18  * An intro image element.
19  */

20 public class IntroInclude extends AbstractIntroElement {
21
22     protected static final String JavaDoc TAG_INCLUDE = "include"; //$NON-NLS-1$
23

24     private static final String JavaDoc ATT_CONFIG_ID = "configId"; //$NON-NLS-1$
25
protected static final String JavaDoc ATT_PATH = "path"; //$NON-NLS-1$
26
/**
27      * boolean attribute, default is false.
28      */

29     private static final String JavaDoc ATT_MERGE_STYLE = "merge-style"; //$NON-NLS-1$
30

31     private String JavaDoc configId;
32     private String JavaDoc path;
33     private boolean mergeStyle = false;
34
35     IntroInclude(Element JavaDoc element, Bundle bundle) {
36         super(element, bundle);
37         configId = getAttribute(element, ATT_CONFIG_ID);
38         path = getAttribute(element, ATT_PATH);
39         String JavaDoc mergeStyleString = getAttribute(element, ATT_MERGE_STYLE);
40         mergeStyle = (mergeStyleString != null && mergeStyleString
41             .equalsIgnoreCase("true")) ? true : false; //$NON-NLS-1$
42
}
43
44     /**
45      * @return Returns the configId.
46      */

47     public String JavaDoc getConfigId() {
48         return configId;
49     }
50
51     /**
52      * @return Returns the mergeStyle.
53      */

54     public boolean getMergeStyle() {
55         return mergeStyle;
56     }
57
58     /**
59      * @return Returns the path.
60      */

61     public String JavaDoc getPath() {
62         return path;
63     }
64
65     /*
66      * (non-Javadoc)
67      *
68      * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
69      */

70     public int getType() {
71         return AbstractIntroElement.INCLUDE;
72     }
73
74 }
75
Popular Tags