01: /* This is borrowed Apache code, with only package name changes.
02: * It does not and SHOULD NOT carry any ICEsoft copyright notice.
03: */
04:
05: /* Original Copyright
06: * Copyright 2004 The Apache Software Foundation.
07: *
08: * Licensed under the Apache License, Version 2.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: */
20: package com.icesoft.faces.component.datapaginator;
21:
22: import javax.faces.component.UIComponent;
23: import javax.faces.event.ActionEvent;
24:
25: /**
26: * @version beta 1.0
27: */
28: public class PaginatorActionEvent extends ActionEvent {
29: private static final long serialVersionUID = -5692343289423906802L;
30:
31: private final String mScrollerfacet;
32:
33: private final int mPageIndex;
34:
35: /**
36: * @param component
37: * @param scrollerfacet
38: */
39: public PaginatorActionEvent(UIComponent component,
40: String 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("wrong pageindex");
54: }
55: mPageIndex = pageIndex;
56: mScrollerfacet = null;
57: }
58:
59: /**
60: * @return Returns the scrollerfacet.
61: */
62: public String getScrollerfacet() {
63: return mScrollerfacet;
64: }
65:
66: /**
67: * @return int
68: */
69: public int getPageIndex() {
70: return mPageIndex;
71: }
72: }
|