KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icesoft > faces > component > datapaginator > PaginatorActionEvent


1 /* This is borrowed Apache code, with only package name changes.
2  * It does not and SHOULD NOT carry any ICEsoft copyright notice.
3  */

4
5
6 /* Original Copyright
7  * Copyright 2004 The Apache Software Foundation.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */

21 package com.icesoft.faces.component.datapaginator;
22
23 import javax.faces.component.UIComponent;
24 import javax.faces.event.ActionEvent;
25
26 /**
27  * @version beta 1.0
28  */

29 public class PaginatorActionEvent extends ActionEvent {
30     private static final long serialVersionUID = -5692343289423906802L;
31
32     private final String JavaDoc mScrollerfacet;
33
34     private final int mPageIndex;
35
36     /**
37      * @param component
38      * @param scrollerfacet
39      */

40     public PaginatorActionEvent(UIComponent component, String JavaDoc scrollerfacet) {
41         super(component);
42         mScrollerfacet = scrollerfacet;
43         mPageIndex = -1;
44     }
45
46     /**
47      * @param component
48      * @param pageIndex
49      */

50     public PaginatorActionEvent(UIComponent component, int pageIndex) {
51         super(component);
52         if (pageIndex < 0) {
53             throw new IllegalArgumentException JavaDoc("wrong pageindex");
54         }
55         mPageIndex = pageIndex;
56         mScrollerfacet = null;
57     }
58
59     /**
60      * @return Returns the scrollerfacet.
61      */

62     public String JavaDoc getScrollerfacet() {
63         return mScrollerfacet;
64     }
65
66     /**
67      * @return int
68      */

69     public int getPageIndex() {
70         return mPageIndex;
71     }
72 }
73
Popular Tags