KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > jsf > navigation > vwmodel > Pin


1 /*
2  * Pin.java
3  *
4  * Created on January 29, 2007, 10:28 AM
5  *
6  * To change this template, choose Tools | Template Manager
7  * and open the template in the editor.
8  */

9
10 package org.netbeans.modules.web.jsf.navigation.vwmodel;
11
12 import org.netbeans.modules.web.jsf.navigation.vwmodel.NavigableComponent;
13 import org.netbeans.modules.web.jsf.navigation.vwmodel.Page;
14 import org.netbeans.modules.web.jsf.navigation.*;
15
16 /**
17  *
18  * @author joelle
19  */

20 public class Pin {
21     
22     private Page page;
23     private NavigableComponent navComp;
24     private boolean inFragment;
25         
26     
27     /** Creates a default Page Pin */
28     public Pin( Page fromPage) {
29         this.page = fromPage;
30         navComp = null;
31         inFragment = false;
32     }
33     
34     public Pin( Page page, NavigableComponent navComp) {
35         this.page = page;
36         this.navComp = navComp;
37         inFragment = false;
38     }
39     
40     public Pin( Page page, NavigableComponent navComp, boolean inFragment) {
41             this.page = page;
42             this.navComp = navComp;
43             this.inFragment = inFragment;
44     }
45     
46     public boolean equals( Pin pin ) {
47         if ( pin == null ) {
48             return false;
49         }
50         if ( pin.getPage() != page ){
51             return false;
52         }
53         if ( pin.getNavComp() != navComp) {
54             return false;
55         }
56         if (pin.isInFragment() != inFragment ){
57             return false;
58         }
59         return true;
60     }
61
62     public Page getPage() {
63         return page;
64     }
65
66     public void getPage(Page fromPage) {
67         this.page = fromPage;
68     }
69
70     public NavigableComponent getNavComp() {
71         return navComp;
72     }
73
74     public void setNavComp(NavigableComponent navComp) {
75         this.navComp = navComp;
76     }
77
78     public boolean isInFragment() {
79         return inFragment;
80     }
81
82     public void setInFragment(boolean inFragment) {
83         this.inFragment = inFragment;
84     }
85             
86     
87 }
88
Popular Tags