KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > internal > CommandLink


1 /*******************************************************************************
2  * Copyright (c) 2007 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;
12
13 import org.eclipse.help.ICommandLink;
14 import org.w3c.dom.Element JavaDoc;
15
16 public class CommandLink extends UAElement implements ICommandLink {
17
18     public static final String JavaDoc NAME = "command"; //$NON-NLS-1$
19
public static final String JavaDoc ATTRIBUTE_LABEL = "label"; //$NON-NLS-1$
20
public static final String JavaDoc ATTRIBUTE_SERIALIZATION = "serialization"; //$NON-NLS-1$
21

22     public CommandLink(ICommandLink src) {
23         super(NAME, src);
24         setLabel(src.getLabel());
25         setSerialization(src.getSerialization());
26     }
27     
28     public CommandLink(Element JavaDoc src) {
29         super(src);
30     }
31
32     public String JavaDoc getLabel() {
33         return getAttribute(ATTRIBUTE_LABEL);
34     }
35
36     public String JavaDoc getSerialization() {
37         return getAttribute(ATTRIBUTE_SERIALIZATION);
38     }
39
40     public void setLabel(String JavaDoc label) {
41         setAttribute(ATTRIBUTE_LABEL, label);
42     }
43     
44     public void setSerialization(String JavaDoc serialization) {
45         setAttribute(ATTRIBUTE_SERIALIZATION, serialization);
46     }
47 }
48
Popular Tags