KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > him > metadata > range > swing > range > details > URIDetails


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19 package org.openharmonise.him.metadata.range.swing.range.details;
20
21 import org.openharmonise.him.metadata.range.swing.range.*;
22 import org.openharmonise.vfs.metadata.*;
23 import org.openharmonise.vfs.metadata.range.*;
24 import org.openharmonise.vfs.metadata.value.*;
25
26
27 /**
28  * @author Matthew Large
29  * @version $Revision: 1.1 $
30  *
31  */

32 public class URIDetails extends AbstractRangeDetails {
33
34     private RangeValue m_value = null;
35     private URIRange m_range = null;
36
37     /**
38      * @param propInst
39      * @param sTitle
40      */

41     public URIDetails(PropertyInstance propInst) {
42         super(propInst, "URI, no details");
43         this.setup();
44     }
45     
46     private void setup() {
47         
48         if(this.getPropertyInstance().getValues().size()>0) {
49             this.m_value = (RangeValue) this.getPropertyInstance().getValues().get(0);
50             Range range = this.m_value.getRange();
51             
52             if(this.m_range==null) {
53                 this.m_range = new URIRange();
54                 this.m_value.setRange(m_range);
55             } else {
56                 this.m_range = (URIRange)range;
57             }
58         }
59     }
60
61 }
62
Popular Tags