| 1 | /** |
| 2 | * Copyright 2005-2011 Steve McDuff d-duff@users.sourceforge.net |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | package org.deduced.viewer.web.shared; |
| 17 | |
| 18 | import com.google.gwt.user.client.rpc.AsyncCallback; |
| 19 | |
| 20 | /** |
| 21 | * |
| 22 | * Pending Change Event |
| 23 | * |
| 24 | * @author Steve McDuff |
| 25 | * |
| 26 | */ |
| 27 | public class PendingChangeEvent |
| 28 | { |
| 29 | |
| 30 | /** |
| 31 | * change event |
| 32 | */ |
| 33 | private ChangeEvent event; |
| 34 | |
| 35 | /** |
| 36 | * call back |
| 37 | */ |
| 38 | private AsyncCallback<Void> callback; |
| 39 | |
| 40 | /** |
| 41 | * is the event sent |
| 42 | */ |
| 43 | private boolean sent = false; |
| 44 | |
| 45 | /** |
| 46 | * getEvent |
| 47 | * |
| 48 | * @return the event |
| 49 | */ |
| 50 | public ChangeEvent getEvent() |
| 51 | { |
| 52 | return event; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * setEvent |
| 57 | * |
| 58 | * @param setEvent the new event |
| 59 | */ |
| 60 | public void setEvent( |
| 61 | ChangeEvent setEvent) |
| 62 | { |
| 63 | event = setEvent; |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * getCallback |
| 68 | * |
| 69 | * @return the call back |
| 70 | */ |
| 71 | public AsyncCallback<Void> getCallback() |
| 72 | { |
| 73 | return callback; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * setCallback |
| 78 | * |
| 79 | * @param setCallback the call back |
| 80 | */ |
| 81 | public void setCallback( |
| 82 | AsyncCallback<Void> setCallback) |
| 83 | { |
| 84 | callback = setCallback; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * is Sent |
| 89 | * |
| 90 | * @return is the event sent |
| 91 | */ |
| 92 | public boolean isSent() |
| 93 | { |
| 94 | return sent; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * set event Sent |
| 99 | * |
| 100 | * @param setSent new event sent flag |
| 101 | */ |
| 102 | public void setSent( |
| 103 | boolean setSent) |
| 104 | { |
| 105 | sent = setSent; |
| 106 | } |
| 107 | |
| 108 | } |