| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.student.common.ui.client.configurable.mvc.multiplicity; |
| 17 | |
|
| 18 | |
import org.kuali.student.common.ui.client.mvc.Callback; |
| 19 | |
|
| 20 | |
import com.google.gwt.user.client.ui.Composite; |
| 21 | |
import com.google.gwt.user.client.ui.Widget; |
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | 0 | public abstract class MultiplicityItem extends Composite{ |
| 34 | |
private Integer itemKey; |
| 35 | |
private Widget itemWidget; |
| 36 | |
private Callback<MultiplicityItem> removeCallback; |
| 37 | |
|
| 38 | 0 | private boolean isCreated = true; |
| 39 | 0 | private boolean isDeleted = false; |
| 40 | |
|
| 41 | |
public Integer getItemKey() { |
| 42 | 0 | return itemKey; |
| 43 | |
} |
| 44 | |
|
| 45 | |
public void setItemKey(Integer itemKey) { |
| 46 | 0 | this.itemKey = itemKey; |
| 47 | 0 | } |
| 48 | |
|
| 49 | |
public Widget getItemWidget() { |
| 50 | 0 | return itemWidget; |
| 51 | |
} |
| 52 | |
|
| 53 | |
public void setItemWidget(Widget itemWidget) { |
| 54 | 0 | this.itemWidget = itemWidget; |
| 55 | 0 | } |
| 56 | |
|
| 57 | |
public void setRemoveCallback(Callback<MultiplicityItem> callback){ |
| 58 | 0 | removeCallback = callback; |
| 59 | 0 | } |
| 60 | |
|
| 61 | |
public Callback<MultiplicityItem> getRemoveCallback(){ |
| 62 | 0 | return removeCallback; |
| 63 | |
} |
| 64 | |
|
| 65 | |
public boolean isCreated() { |
| 66 | 0 | return isCreated; |
| 67 | |
} |
| 68 | |
|
| 69 | |
public void setCreated(boolean created) { |
| 70 | 0 | this.isCreated = created; |
| 71 | 0 | } |
| 72 | |
|
| 73 | |
public boolean isDeleted() { |
| 74 | 0 | return isDeleted; |
| 75 | |
} |
| 76 | |
|
| 77 | |
public void setDeleted(boolean isDeleted) { |
| 78 | 0 | this.isDeleted = isDeleted; |
| 79 | 0 | if(isDeleted) |
| 80 | 0 | this.isCreated = false; |
| 81 | 0 | } |
| 82 | |
|
| 83 | |
public abstract void redraw(); |
| 84 | |
|
| 85 | |
public abstract void clear(); |
| 86 | |
|
| 87 | |
} |