KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mdarad > framework > util > struts > action > PageSelectorDescriptor


1 /*
2     Mdarad-Toolobox is a collection of tools for Architected RAD
3     (Rapid Application Development) based on an MDA approach.
4     The toolbox contains frameworks and generators for many environments
5     (JAVA, J2EE, Hibernate, .NET, C++, etc.) which allow to generate
6     applications from a design Model
7     Copyright (C) 2004-2005 Elapse Technologies Inc.
8
9     This library is free software; you can redistribute it and/or
10     modify it under the terms of the GNU General Public
11     License as published by the Free Software Foundation; either
12     version 2.1 of the License, or (at your option) any later version.
13
14     This library is distributed in the hope that it will be useful,
15     but WITHOUT ANY WARRANTY; without even the implied warranty of
16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17     General Public License for more details.
18
19     You should have received a copy of the GNU General Public
20     License along with this library; if not, write to the Free Software
21     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */

23 package org.mdarad.framework.util.struts.action;
24
25 /**
26  * The class PageSelectorDescriptor is Utility class to
27  * keep the values of the descriptor of a link and the page
28  * number associated to the descriptor.
29  *
30  * @author Philippe Brouillette
31  * @version 1.0
32  *
33  */

34 public class PageSelectorDescriptor {
35
36     /**
37      * Constructor taking the description string and the page number as
38      * argument
39      * @param descriptor the label that is used to create the link.
40      * @param pageNumber the page number where the link must point.
41      */

42     public PageSelectorDescriptor(String JavaDoc descriptor, int pageNumber) {
43         setDescriptor(descriptor);
44         setPageNumber(pageNumber);
45     }
46
47     /**
48      * Property that keeps the label used.
49      */

50     private String JavaDoc descriptor;
51     
52     /**
53      * @return Returns the descriptor.
54      */

55     public String JavaDoc getDescriptor() {
56         return descriptor;
57     }
58     /**
59      * @param descriptor The descriptor to set.
60      */

61     public void setDescriptor(String JavaDoc descriptor) {
62         this.descriptor = descriptor;
63     }
64
65     
66     /**
67      * Property that keeps the page number where the link
68      * must point.
69      */

70     private int pageNumber;
71     
72     /**
73      * @return Returns the pageNumber.
74      */

75     public int getPageNumber() {
76         return pageNumber;
77     }
78     /**
79      * @param pageNumber The pageNumber to set.
80      */

81     public void setPageNumber(int pageNumber) {
82         this.pageNumber = pageNumber;
83     }
84 }
85
Popular Tags