< prev index next >
src/java.desktop/share/classes/java/awt/dnd/DropTarget.java
Print this page
*** 52,93 ****
import sun.awt.AWTAccessor;
import sun.awt.AWTAccessor.ComponentAccessor;
/**
! * The <code>DropTarget</code> is associated
! * with a <code>Component</code> when that <code>Component</code>
* wishes
* to accept drops during Drag and Drop operations.
* <P>
* Each
! * <code>DropTarget</code> is associated with a <code>FlavorMap</code>.
! * The default <code>FlavorMap</code> hereafter designates the
! * <code>FlavorMap</code> returned by <code>SystemFlavorMap.getDefaultFlavorMap()</code>.
*
* @since 1.2
*/
public class DropTarget implements DropTargetListener, Serializable {
private static final long serialVersionUID = -6283860791671019047L;
/**
! * Creates a new DropTarget given the <code>Component</code>
! * to associate itself with, an <code>int</code> representing
* the default acceptable action(s) to
! * support, a <code>DropTargetListener</code>
! * to handle event processing, a <code>boolean</code> indicating
! * if the <code>DropTarget</code> is currently accepting drops, and
! * a <code>FlavorMap</code> to use (or null for the default <CODE>FlavorMap</CODE>).
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The <code>Component</code> with which this <code>DropTarget</code> is associated
! * @param ops The default acceptable actions for this <code>DropTarget</code>
! * @param dtl The <code>DropTargetListener</code> for this <code>DropTarget</code>
! * @param act Is the <code>DropTarget</code> accepting drops.
! * @param fm The <code>FlavorMap</code> to use, or null for the default <CODE>FlavorMap</CODE>
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget(Component c, int ops, DropTargetListener dtl,
--- 52,93 ----
import sun.awt.AWTAccessor;
import sun.awt.AWTAccessor.ComponentAccessor;
/**
! * The {@code DropTarget} is associated
! * with a {@code Component} when that {@code Component}
* wishes
* to accept drops during Drag and Drop operations.
* <P>
* Each
! * {@code DropTarget} is associated with a {@code FlavorMap}.
! * The default {@code FlavorMap} hereafter designates the
! * {@code FlavorMap} returned by {@code SystemFlavorMap.getDefaultFlavorMap()}.
*
* @since 1.2
*/
public class DropTarget implements DropTargetListener, Serializable {
private static final long serialVersionUID = -6283860791671019047L;
/**
! * Creates a new DropTarget given the {@code Component}
! * to associate itself with, an {@code int} representing
* the default acceptable action(s) to
! * support, a {@code DropTargetListener}
! * to handle event processing, a {@code boolean} indicating
! * if the {@code DropTarget} is currently accepting drops, and
! * a {@code FlavorMap} to use (or null for the default {@code FlavorMap}).
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The {@code Component} with which this {@code DropTarget} is associated
! * @param ops The default acceptable actions for this {@code DropTarget}
! * @param dtl The {@code DropTargetListener} for this {@code DropTarget}
! * @param act Is the {@code DropTarget} accepting drops.
! * @param fm The {@code FlavorMap} to use, or null for the default {@code FlavorMap}
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget(Component c, int ops, DropTargetListener dtl,
*** 119,140 ****
flavorMap = SystemFlavorMap.getDefaultFlavorMap();
}
}
/**
! * Creates a <code>DropTarget</code> given the <code>Component</code>
! * to associate itself with, an <code>int</code> representing
* the default acceptable action(s)
! * to support, a <code>DropTargetListener</code>
! * to handle event processing, and a <code>boolean</code> indicating
! * if the <code>DropTarget</code> is currently accepting drops.
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The <code>Component</code> with which this <code>DropTarget</code> is associated
! * @param ops The default acceptable actions for this <code>DropTarget</code>
! * @param dtl The <code>DropTargetListener</code> for this <code>DropTarget</code>
! * @param act Is the <code>DropTarget</code> accepting drops.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget(Component c, int ops, DropTargetListener dtl,
--- 119,140 ----
flavorMap = SystemFlavorMap.getDefaultFlavorMap();
}
}
/**
! * Creates a {@code DropTarget} given the {@code Component}
! * to associate itself with, an {@code int} representing
* the default acceptable action(s)
! * to support, a {@code DropTargetListener}
! * to handle event processing, and a {@code boolean} indicating
! * if the {@code DropTarget} is currently accepting drops.
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The {@code Component} with which this {@code DropTarget} is associated
! * @param ops The default acceptable actions for this {@code DropTarget}
! * @param dtl The {@code DropTargetListener} for this {@code DropTarget}
! * @param act Is the {@code DropTarget} accepting drops.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget(Component c, int ops, DropTargetListener dtl,
*** 143,169 ****
{
this(c, ops, dtl, act, null);
}
/**
! * Creates a <code>DropTarget</code>.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget() throws HeadlessException {
this(null, DnDConstants.ACTION_COPY_OR_MOVE, null, true, null);
}
/**
! * Creates a <code>DropTarget</code> given the <code>Component</code>
! * to associate itself with, and the <code>DropTargetListener</code>
* to handle event processing.
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The <code>Component</code> with which this <code>DropTarget</code> is associated
! * @param dtl The <code>DropTargetListener</code> for this <code>DropTarget</code>
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget(Component c, DropTargetListener dtl)
--- 143,169 ----
{
this(c, ops, dtl, act, null);
}
/**
! * Creates a {@code DropTarget}.
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget() throws HeadlessException {
this(null, DnDConstants.ACTION_COPY_OR_MOVE, null, true, null);
}
/**
! * Creates a {@code DropTarget} given the {@code Component}
! * to associate itself with, and the {@code DropTargetListener}
* to handle event processing.
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The {@code Component} with which this {@code DropTarget} is associated
! * @param dtl The {@code DropTargetListener} for this {@code DropTarget}
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget(Component c, DropTargetListener dtl)
*** 171,189 ****
{
this(c, DnDConstants.ACTION_COPY_OR_MOVE, dtl, true, null);
}
/**
! * Creates a <code>DropTarget</code> given the <code>Component</code>
! * to associate itself with, an <code>int</code> representing
* the default acceptable action(s) to support, and a
! * <code>DropTargetListener</code> to handle event processing.
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The <code>Component</code> with which this <code>DropTarget</code> is associated
! * @param ops The default acceptable actions for this <code>DropTarget</code>
! * @param dtl The <code>DropTargetListener</code> for this <code>DropTarget</code>
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget(Component c, int ops, DropTargetListener dtl)
--- 171,189 ----
{
this(c, DnDConstants.ACTION_COPY_OR_MOVE, dtl, true, null);
}
/**
! * Creates a {@code DropTarget} given the {@code Component}
! * to associate itself with, an {@code int} representing
* the default acceptable action(s) to support, and a
! * {@code DropTargetListener} to handle event processing.
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The {@code Component} with which this {@code DropTarget} is associated
! * @param ops The default acceptable actions for this {@code DropTarget}
! * @param dtl The {@code DropTargetListener} for this {@code DropTarget}
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
* returns true
* @see java.awt.GraphicsEnvironment#isHeadless
*/
public DropTarget(Component c, int ops, DropTargetListener dtl)
*** 193,207 ****
}
/**
* Note: this interface is required to permit the safe association
* of a DropTarget with a Component in one of two ways, either:
! * <code> component.setDropTarget(droptarget); </code>
! * or <code> droptarget.setComponent(component); </code>
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The new <code>Component</code> this <code>DropTarget</code>
* is to be associated with.
*/
public synchronized void setComponent(Component c) {
if (component == c || component != null && component.equals(c))
--- 193,207 ----
}
/**
* Note: this interface is required to permit the safe association
* of a DropTarget with a Component in one of two ways, either:
! * {@code component.setDropTarget(droptarget);}
! * or {@code droptarget.setComponent(component);}
* <P>
* The Component will receive drops only if it is enabled.
! * @param c The new {@code Component} this {@code DropTarget}
* is to be associated with.
*/
public synchronized void setComponent(Component c) {
if (component == c || component != null && component.equals(c))
*** 227,248 ****
}
}
}
/**
! * Gets the <code>Component</code> associated
! * with this <code>DropTarget</code>.
*
! * @return the current <code>Component</code>
*/
public synchronized Component getComponent() {
return component;
}
/**
! * Sets the default acceptable actions for this <code>DropTarget</code>
*
* @param ops the default actions
* @see java.awt.dnd.DnDConstants
*/
--- 227,248 ----
}
}
}
/**
! * Gets the {@code Component} associated
! * with this {@code DropTarget}.
*
! * @return the current {@code Component}
*/
public synchronized Component getComponent() {
return component;
}
/**
! * Sets the default acceptable actions for this {@code DropTarget}
*
* @param ops the default actions
* @see java.awt.dnd.DnDConstants
*/
*** 257,281 ****
void doSetDefaultActions(int ops) {
actions = ops;
}
/**
! * Gets an <code>int</code> representing the
! * current action(s) supported by this <code>DropTarget</code>.
*
* @return the current default actions
*/
public int getDefaultActions() {
return actions;
}
/**
! * Sets the DropTarget active if <code>true</code>,
! * inactive if <code>false</code>.
*
! * @param isActive sets the <code>DropTarget</code> (in)active.
*/
public synchronized void setActive(boolean isActive) {
if (isActive != active) {
active = isActive;
--- 257,281 ----
void doSetDefaultActions(int ops) {
actions = ops;
}
/**
! * Gets an {@code int} representing the
! * current action(s) supported by this {@code DropTarget}.
*
* @return the current default actions
*/
public int getDefaultActions() {
return actions;
}
/**
! * Sets the DropTarget active if {@code true},
! * inactive if {@code false}.
*
! * @param isActive sets the {@code DropTarget} (in)active.
*/
public synchronized void setActive(boolean isActive) {
if (isActive != active) {
active = isActive;
*** 284,311 ****
if (!active) clearAutoscroll();
}
/**
* Reports whether or not
! * this <code>DropTarget</code>
* is currently active (ready to accept drops).
*
! * @return <CODE>true</CODE> if active, <CODE>false</CODE> if not
*/
public boolean isActive() {
return active;
}
/**
! * Adds a new <code>DropTargetListener</code> (UNICAST SOURCE).
*
! * @param dtl The new <code>DropTargetListener</code>
*
* @throws TooManyListenersException if a
! * <code>DropTargetListener</code> is already added to this
! * <code>DropTarget</code>.
*/
public synchronized void addDropTargetListener(DropTargetListener dtl) throws TooManyListenersException {
if (dtl == null) return;
--- 284,311 ----
if (!active) clearAutoscroll();
}
/**
* Reports whether or not
! * this {@code DropTarget}
* is currently active (ready to accept drops).
*
! * @return {@code true} if active, {@code false} if not
*/
public boolean isActive() {
return active;
}
/**
! * Adds a new {@code DropTargetListener} (UNICAST SOURCE).
*
! * @param dtl The new {@code DropTargetListener}
*
* @throws TooManyListenersException if a
! * {@code DropTargetListener} is already added to this
! * {@code DropTarget}.
*/
public synchronized void addDropTargetListener(DropTargetListener dtl) throws TooManyListenersException {
if (dtl == null) return;
*** 316,326 ****
else
throw new TooManyListenersException();
}
/**
! * Removes the current <code>DropTargetListener</code> (UNICAST SOURCE).
*
* @param dtl the DropTargetListener to deregister.
*/
public synchronized void removeDropTargetListener(DropTargetListener dtl) {
--- 316,326 ----
else
throw new TooManyListenersException();
}
/**
! * Removes the current {@code DropTargetListener} (UNICAST SOURCE).
*
* @param dtl the DropTargetListener to deregister.
*/
public synchronized void removeDropTargetListener(DropTargetListener dtl) {
*** 331,350 ****
throw new IllegalArgumentException("listener mismatch");
}
}
/**
! * Calls <code>dragEnter</code> on the registered
! * <code>DropTargetListener</code> and passes it
! * the specified <code>DropTargetDragEvent</code>.
! * Has no effect if this <code>DropTarget</code>
* is not active.
*
! * @param dtde the <code>DropTargetDragEvent</code>
*
! * @throws NullPointerException if this <code>DropTarget</code>
! * is active and <code>dtde</code> is <code>null</code>
*
* @see #isActive
*/
public synchronized void dragEnter(DropTargetDragEvent dtde) {
isDraggingInside = true;
--- 331,350 ----
throw new IllegalArgumentException("listener mismatch");
}
}
/**
! * Calls {@code dragEnter} on the registered
! * {@code DropTargetListener} and passes it
! * the specified {@code DropTargetDragEvent}.
! * Has no effect if this {@code DropTarget}
* is not active.
*
! * @param dtde the {@code DropTargetDragEvent}
*
! * @throws NullPointerException if this {@code DropTarget}
! * is active and {@code dtde} is {@code null}
*
* @see #isActive
*/
public synchronized void dragEnter(DropTargetDragEvent dtde) {
isDraggingInside = true;
*** 358,377 ****
initializeAutoscrolling(dtde.getLocation());
}
/**
! * Calls <code>dragOver</code> on the registered
! * <code>DropTargetListener</code> and passes it
! * the specified <code>DropTargetDragEvent</code>.
! * Has no effect if this <code>DropTarget</code>
* is not active.
*
! * @param dtde the <code>DropTargetDragEvent</code>
*
! * @throws NullPointerException if this <code>DropTarget</code>
! * is active and <code>dtde</code> is <code>null</code>
*
* @see #isActive
*/
public synchronized void dragOver(DropTargetDragEvent dtde) {
if (!active) return;
--- 358,377 ----
initializeAutoscrolling(dtde.getLocation());
}
/**
! * Calls {@code dragOver} on the registered
! * {@code DropTargetListener} and passes it
! * the specified {@code DropTargetDragEvent}.
! * Has no effect if this {@code DropTarget}
* is not active.
*
! * @param dtde the {@code DropTargetDragEvent}
*
! * @throws NullPointerException if this {@code DropTarget}
! * is active and {@code dtde} is {@code null}
*
* @see #isActive
*/
public synchronized void dragOver(DropTargetDragEvent dtde) {
if (!active) return;
*** 380,399 ****
updateAutoscroll(dtde.getLocation());
}
/**
! * Calls <code>dropActionChanged</code> on the registered
! * <code>DropTargetListener</code> and passes it
! * the specified <code>DropTargetDragEvent</code>.
! * Has no effect if this <code>DropTarget</code>
* is not active.
*
! * @param dtde the <code>DropTargetDragEvent</code>
*
! * @throws NullPointerException if this <code>DropTarget</code>
! * is active and <code>dtde</code> is <code>null</code>
*
* @see #isActive
*/
public synchronized void dropActionChanged(DropTargetDragEvent dtde) {
if (!active) return;
--- 380,399 ----
updateAutoscroll(dtde.getLocation());
}
/**
! * Calls {@code dropActionChanged} on the registered
! * {@code DropTargetListener} and passes it
! * the specified {@code DropTargetDragEvent}.
! * Has no effect if this {@code DropTarget}
* is not active.
*
! * @param dtde the {@code DropTargetDragEvent}
*
! * @throws NullPointerException if this {@code DropTarget}
! * is active and {@code dtde} is {@code null}
*
* @see #isActive
*/
public synchronized void dropActionChanged(DropTargetDragEvent dtde) {
if (!active) return;
*** 402,422 ****
updateAutoscroll(dtde.getLocation());
}
/**
! * Calls <code>dragExit</code> on the registered
! * <code>DropTargetListener</code> and passes it
! * the specified <code>DropTargetEvent</code>.
! * Has no effect if this <code>DropTarget</code>
* is not active.
* <p>
* This method itself does not throw any exception
* for null parameter but for exceptions thrown by
* the respective method of the listener.
*
! * @param dte the <code>DropTargetEvent</code>
*
* @see #isActive
*/
public synchronized void dragExit(DropTargetEvent dte) {
isDraggingInside = false;
--- 402,422 ----
updateAutoscroll(dtde.getLocation());
}
/**
! * Calls {@code dragExit} on the registered
! * {@code DropTargetListener} and passes it
! * the specified {@code DropTargetEvent}.
! * Has no effect if this {@code DropTarget}
* is not active.
* <p>
* This method itself does not throw any exception
* for null parameter but for exceptions thrown by
* the respective method of the listener.
*
! * @param dte the {@code DropTargetEvent}
*
* @see #isActive
*/
public synchronized void dragExit(DropTargetEvent dte) {
isDraggingInside = false;
*** 427,447 ****
clearAutoscroll();
}
/**
! * Calls <code>drop</code> on the registered
! * <code>DropTargetListener</code> and passes it
! * the specified <code>DropTargetDropEvent</code>
! * if this <code>DropTarget</code> is active.
*
! * @param dtde the <code>DropTargetDropEvent</code>
*
! * @throws NullPointerException if <code>dtde</code> is null
* and at least one of the following is true: this
! * <code>DropTarget</code> is not active, or there is
! * no a <code>DropTargetListener</code> registered.
*
* @see #isActive
*/
public synchronized void drop(DropTargetDropEvent dtde) {
isDraggingInside = false;
--- 427,447 ----
clearAutoscroll();
}
/**
! * Calls {@code drop} on the registered
! * {@code DropTargetListener} and passes it
! * the specified {@code DropTargetDropEvent}
! * if this {@code DropTarget} is active.
*
! * @param dtde the {@code DropTargetDropEvent}
*
! * @throws NullPointerException if {@code dtde} is null
* and at least one of the following is true: this
! * {@code DropTarget} is not active, or there is
! * no a {@code DropTargetListener} registered.
*
* @see #isActive
*/
public synchronized void drop(DropTargetDropEvent dtde) {
isDraggingInside = false;
*** 454,479 ****
dtde.rejectDrop();
}
}
/**
! * Gets the <code>FlavorMap</code>
! * associated with this <code>DropTarget</code>.
! * If no <code>FlavorMap</code> has been set for this
! * <code>DropTarget</code>, it is associated with the default
! * <code>FlavorMap</code>.
*
* @return the FlavorMap for this DropTarget
*/
public FlavorMap getFlavorMap() { return flavorMap; }
/**
! * Sets the <code>FlavorMap</code> associated
! * with this <code>DropTarget</code>.
*
! * @param fm the new <code>FlavorMap</code>, or null to
* associate the default FlavorMap with this DropTarget.
*/
public void setFlavorMap(FlavorMap fm) {
flavorMap = fm == null ? SystemFlavorMap.getDefaultFlavorMap() : fm;
--- 454,479 ----
dtde.rejectDrop();
}
}
/**
! * Gets the {@code FlavorMap}
! * associated with this {@code DropTarget}.
! * If no {@code FlavorMap} has been set for this
! * {@code DropTarget}, it is associated with the default
! * {@code FlavorMap}.
*
* @return the FlavorMap for this DropTarget
*/
public FlavorMap getFlavorMap() { return flavorMap; }
/**
! * Sets the {@code FlavorMap} associated
! * with this {@code DropTarget}.
*
! * @param fm the new {@code FlavorMap}, or null to
* associate the default FlavorMap with this DropTarget.
*/
public void setFlavorMap(FlavorMap fm) {
flavorMap = fm == null ? SystemFlavorMap.getDefaultFlavorMap() : fm;
*** 542,555 ****
}
}
}
/**
! * Gets the <code>DropTargetContext</code> associated
! * with this <code>DropTarget</code>.
*
! * @return the <code>DropTargetContext</code> associated with this <code>DropTarget</code>.
*/
public DropTargetContext getDropTargetContext() {
return dropTargetContext;
}
--- 542,555 ----
}
}
}
/**
! * Gets the {@code DropTargetContext} associated
! * with this {@code DropTarget}.
*
! * @return the {@code DropTargetContext} associated with this {@code DropTarget}.
*/
public DropTargetContext getDropTargetContext() {
return dropTargetContext;
}
*** 569,603 ****
protected DropTargetContext createDropTargetContext() {
return new DropTargetContext(this);
}
/**
! * Serializes this <code>DropTarget</code>. Performs default serialization,
! * and then writes out this object's <code>DropTargetListener</code> if and
! * only if it can be serialized. If not, <code>null</code> is written
* instead.
*
* @serialData The default serializable fields, in alphabetical order,
! * followed by either a <code>DropTargetListener</code>
! * instance, or <code>null</code>.
* @since 1.4
*/
private void writeObject(ObjectOutputStream s) throws IOException {
s.defaultWriteObject();
s.writeObject(SerializationTester.test(dtListener)
? dtListener : null);
}
/**
! * Deserializes this <code>DropTarget</code>. This method first performs
! * default deserialization for all non-<code>transient</code> fields. An
* attempt is then made to deserialize this object's
! * <code>DropTargetListener</code> as well. This is first attempted by
! * deserializing the field <code>dtListener</code>, because, in releases
! * prior to 1.4, a non-<code>transient</code> field of this name stored the
! * <code>DropTargetListener</code>. If this fails, the next object in the
* stream is used instead.
*
* @since 1.4
*/
private void readObject(ObjectInputStream s)
--- 569,603 ----
protected DropTargetContext createDropTargetContext() {
return new DropTargetContext(this);
}
/**
! * Serializes this {@code DropTarget}. Performs default serialization,
! * and then writes out this object's {@code DropTargetListener} if and
! * only if it can be serialized. If not, {@code null} is written
* instead.
*
* @serialData The default serializable fields, in alphabetical order,
! * followed by either a {@code DropTargetListener}
! * instance, or {@code null}.
* @since 1.4
*/
private void writeObject(ObjectOutputStream s) throws IOException {
s.defaultWriteObject();
s.writeObject(SerializationTester.test(dtListener)
? dtListener : null);
}
/**
! * Deserializes this {@code DropTarget}. This method first performs
! * default deserialization for all non-{@code transient} fields. An
* attempt is then made to deserialize this object's
! * {@code DropTargetListener} as well. This is first attempted by
! * deserializing the field {@code dtListener}, because, in releases
! * prior to 1.4, a non-{@code transient} field of this name stored the
! * {@code DropTargetListener}. If this fails, the next object in the
* stream is used instead.
*
* @since 1.4
*/
private void readObject(ObjectInputStream s)
*** 637,648 ****
protected static class DropTargetAutoScroller implements ActionListener {
/**
* construct a DropTargetAutoScroller
*
! * @param c the <code>Component</code>
! * @param p the <code>Point</code>
*/
protected DropTargetAutoScroller(Component c, Point p) {
super();
--- 637,648 ----
protected static class DropTargetAutoScroller implements ActionListener {
/**
* construct a DropTargetAutoScroller
*
! * @param c the {@code Component}
! * @param p the {@code Point}
*/
protected DropTargetAutoScroller(Component c, Point p) {
super();
*** 707,717 ****
}
/**
* cause autoscroll to occur
*
! * @param newLocn the <code>Point</code>
*/
protected synchronized void updateLocation(Point newLocn) {
prev = locn;
locn = newLocn;
--- 707,717 ----
}
/**
* cause autoscroll to occur
*
! * @param newLocn the {@code Point}
*/
protected synchronized void updateLocation(Point newLocn) {
prev = locn;
locn = newLocn;
*** 731,741 ****
protected void stop() { timer.stop(); }
/**
* cause autoscroll to occur
*
! * @param e the <code>ActionEvent</code>
*/
public synchronized void actionPerformed(ActionEvent e) {
updateRegion();
--- 731,741 ----
protected void stop() { timer.stop(); }
/**
* cause autoscroll to occur
*
! * @param e the {@code ActionEvent}
*/
public synchronized void actionPerformed(ActionEvent e) {
updateRegion();
*** 764,786 ****
/*********************************************************************/
/**
* create an embedded autoscroller
*
! * @param c the <code>Component</code>
! * @param p the <code>Point</code>
* @return an embedded autoscroller
*/
protected DropTargetAutoScroller createDropTargetAutoScroller(Component c, Point p) {
return new DropTargetAutoScroller(c, p);
}
/**
* initialize autoscrolling
*
! * @param p the <code>Point</code>
*/
protected void initializeAutoscrolling(Point p) {
if (component == null || !(component instanceof Autoscroll)) return;
--- 764,786 ----
/*********************************************************************/
/**
* create an embedded autoscroller
*
! * @param c the {@code Component}
! * @param p the {@code Point}
* @return an embedded autoscroller
*/
protected DropTargetAutoScroller createDropTargetAutoScroller(Component c, Point p) {
return new DropTargetAutoScroller(c, p);
}
/**
* initialize autoscrolling
*
! * @param p the {@code Point}
*/
protected void initializeAutoscrolling(Point p) {
if (component == null || !(component instanceof Autoscroll)) return;
*** 788,798 ****
}
/**
* update autoscrolling with current cursor location
*
! * @param dragCursorLocn the <code>Point</code>
*/
protected void updateAutoscroll(Point dragCursorLocn) {
if (autoScroller != null) autoScroller.updateLocation(dragCursorLocn);
}
--- 788,798 ----
}
/**
* update autoscrolling with current cursor location
*
! * @param dragCursorLocn the {@code Point}
*/
protected void updateAutoscroll(Point dragCursorLocn) {
if (autoScroller != null) autoScroller.updateLocation(dragCursorLocn);
}
*** 841,851 ****
* @serial
*/
int actions = DnDConstants.ACTION_COPY_OR_MOVE;
/**
! * <code>true</code> if the DropTarget is accepting Drag & Drop operations.
*
* @serial
*/
boolean active = true;
--- 841,851 ----
* @serial
*/
int actions = DnDConstants.ACTION_COPY_OR_MOVE;
/**
! * {@code true} if the DropTarget is accepting Drag & Drop operations.
*
* @serial
*/
boolean active = true;
< prev index next >