diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/vaadin/event/dd/DragAndDropEvent.java | 8 | ||||
-rw-r--r-- | src/com/vaadin/event/dd/DropTarget.java | 4 | ||||
-rw-r--r-- | src/com/vaadin/event/dd/TargetDetails.java (renamed from src/com/vaadin/event/dd/DropTargetDetails.java) | 14 | ||||
-rw-r--r-- | src/com/vaadin/event/dd/TargetDetailsImpl.java (renamed from src/com/vaadin/event/dd/DropTargetDetailsImpl.java) | 10 | ||||
-rw-r--r-- | src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java | 4 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/DragAndDropService.java | 14 | ||||
-rw-r--r-- | src/com/vaadin/ui/AbstractSelect.java | 11 | ||||
-rw-r--r-- | src/com/vaadin/ui/DragAndDropWrapper.java | 13 | ||||
-rw-r--r-- | src/com/vaadin/ui/Table.java | 6 | ||||
-rw-r--r-- | src/com/vaadin/ui/Tree.java | 18 |
10 files changed, 51 insertions, 51 deletions
diff --git a/src/com/vaadin/event/dd/DragAndDropEvent.java b/src/com/vaadin/event/dd/DragAndDropEvent.java index 01817200f9..721e000369 100644 --- a/src/com/vaadin/event/dd/DragAndDropEvent.java +++ b/src/com/vaadin/event/dd/DragAndDropEvent.java @@ -16,7 +16,7 @@ import com.vaadin.event.dd.acceptcriteria.AcceptCriterion; * <p> * DragAndDropEvent instances contains both the dragged data in * {@link Transferable} (generated by {@link DragSource} and details about the - * current drop event in {@link DropTargetDetails} (generated by + * current drop event in {@link TargetDetails} (generated by * {@link DropTarget}. * * @since 6.3 @@ -24,10 +24,10 @@ import com.vaadin.event.dd.acceptcriteria.AcceptCriterion; */ public class DragAndDropEvent implements Serializable { private Transferable transferable; - private DropTargetDetails dropTargetDetails; + private TargetDetails dropTargetDetails; public DragAndDropEvent(Transferable transferable, - DropTargetDetails dropTargetDetails) { + TargetDetails dropTargetDetails) { this.transferable = transferable; this.dropTargetDetails = dropTargetDetails; } @@ -44,7 +44,7 @@ public class DragAndDropEvent implements Serializable { * @return the DropTargetDetails containing drop target related details of * drag and drop operation */ - public DropTargetDetails getDropTargetDetails() { + public TargetDetails getDropTargetDetails() { return dropTargetDetails; } diff --git a/src/com/vaadin/event/dd/DropTarget.java b/src/com/vaadin/event/dd/DropTarget.java index b2ab244c43..31c6754f6f 100644 --- a/src/com/vaadin/event/dd/DropTarget.java +++ b/src/com/vaadin/event/dd/DropTarget.java @@ -27,7 +27,7 @@ public interface DropTarget extends Component { * {@link DropHandler}. Implementation may for exmaple translate the drop * target details provided by the client side (drop target) to meaningful * server side values. If null is returned the terminal implementation will - * automatically create a {@link DropTargetDetails} with raw client side + * automatically create a {@link TargetDetails} with raw client side * data. * * @see DragSource#getTransferable(Map) @@ -37,7 +37,7 @@ public interface DropTarget extends Component { * @return A DropTargetDetails object with the translated data or null to * use a default implementation. */ - public DropTargetDetails translateDropTargetDetails( + public TargetDetails translateDropTargetDetails( Map<String, Object> clientVariables); }
\ No newline at end of file diff --git a/src/com/vaadin/event/dd/DropTargetDetails.java b/src/com/vaadin/event/dd/TargetDetails.java index 770d58d9d3..f83edf84d1 100644 --- a/src/com/vaadin/event/dd/DropTargetDetails.java +++ b/src/com/vaadin/event/dd/TargetDetails.java @@ -5,21 +5,21 @@ package com.vaadin.event.dd; import java.io.Serializable; -import com.vaadin.ui.Tree.TreeDropTargetDetails; +import com.vaadin.ui.Tree.TreeTargetDetails; /** - * DropTargetDetails wraps drop target related information about + * TargetDetails wraps drop target related information about * {@link DragAndDropEvent}. * <p> - * When a DropTargetDetails object is used in {@link DropHandler} it is often - * preferable to cast the DropTargetDetail to an implementation provided by - * DropTarget like {@link TreeDropTargetDetails}. They often provide better - * typed, drop target specific API. + * When a TargetDetails object is used in {@link DropHandler} it is often + * preferable to cast the TargetDetails to an implementation provided by + * DropTarget like {@link TreeTargetDetails}. They often provide a better typed, + * drop target specific API. * * @since 6.3 * */ -public interface DropTargetDetails extends Serializable { +public interface TargetDetails extends Serializable { /** * Gets target data associated to given string key diff --git a/src/com/vaadin/event/dd/DropTargetDetailsImpl.java b/src/com/vaadin/event/dd/TargetDetailsImpl.java index bcc35c623c..5b23a2a64f 100644 --- a/src/com/vaadin/event/dd/DropTargetDetailsImpl.java +++ b/src/com/vaadin/event/dd/TargetDetailsImpl.java @@ -7,23 +7,23 @@ import java.util.HashMap; import java.util.Map; /** - * A HashMap backed implementation of {@link DropTargetDetails} for terminal + * A HashMap backed implementation of {@link TargetDetails} for terminal * implementation and for extension. * * @since 6.3 * */ -public class DropTargetDetailsImpl implements DropTargetDetails { +@SuppressWarnings("serial") +public class TargetDetailsImpl implements TargetDetails { - private static final long serialVersionUID = -5099462771593036776L; private HashMap<String, Object> data = new HashMap<String, Object>(); private DropTarget dropTarget; - protected DropTargetDetailsImpl(Map<String, Object> rawDropData) { + protected TargetDetailsImpl(Map<String, Object> rawDropData) { data.putAll(rawDropData); } - public DropTargetDetailsImpl(Map<String, Object> rawDropData, + public TargetDetailsImpl(Map<String, Object> rawDropData, DropTarget dropTarget) { this(rawDropData); this.dropTarget = dropTarget; diff --git a/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java b/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java index c20f10667d..89783aefe4 100644 --- a/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java +++ b/src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java @@ -7,7 +7,7 @@ package com.vaadin.event.dd.acceptcriteria; import com.vaadin.event.dd.DragAndDropEvent; -import com.vaadin.event.dd.DropTargetDetails; +import com.vaadin.event.dd.TargetDetails; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.gwt.client.ui.dd.VTargetDetailIs; @@ -30,7 +30,7 @@ public class TargetDetailIs extends ClientSideCriterion { /** * Constructs a criterion which ensures that the value there is a value in - * {@link DropTargetDetails} that equals the reference value. + * {@link TargetDetails} that equals the reference value. * * @param dataFlavor * the type of data to be checked diff --git a/src/com/vaadin/terminal/gwt/server/DragAndDropService.java b/src/com/vaadin/terminal/gwt/server/DragAndDropService.java index 3c17cb0b32..9f8e3ba17e 100644 --- a/src/com/vaadin/terminal/gwt/server/DragAndDropService.java +++ b/src/com/vaadin/terminal/gwt/server/DragAndDropService.java @@ -12,8 +12,8 @@ import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.DragSource; import com.vaadin.event.dd.DropHandler; import com.vaadin.event.dd.DropTarget; -import com.vaadin.event.dd.DropTargetDetails; -import com.vaadin.event.dd.DropTargetDetailsImpl; +import com.vaadin.event.dd.TargetDetails; +import com.vaadin.event.dd.TargetDetailsImpl; import com.vaadin.event.dd.acceptcriteria.AcceptCriterion; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.VariableOwner; @@ -89,7 +89,7 @@ public class DragAndDropService implements VariableOwner { * source for Transferable, drop target for DragDropDetails). */ Transferable transferable = constructTransferable(dropTarget, variables); - DropTargetDetails dropData = constructDragDropDetails(dropTarget, + TargetDetails dropData = constructDragDropDetails(dropTarget, variables); DragAndDropEvent dropEvent = new DragAndDropEvent(transferable, dropData); @@ -116,7 +116,7 @@ public class DragAndDropService implements VariableOwner { * source for Transferable, current target for DragDropDetails). */ Transferable transferable = constructTransferable(dropTarget, variables); - DropTargetDetails dragDropDetails = constructDragDropDetails( + TargetDetails dragDropDetails = constructDragDropDetails( dropTarget, variables); dragEvent = new DragAndDropEvent(transferable, dragDropDetails); @@ -134,17 +134,17 @@ public class DragAndDropService implements VariableOwner { * @return */ @SuppressWarnings("unchecked") - private DropTargetDetails constructDragDropDetails(DropTarget dropTarget, + private TargetDetails constructDragDropDetails(DropTarget dropTarget, Map<String, Object> variables) { Map<String, Object> rawDragDropDetails = (Map<String, Object>) variables .get("evt"); - DropTargetDetails dropData = dropTarget + TargetDetails dropData = dropTarget .translateDropTargetDetails(rawDragDropDetails); if (dropData == null) { // Create a default DragDropDetails with all the raw variables - dropData = new DropTargetDetailsImpl(rawDragDropDetails, dropTarget); + dropData = new TargetDetailsImpl(rawDragDropDetails, dropTarget); } return dropData; diff --git a/src/com/vaadin/ui/AbstractSelect.java b/src/com/vaadin/ui/AbstractSelect.java index 42bc93a183..137f415555 100644 --- a/src/com/vaadin/ui/AbstractSelect.java +++ b/src/com/vaadin/ui/AbstractSelect.java @@ -23,7 +23,7 @@ import com.vaadin.event.DataBoundTransferable; import com.vaadin.event.Transferable; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.DropTarget; -import com.vaadin.event.dd.DropTargetDetailsImpl; +import com.vaadin.event.dd.TargetDetailsImpl; import com.vaadin.event.dd.acceptcriteria.ClientCriterion; import com.vaadin.event.dd.acceptcriteria.ClientSideCriterion; import com.vaadin.event.dd.acceptcriteria.ContainsDataFlavor; @@ -1714,7 +1714,7 @@ public abstract class AbstractSelect extends AbstractField implements } public boolean accept(DragAndDropEvent dragEvent) { - AbstractSelectDropTargetDetails dropTargetData = (AbstractSelectDropTargetDetails) dragEvent + AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dragEvent .getDropTargetDetails(); if (dropTargetData.getTarget() != select) { return false; @@ -1801,12 +1801,12 @@ public abstract class AbstractSelect extends AbstractField implements } /** - * DropTargetDetails implementation for subclasses of {@link AbstractSelect} + * TargetDetails implementation for subclasses of {@link AbstractSelect} * that implement {@link DropTarget}. * * @since 6.3 */ - public class AbstractSelectDropTargetDetails extends DropTargetDetailsImpl { + public class AbstractSelectTargetDetails extends TargetDetailsImpl { /** * The item id over which the drag event happened. @@ -1818,8 +1818,7 @@ public abstract class AbstractSelect extends AbstractField implements * corresponding item Id * */ - protected AbstractSelectDropTargetDetails( - Map<String, Object> rawVariables) { + protected AbstractSelectTargetDetails(Map<String, Object> rawVariables) { super(rawVariables, (DropTarget) AbstractSelect.this); // eagar fetch itemid, mapper may be emptied String keyover = (String) getData("itemIdOver"); diff --git a/src/com/vaadin/ui/DragAndDropWrapper.java b/src/com/vaadin/ui/DragAndDropWrapper.java index c9e8954529..e431592e8e 100644 --- a/src/com/vaadin/ui/DragAndDropWrapper.java +++ b/src/com/vaadin/ui/DragAndDropWrapper.java @@ -14,8 +14,8 @@ import com.vaadin.event.TransferableImpl; import com.vaadin.event.dd.DragSource; import com.vaadin.event.dd.DropHandler; import com.vaadin.event.dd.DropTarget; -import com.vaadin.event.dd.DropTargetDetails; -import com.vaadin.event.dd.DropTargetDetailsImpl; +import com.vaadin.event.dd.TargetDetails; +import com.vaadin.event.dd.TargetDetailsImpl; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.UploadStream; @@ -28,6 +28,7 @@ import com.vaadin.ui.DragAndDropWrapper.WrapperTransferable.Html5File; import com.vaadin.ui.Upload.Receiver; import com.vaadin.ui.Upload.UploadException; +@SuppressWarnings("serial") @ClientWidget(VDragAndDropWrapper.class) public class DragAndDropWrapper extends CustomComponent implements DropTarget, DragSource { @@ -142,9 +143,9 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, private Map<String, Html5File> receivers = new HashMap<String, Html5File>(); - public class WrapperDropDetails extends DropTargetDetailsImpl { + public class WrapperTargetDetails extends TargetDetailsImpl { - public WrapperDropDetails(Map<String, Object> rawDropData) { + public WrapperTargetDetails(Map<String, Object> rawDropData) { super(rawDropData, DragAndDropWrapper.this); } @@ -231,9 +232,9 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget, requestRepaint(); } - public DropTargetDetails translateDropTargetDetails( + public TargetDetails translateDropTargetDetails( Map<String, Object> clientVariables) { - return new WrapperDropDetails(clientVariables); + return new WrapperTargetDetails(clientVariables); } public Transferable getTransferable(final Map<String, Object> rawVariables) { diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 842c6b206c..043df94172 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -3425,9 +3425,9 @@ public class Table extends AbstractSelect implements Action.Container, this.dropHandler = dropHandler; } - public AbstractSelectDropTargetDetails translateDropTargetDetails( + public AbstractSelectTargetDetails translateDropTargetDetails( Map<String, Object> clientVariables) { - return new AbstractSelectDropTargetDetails(clientVariables); + return new AbstractSelectTargetDetails(clientVariables); } /** @@ -3469,7 +3469,7 @@ public class Table extends AbstractSelect implements Action.Container, * .event.dd.DragAndDropEvent) */ public boolean accept(DragAndDropEvent dragEvent) { - AbstractSelectDropTargetDetails dropTargetData = (AbstractSelectDropTargetDetails) dragEvent + AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dragEvent .getDropTargetDetails(); table = (Table) dragEvent.getDropTargetDetails().getTarget(); ArrayList<Object> visibleItemIds = new ArrayList<Object>(table diff --git a/src/com/vaadin/ui/Tree.java b/src/com/vaadin/ui/Tree.java index 670f9d8f2b..7aef155f61 100644 --- a/src/com/vaadin/ui/Tree.java +++ b/src/com/vaadin/ui/Tree.java @@ -32,7 +32,7 @@ import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.DragSource; import com.vaadin.event.dd.DropHandler; import com.vaadin.event.dd.DropTarget; -import com.vaadin.event.dd.DropTargetDetails; +import com.vaadin.event.dd.TargetDetails; import com.vaadin.event.dd.acceptcriteria.ClientCriterion; import com.vaadin.event.dd.acceptcriteria.ClientSideCriterion; import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion; @@ -1122,13 +1122,13 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, } /** - * A {@link DropTargetDetails} implementation with Tree specific api. + * A {@link TargetDetails} implementation with Tree specific api. * * @since 6.3 */ - public class TreeDropTargetDetails extends AbstractSelectDropTargetDetails { + public class TreeTargetDetails extends AbstractSelectTargetDetails { - TreeDropTargetDetails(Map<String, Object> rawVariables) { + TreeTargetDetails(Map<String, Object> rawVariables) { super(rawVariables); } @@ -1211,9 +1211,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * @see * com.vaadin.event.dd.DropTarget#translateDropTargetDetails(java.util.Map) */ - public TreeDropTargetDetails translateDropTargetDetails( + public TreeTargetDetails translateDropTargetDetails( Map<String, Object> clientVariables) { - return new TreeDropTargetDetails(clientVariables); + return new TreeTargetDetails(clientVariables); } /** @@ -1326,7 +1326,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, * .event.dd.DragAndDropEvent) */ public boolean accept(DragAndDropEvent dragEvent) { - AbstractSelectDropTargetDetails dropTargetData = (AbstractSelectDropTargetDetails) dragEvent + AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dragEvent .getDropTargetDetails(); tree = (Tree) dragEvent.getDropTargetDetails().getTarget(); allowedItemIds = getAllowedItemIds(dragEvent, tree); @@ -1392,7 +1392,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, // must be over tree node and in the middle of it (not top or // bottom // part) - TreeDropTargetDetails eventDetails = (TreeDropTargetDetails) dragEvent + TreeTargetDetails eventDetails = (TreeTargetDetails) dragEvent .getDropTargetDetails(); Object itemIdOver = eventDetails.getItemIdOver(); @@ -1451,7 +1451,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, public boolean accept(DragAndDropEvent dragEvent) { try { - TreeDropTargetDetails eventDetails = (TreeDropTargetDetails) dragEvent + TreeTargetDetails eventDetails = (TreeTargetDetails) dragEvent .getDropTargetDetails(); if (eventDetails.getItemIdOver() != null) { |