KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > internal > context > RelatedTopic


1 /*******************************************************************************
2  * Copyright (c) 2000, 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 package org.eclipse.help.internal.context;
12 import org.eclipse.help.*;
13 import org.xml.sax.*;
14 /**
15  * Default implementation for a topic contribution
16  */

17 public class RelatedTopic extends ContextsNode implements IHelpResource {
18     protected String JavaDoc href;
19     protected String JavaDoc label;
20     public RelatedTopic(Attributes attrs) {
21         super(attrs);
22         if (attrs == null)
23             return;
24         href = attrs.getValue(ContextsNode.RELATED_HREF);
25         this.label = attrs.getValue(ContextsNode.RELATED_LABEL);
26         if (this.label == null)
27             this.label = ""; //$NON-NLS-1$
28
}
29     public String JavaDoc getHref() {
30         return href;
31     }
32     public void setHref(String JavaDoc href) {
33         this.href = href;
34     }
35     /**
36      * Returns the label
37      */

38     public String JavaDoc getLabel() {
39         return label;
40     }
41     /**
42      * @see ContextsNode#build(ContextsBuilder)
43      */

44     public void build(ContextsBuilder builder) {
45         builder.build(this);
46     }
47 }
48
Popular Tags