View Javadoc

1   /*
2    * Copyright 1999-2006 Faculty of Mathematics, Physics and Informatics, Comenius
3    * University, Bratislava. This file is protected by the Mozilla Public License
4    * version 1.1 (the License); you may not use this file except in compliance
5    * with the License. You may obtain a copy of the License at
6    * http://euromath2.sourceforge.net/license.html Unless required by applicable
7    * law or agreed to in writing, software distributed under the License is
8    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9    * KIND, either express or implied. See the License for the specific language
10   * governing permissions and limitations under the License.
11   */
12  package sk.uniba.euromath.plugin.views.outline.items;
13  import org.w3c.dom.ProcessingInstruction;
14  
15  import sk.uniba.euromath.plugin.views.outline.OutlineConsts;
16  /***
17   * @author TV Created on 27.5.2004
18   */
19  public class PIOutlineItem extends LeafOutlineItem {
20  	/***
21  	 * Constructor.
22  	 * @param instruction processing instruction node
23  	 */
24  	public PIOutlineItem(ProcessingInstruction instruction) {
25  		super(instruction);
26  	}
27  	/*
28  	 * (non-Javadoc)
29  	 * @see sk.uniba.euromath.plugin.views.outline.OutlineItem#getImageKey()
30  	 */
31  	@Override
32  	public String getImageKey() {
33  		return OutlineConsts.INST_KEY;
34  	}
35  	/***
36  	 * Returns processing instruction represented by this item
37  	 * @return processing instruction represented by this item
38  	 */
39  	public ProcessingInstruction getPI() {
40  		return (ProcessingInstruction) getModel();
41  	}
42  	/*
43  	 * (non-Javadoc)
44  	 * @see java.lang.Object#toString()
45  	 */
46  	@Override
47  	public String toString() {
48  		return getPI().toString();
49  	}
50  }