KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > jsf > navigation > graph > actions > PageFlowAcceptProvider


1 /*
2  * PageFlowAcceptProvider.java
3  *
4  * Created on March 5, 2007, 1:08 PM
5  *
6  * To change this template, choose Tools | Template Manager
7  * and open the template in the editor.
8  */

9
10 package org.netbeans.modules.web.jsf.navigation.graph.actions;
11
12 import java.awt.Point JavaDoc;
13 import java.awt.datatransfer.DataFlavor JavaDoc;
14 import java.awt.datatransfer.Transferable JavaDoc;
15 import org.netbeans.api.visual.action.AcceptProvider;
16 import org.netbeans.api.visual.action.ConnectorState;
17 import org.netbeans.api.visual.widget.Widget;
18
19 /**
20  *
21  * @author joelle
22  */

23 public class PageFlowAcceptProvider implements AcceptProvider {
24     
25     /** Creates a new instance of PageFlowAcceptProvider */
26     public PageFlowAcceptProvider() {
27     }
28
29     public ConnectorState isAcceptable(Widget widget, Point JavaDoc point, Transferable JavaDoc transferable) {
30         
31         System.out.print("\nPageFlowAcceptProvider: IS ACCEPTABLE HAS BEEN CALLED.");
32         System.out.println("Widget: " + widget);
33         System.out.println("Point: " + point);
34         System.out.println("Transferable: " + transferable);
35         DataFlavor JavaDoc[] dfs = transferable.getTransferDataFlavors();
36         for( DataFlavor JavaDoc flavor: dfs){
37             System.out.println("Data Flavor: " + flavor);
38         }
39         return ConnectorState.REJECT_AND_STOP;
40     }
41
42     public void accept(Widget widget, Point JavaDoc point, Transferable JavaDoc transferable) {
43     }
44     
45 }
46
Popular Tags