Author: abelevich
Date: 2007-05-23 13:56:01 -0400 (Wed, 23 May 2007)
New Revision: 851
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEvent.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEventWrapper.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortListener.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortSource.java
Log:
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEvent.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEvent.java
(rev 0)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEvent.java 2007-05-23
17:56:01 UTC (rev 851)
@@ -0,0 +1,60 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source:
/cvs-master/intralinks-jsf-comps/components/data-view-grid/src/component/com/exadel/jsf/event/sort/SortEvent.java,v
$
+ * $Revision: 1.2 $
+ */
+
+package org.richfaces.event.sort;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class SortEvent extends FacesEvent {
+
+ private static final long serialVersionUID = -1453867412542792281L;
+
+ private String sortField;
+
+ /**
+ * @param component
+ * @param sortField
+ * @param sortAscending
+ */
+ public SortEvent(
+ UIComponent component,
+ String sortField) {
+ super(component);
+ this.sortField = sortField;
+ }
+
+ public boolean isAppropriateListener(FacesListener listener) {
+ return (listener instanceof SortListener);
+ }
+
+ public void processListener(FacesListener listener) {
+ ((SortListener) listener).processSort(this);
+ }
+
+ /**
+ * @return the sortField
+ */
+ public String getSortField() {
+ return sortField;
+ }
+
+ /**
+ * @see java.util.EventObject#toString()
+ */
+ public String toString() {
+ return "SortEvent: {sortField: " + sortField + "}";
+ }
+}
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEventWrapper.java
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEventWrapper.java
(rev 0)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEventWrapper.java 2007-05-23
17:56:01 UTC (rev 851)
@@ -0,0 +1,42 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source:
/cvs-master/intralinks-jsf-comps/components/data-view-grid/src/component/com/exadel/jsf/event/sort/SortEventWrapper.java,v
$
+ * $Revision: 1.2 $
+ */
+
+package org.richfaces.event.sort;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class SortEventWrapper extends FacesEvent {
+
+ private static final long serialVersionUID = -2882390997635668899L;
+ private SortEvent wrapped;
+
+ public SortEventWrapper(UIComponent component, SortEvent wrapped) {
+ super(component);
+ this.wrapped = wrapped;;
+ }
+
+ public boolean isAppropriateListener(FacesListener listener) {
+ return wrapped.isAppropriateListener(listener);
+ }
+
+ public void processListener(FacesListener listener) {
+ wrapped.processListener(listener);
+ }
+
+ public SortEvent getWrapped() {
+ return wrapped;
+ }
+}
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortListener.java
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortListener.java
(rev 0)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortListener.java 2007-05-23
17:56:01 UTC (rev 851)
@@ -0,0 +1,21 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source:
/cvs-master/intralinks-jsf-comps/components/data-view-grid/src/component/com/exadel/jsf/event/sort/SortListener.java,v
$
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.event.sort;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public interface SortListener extends FacesListener {
+ public void processSort(SortEvent e);
+}
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortSource.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortSource.java
(rev 0)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortSource.java 2007-05-23
17:56:01 UTC (rev 851)
@@ -0,0 +1,21 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source:
/cvs-master/intralinks-jsf-comps/components/data-view-grid/src/component/com/exadel/jsf/event/sort/SortSource.java,v
$
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.event.sort;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public interface SortSource {
+ public void addSortListener(SortListener listener);
+ public void removeSortListener(SortListener listener);
+ public SortListener[] getSortListeners();
+}