Author: mareshkau
Date: 2007-08-29 10:28:39 -0400 (Wed, 29 Aug 2007)
New Revision: 3404
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-743
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-08-29
14:12:00 UTC (rev 3403)
+++
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-08-29
14:28:39 UTC (rev 3404)
@@ -40,9 +40,7 @@
private static final String CID_SUPPORTSSTRING =
"(a)mozilla.org/supports-string;1";
private static final String CID_SUPPORTSARRAY =
"(a)mozilla.org/supports-array;1";
-
- private static final String kVpeModelFlavor = "vpe/model";
- private static final String kVpeModelTransport ="vpe/model";
+
/**
* service manager */
private nsIServiceManager serviceManager;
@@ -98,10 +96,10 @@
*/
private nsITransferable createTransferable() {
- nsITransferable iTransferable = (nsITransferable) componentManager
+ nsITransferable iTransferable = (nsITransferable) getComponentManager()
.createInstanceByContractID(CID_TRANSFERABLE, null,
nsITransferable.NS_ITRANSFERABLE_IID);
- nsISupportsString transferData = (nsISupportsString) componentManager
+ nsISupportsString transferData = (nsISupportsString) getComponentManager()
.createInstanceByContractID(CID_SUPPORTSSTRING, null,
nsISupportsString.NS_ISUPPORTSSTRING_IID);
String data="vpe-element";
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-29
14:12:00 UTC (rev 3403)
+++
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-08-29
14:28:39 UTC (rev 3404)
@@ -58,14 +58,18 @@
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
import org.mozilla.interfaces.nsIDOMAttr;
+import org.mozilla.interfaces.nsIDOMChromeWindow;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMEventGroup;
import org.mozilla.interfaces.nsIDOMEventTarget;
import org.mozilla.interfaces.nsIDOMMouseEvent;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.interfaces.nsIDOMRange;
import org.mozilla.interfaces.nsIDOMText;
+import org.mozilla.interfaces.nsIEventTarget;
+import org.mozilla.interfaces.nsIWebBrowserChrome;
import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
@@ -1441,11 +1445,11 @@
void setMoveCursor(nsIDOMMouseEvent mouseEvent) {
nsIDOMElement selectedElement = xulRunnerEditor.getLastSelectedElement();
-
if (selectedElement != null && canInnerDrag(selectedElement)) {
if (inDragArea(getNodeBounds(selectedElement),
VisualDomUtil.getMousePoint(mouseEvent))) {
- // TODO Max Areshkau add DnD support
- //dnd.setMoveCursor();
+ //change cursor
+ Cursor cursor1= new Cursor(xulRunnerEditor.getDisplay(),SWT.CURSOR_SIZEALL);
+ xulRunnerEditor.setCursor(cursor1);
}
}
}