summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/gnu/java/awt/dnd
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/gnu/java/awt/dnd')
-rw-r--r--libjava/classpath/gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java20
-rw-r--r--libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java26
-rw-r--r--libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java4
-rw-r--r--libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java2
4 files changed, 26 insertions, 26 deletions
diff --git a/libjava/classpath/gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java b/libjava/classpath/gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java
index 1f0c3ad2da6..4ef8c29188c 100644
--- a/libjava/classpath/gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java
+++ b/libjava/classpath/gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java
@@ -59,28 +59,28 @@ public class GtkMouseDragGestureRecognizer
{
this (ds, c, 0, null);
}
-
+
public GtkMouseDragGestureRecognizer (DragSource ds, Component c, int act)
{
this(ds, c, act, null);
}
-
+
public GtkMouseDragGestureRecognizer (DragSource ds, Component c, int act,
DragGestureListener dgl)
{
super(ds, c, act, dgl);
}
-
+
public void registerListeners ()
{
super.registerListeners();
}
-
+
public void unregisterListeners ()
{
super.unregisterListeners();
}
-
+
public void mouseClicked (MouseEvent e)
{
// Nothing to do here.
@@ -115,7 +115,7 @@ public class GtkMouseDragGestureRecognizer
if (!events.isEmpty())
{
int act = getDropActionFromEvent(e);
-
+
if (act == DnDConstants.ACTION_NONE)
return;
@@ -124,14 +124,14 @@ public class GtkMouseDragGestureRecognizer
int dx = Math.abs(origin.x - current.x);
int dy = Math.abs(origin.y - current.y);
int threshold = DragSource.getDragThreshold();
-
+
if (dx > threshold || dy > threshold)
fireDragGestureRecognized(act, origin);
else
appendEvent(e);
}
}
-
+
public void mouseMoved (MouseEvent e)
{
// Nothing to do here.
@@ -142,10 +142,10 @@ public class GtkMouseDragGestureRecognizer
int modEx = e.getModifiersEx();
int buttons = modEx & (MouseEvent.BUTTON1_DOWN_MASK
| MouseEvent.BUTTON2_DOWN_MASK | MouseEvent.BUTTON3_DOWN_MASK);
- if (!(buttons == MouseEvent.BUTTON1_DOWN_MASK ||
+ if (!(buttons == MouseEvent.BUTTON1_DOWN_MASK ||
buttons == MouseEvent.BUTTON2_DOWN_MASK))
return DnDConstants.ACTION_NONE;
-
+
// Convert modifier to a drop action
int sourceActions = getSourceActions();
int mod = modEx
diff --git a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java
index b68fa105803..4d109762615 100644
--- a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java
+++ b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java
@@ -62,54 +62,54 @@ public class GtkDragSourceContextPeer
private Cursor cursor;
private DragSourceContext context;
public static Component target;
-
+
native void nativeStartDrag(Image i, int x, int y, int action, String target);
native void connectSignals(ComponentPeer comp);
native void create(ComponentPeer comp);
native void nativeSetCursor(int cursor);
native void setTarget(GtkDropTargetContextPeer target);
-
+
public GtkDragSourceContextPeer(DragGestureEvent e)
{
super(e.getComponent());
Component comp = e.getComponent();
peer = getComponentPeer(comp);
-
+
create(peer);
connectSignals(peer);
cursor = comp.getCursor();
-
+
// FIXME: Where do we set the target?
-
+
if ((target != null))
setTarget(new GtkDropTargetContextPeer(target));
}
-
+
ComponentPeer getComponentPeer(Component c)
{
if (c == null)
return null;
-
+
Component curr = c;
while (curr.getPeer() instanceof LightweightPeer)
curr = curr.getParent();
-
+
if (curr != null)
return curr.getPeer();
return null;
}
-
+
public void startDrag(DragSourceContext context, Cursor c, Image i, Point p)
throws InvalidDnDOperationException
- {
+ {
this.context = context;
if (p == null)
p = new Point();
-
+
// FIXME: use proper DataFlavor, not "text/plain".
// Also, add check to determine if dragging.
-
+
setCursor(c);
nativeStartDrag(i, p.x, p.y, context.getTrigger().getDragAction(),
"text/plain");
@@ -133,7 +133,7 @@ public class GtkDragSourceContextPeer
{
// Nothing to do here.
}
-
+
/**
* Called from native code.
*/
diff --git a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java
index f24b3f39bcb..315a2bdf150 100644
--- a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java
+++ b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java
@@ -50,12 +50,12 @@ public class GtkDropTargetContextPeer
extends GtkGenericPeer
implements DropTargetContextPeer
{
-
+
public GtkDropTargetContextPeer(Object obj)
{
super(obj);
}
-
+
public void setTargetActions(int actions)
{
// FIXME: Not Implemented
diff --git a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java
index 88b75ad96ee..0799df5ba08 100644
--- a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java
+++ b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java
@@ -52,7 +52,7 @@ public class GtkDropTargetPeer
{
super(null);
}
-
+
public void addDropTarget(DropTarget target)
{
// FIXME: Not Implemented
OpenPOWER on IntegriCloud