Overblog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU

This is a bunch of tips and techniques related to Oracle PL/SQL and Forms.

Publicité

Drag 'n Drop

Purpose

Here is a Java bean that allows to Drag 'n Drop between Forms items.

Drag 'n Drop

You can Drag 'n Drop between mono and multi-line text fields and between images.

Because the "real Java" Drag 'n Drop is not implemented in the Forms application, This one is "hand made".
So when you release the mouse button to drop the object, you have to move the mouse about one pixel to
really drop the object.

Press the Ctrl keybord key if you want to keep the original object (COPY).

This demo load the image from the c:/wile.jpg image file, so copy this file from the zip file to your c:/ directory.


The Java code

     DnD.java



The implementation class of the Bean Item

     oracle.forms.fd.DnD




The sample dialog

     . Download the DnD.zip file

     . Unzip the file
     . copy the DnD.jar file in the <ORACLE_HOME>/forms/java directory

     . Edit your /forms/server/formsweb.cfg file to add this jar file
     . Open the DnD.fmb module (Oracle Forms 9.0.2)
     . Compile all and run the module

Publicité
Retour à l'accueil
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article
M
Office furniture like sofas gathers dust particles and grime in the future and maintenance them may be a huge experiment. You can use a unique housekeeping service to unclutter these products. These same exact services at the same time clean upholsteries together with other furnishings. Another theme these products undertake is certainly controlling lousy odors that is the outcome of different hobbies. These services is usually employed meant for pest direction at houses, offices, or anything else. Pests posture immense problems during the offices. Exterminating those using experts is an efficient or sometimes in order out. These products also grant glass Maintenance Services meant for offices utilizing massive glasses or contact lenses mounted on their buildings.
Répondre
U
<br /> <br /> heyy franc this is what is diaplyed in the java console<br /> <br /> <br />  <br /> <br /> <br /> Oracle JInitiator: Version 1.3.1.22<br /> Using JRE version 1.3.1.22-internal Java HotSpot(TM) Client VM<br /> User home directory = C:UsersITD<br /> <br /> Proxy Configuration: no proxy<br /> <br /> JAR cache enabled<br />      Location: C:UsersITDOracle Jar Cache<br />      Maximum size: 50 MB<br />      Compression level: 0<br /> <br /> <br /> <br /> ----------------------------------------------------<br /> c:   clear console window<br /> f:   finalize objects on finalization queue<br /> g:   garbage collect<br /> h:   display this help message<br /> l:   dump classloader list<br /> m:   print memory usage<br /> q:   hide console<br /> s:   dump system properties<br /> t:   dump thread list<br /> x:   clear classloader cache<br /> 0-5: set trace level to <br /> ----------------------------------------------------<br /> <br /> Loading http://itd-pc04:8889/forms/java/frmall_jinit.jar from JAR cache<br /> <br /> Loading http://itd-pc04:8889/forms/java/frmwebutil.jar from JAR cache<br /> <br /> Loading http://itd-pc04:8889/forms/java/jacob.jar from JAR cache<br /> <br /> Loading http://itd-pc04:8889/forms/java/frite_v0.1.jar from JAR cache<br /> <br /> Loading http://itd-pc04:8889/forms/java/FormsGraph.jar from JAR cache<br /> <br /> Loading http://itd-pc04:8889/forms/java/htmlpane.jar from JAR cache<br /> <br /> Loading http://itd-pc04:8889/forms/java/DnD.jar from JAR cache<br /> <br /> proxyHost=null<br /> <br /> proxyPort=0<br /> <br /> connectMode=HTTP, native.<br /> <br /> Forms Applet version is : 10.1.2.0<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> proxyHost=null<br /> <br /> proxyPort=0<br /> <br /> connectMode=HTTP, native.<br /> <br /> Forms Applet version is : 10.1.2.0<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> oracle.dss.util.RowOutOfRangeException: BIB-2013 Row -3 exceeds boundary 4<br /> <br />     at oracle.dss.graph.LocalXMLDataSource.getValue(LocalXMLDataSource.java:362)<br /> <br />     at oracle.forms.demos.bigraph.mViewMouseListener.mouseClicked(mViewMouseListener.java:103)<br /> <br />     at oracle.dss.dataView.ControllerAdapter.processViewMouseEvent(ControllerAdapter.java:447)<br /> <br />     at oracle.dss.graph.GraphControllerAdapter._mouseClicked(GraphControllerAdapter.java:198)<br /> <br />     at oracle.dss.graph.GraphControllerAdapter.perspectiveEvent(GraphControllerAdapter.java:819)<br /> <br />     at tdg.event.TDGEventManager.notifyPerspectiveListener(TDGEventManager.java:94)<br /> <br />     at tdg.Perspective.TDGMouseClicked(Perspective.java:6632)<br /> <br />     at tdg.Perspective.mouseClicked(Perspective.java:6564)<br /> <br />     at java.awt.Component.processMouseEvent(Unknown Source)<br /> <br />     at java.awt.Component.processEvent(Unknown Source)<br /> <br />     at java.awt.Container.processEvent(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Container.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEvent(Unknown Source)<br /> <br />     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._redispatchEvent(Unknown Source)<br /> <br />     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp.mouseClicked(Unknown Source)<br /> <br />     at java.awt.Component.processMouseEvent(Unknown Source)<br /> <br />     at oracle.ewt.lwAWT.LWComponent.processMouseEvent(Unknown Source)<br /> <br />     at java.awt.Component.processEvent(Unknown Source)<br /> <br />     at java.awt.Container.processEvent(Unknown Source)<br /> <br />     at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)<br /> <br />     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Proxy.processEventImpl(Unknown Source)<br /> <br />     at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)<br /> <br />     at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Container.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEvent(Unknown Source)<br /> <br />     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)<br /> <br />     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)<br /> <br />     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)<br /> <br />     at java.awt.Container.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEvent(Unknown Source)<br /> <br />     at java.awt.EventQueue.dispatchEvent(Unknown Source)<br /> <br />     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)<br /> <br />     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)<br /> <br />     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<br /> <br />     at java.awt.EventDispatchThread.run(Unknown Source)<br /> <br /> oracle.dss.util.RowOutOfRangeException: BIB-2013 Row -3 exceeds boundary 4<br /> <br />     at oracle.dss.graph.LocalXMLDataSource.getValue(LocalXMLDataSource.java:362)<br /> <br />     at oracle.forms.demos.bigraph.mViewMouseListener.mouseClicked(mViewMouseListener.java:103)<br /> <br />     at oracle.dss.dataView.ControllerAdapter.processViewMouseEvent(ControllerAdapter.java:447)<br /> <br />     at oracle.dss.graph.GraphControllerAdapter._mouseClicked(GraphControllerAdapter.java:198)<br /> <br />     at oracle.dss.graph.GraphControllerAdapter.perspectiveEvent(GraphControllerAdapter.java:819)<br /> <br />     at tdg.event.TDGEventManager.notifyPerspectiveListener(TDGEventManager.java:94)<br /> <br />     at tdg.Perspective.TDGMouseClicked(Perspective.java:6632)<br /> <br />     at tdg.Perspective.mouseClicked(Perspective.java:6564)<br /> <br />     at java.awt.Component.processMouseEvent(Unknown Source)<br /> <br />     at java.awt.Component.processEvent(Unknown Source)<br /> <br />     at java.awt.Container.processEvent(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Container.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEvent(Unknown Source)<br /> <br />     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._redispatchEvent(Unknown Source)<br /> <br />     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp.mouseClicked(Unknown Source)<br /> <br />     at java.awt.Component.processMouseEvent(Unknown Source)<br /> <br />     at oracle.ewt.lwAWT.LWComponent.processMouseEvent(Unknown Source)<br /> <br />     at java.awt.Component.processEvent(Unknown Source)<br /> <br />     at java.awt.Container.processEvent(Unknown Source)<br /> <br />     at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)<br /> <br />     at oracle.ewt.event.tracking.GlassMouseGrabProvider$Proxy.processEventImpl(Unknown Source)<br /> <br />     at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)<br /> <br />     at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Container.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEvent(Unknown Source)<br /> <br />     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)<br /> <br />     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)<br /> <br />     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)<br /> <br />     at java.awt.Container.dispatchEventImpl(Unknown Source)<br /> <br />     at java.awt.Component.dispatchEvent(Unknown Source)<br /> <br />     at java.awt.EventQueue.dispatchEvent(Unknown Source)<br /> <br />     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)<br /> <br />     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)<br /> <br />     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<br /> <br />     at java.awt.EventDispatchThread.run(Unknown Source)<br /> <br /> proxyHost=null<br /> <br /> proxyPort=0<br /> <br /> connectMode=HTTP, native.<br /> <br /> Forms Applet version is : 10.1.2.0<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> BI Beans Graph version [null] Engine version [null]<br /> <br /> <br /> <br /> <br /> <br />
Répondre
O
<br /> <br /> This error seems to be raised by the BIGraph bean. Nothing to do with the Drag&Drop Java Bean<br /> <br /> <br /> <br />
U
<br /> <br /> Hey franck when i run the form iam getting general exception.pls help <br /> <br /> <br /> <br />
Répondre
O
<br /> <br /> I can do nothing with your information. The first thing to do when you deal with Java Beans, is to see the Java Console content at runtime.<br /> <br /> <br /> <br />
H
<br /> <br /> It's somehow better, because now the form shows up. But the Drag'n'Drop isn't working. I have this error now in the console:<br /> <br /> <br /> java.lang.ClassNotFoundException: oracle.forms.fd.DnD<br />     at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)<br />     at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)<br />     at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)<br />     at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)<br />     at java.lang.ClassLoader.loadClass(Unknown Source)<br />     at java.lang.Class.forName0(Native Method)<br />     at java.lang.Class.forName(Unknown Source)<br />     at oracle.forms.handler.UICommon.instantiate(Unknown Source)<br />     at oracle.forms.handler.UICommon.onCreate(Unknown Source)<br />     at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)<br />     at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)<br />     at oracle.forms.engine.Runform.processMessage(Unknown Source)<br />     at oracle.forms.engine.Runform.processSet(Unknown Source)<br />     at oracle.forms.engine.Runform.onMessageReal(Unknown Source)<br />     at oracle.forms.engine.Runform.onMessage(Unknown Source)<br />     at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)<br />     at oracle.forms.engine.Runform.startRunform(Unknown Source)<br />     at oracle.forms.engine.Main.createRunform(Unknown Source)<br />     at oracle.forms.engine.Main.start(Unknown Source)<br />     at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)<br />     at java.lang.Thread.run(Unknown Source)<br /> <br /> <br /> <br />
Répondre
O
<br /> <br /> This means that the bean is not loaded. Check that you have copied DnD.jar in your /forms/java folder, then added its name to your archive and archive_jini tags<br /> of the /forms/server/formsweb.cfg file.<br /> <br /> <br /> <br />
H
<br /> <br /> The error is:<br /> <br /> <br /> Exception in thread "thread applet-oracle.forms.engine.Main-3" java.lang.NoSuchMethodError: oracle.forms.handler.IHandler.getApplet()Ljava/applet/Applet;<br />     at oracle.forms.fd.DnD.init(DnD.java:40)<br />     at oracle.forms.handler.UICommon.instantiate(Unknown Source)<br />     at oracle.forms.handler.UICommon.onCreate(Unknown Source)<br />     at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)<br />     at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)<br />     at oracle.forms.engine.Runform.processMessage(Unknown Source)<br />     at oracle.forms.engine.Runform.processSet(Unknown Source)<br />     at oracle.forms.engine.Runform.onMessageReal(Unknown Source)<br />     at oracle.forms.engine.Runform.onMessage(Unknown Source)<br />     at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)<br />     at oracle.forms.engine.Runform.startRunform(Unknown Source)<br />     at oracle.forms.engine.Main.createRunform(Unknown Source)<br />     at oracle.forms.engine.Main.start(Unknown Source)<br />     at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)<br />     at java.lang.Thread.run(Unknown Source)<br /> <br /> <br /> <br /> <br />
Répondre
O
<br /> <br /> I have uploaded a new DnD.zip on the site. download it to extract the new DnD.jar, then try this new JAR.<br /> <br /> <br /> <br />