Java 类java.awt.dnd.DragGestureListener 实例源码

项目:OpenJSharp    文件:WToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c, int srcActions,
                                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(abstractRecognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass))
        return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:OpenJSharp    文件:XToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizerClass,
                DragSource ds,
                Component c,
                int srcActions,
                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(recognizerClass))
        return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:jdk8u-jdk    文件:WToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c, int srcActions,
                                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(abstractRecognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass))
        return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:jdk8u-jdk    文件:XToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizerClass,
                DragSource ds,
                Component c,
                int srcActions,
                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(recognizerClass))
        return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:openjdk-jdk10    文件:XToolkit.java   
@Override
@SuppressWarnings("unchecked")
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizerClass,
                DragSource ds,
                Component c,
                int srcActions,
                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(recognizerClass))
        return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:openjdk-jdk10    文件:WToolkit.java   
@Override
@SuppressWarnings("unchecked")
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c, int srcActions,
                                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(abstractRecognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass))
        return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:openjdk9    文件:XToolkit.java   
@Override
@SuppressWarnings("unchecked")
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizerClass,
                DragSource ds,
                Component c,
                int srcActions,
                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(recognizerClass))
        return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:openjdk9    文件:WToolkit.java   
@Override
@SuppressWarnings("unchecked")
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c, int srcActions,
                                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(abstractRecognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass))
        return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:jdk8u_jdk    文件:WToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c, int srcActions,
                                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(abstractRecognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass))
        return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:jdk8u_jdk    文件:XToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizerClass,
                DragSource ds,
                Component c,
                int srcActions,
                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(recognizerClass))
        return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:lookaside_java-1.8.0-openjdk    文件:WToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c, int srcActions,
                                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(abstractRecognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass))
        return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:lookaside_java-1.8.0-openjdk    文件:XToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizerClass,
                DragSource ds,
                Component c,
                int srcActions,
                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(recognizerClass))
        return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:javify    文件:GtkToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizer, DragSource ds,
                            Component comp, int actions,
                            DragGestureListener l)
{
  if (recognizer.getName().equals("java.awt.dnd.MouseDragGestureRecognizer")
      && ! GraphicsEnvironment.isHeadless())
    {
      GtkMouseDragGestureRecognizer gestureRecognizer
        = new GtkMouseDragGestureRecognizer(ds, comp, actions, l);
      gestureRecognizer.registerListeners();
      return recognizer.cast(gestureRecognizer);
    }
  else
    {
      return null;
    }
}
项目:jvm-stm    文件:GtkToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizer, DragSource ds, 
                            Component comp, int actions,
                            DragGestureListener l)
{
  if (recognizer.getName().equals("java.awt.dnd.MouseDragGestureRecognizer")
      && ! GraphicsEnvironment.isHeadless())
    {
      GtkMouseDragGestureRecognizer gestureRecognizer
        = new GtkMouseDragGestureRecognizer(ds, comp, actions, l);
      gestureRecognizer.registerListeners();
      return recognizer.cast(gestureRecognizer);
    }
  else
    {
      return null;
    }
}
项目:infobip-open-jdk-8    文件:WToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c, int srcActions,
                                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(abstractRecognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass))
        return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:infobip-open-jdk-8    文件:XToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizerClass,
                DragSource ds,
                Component c,
                int srcActions,
                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(recognizerClass))
        return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:jdk8u-dev-jdk    文件:WToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c, int srcActions,
                                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(abstractRecognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(abstractRecognizerClass))
        return (T)new WMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:jdk8u-dev-jdk    文件:XToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizerClass,
                DragSource ds,
                Component c,
                int srcActions,
                DragGestureListener dgl)
{
    final LightweightFrame f = SunToolkit.getLightweightFrame(c);
    if (f != null) {
        return f.createDragGestureRecognizer(recognizerClass, ds, c, srcActions, dgl);
    }

    if (MouseDragGestureRecognizer.class.equals(recognizerClass))
        return (T)new XMouseDragGestureRecognizer(ds, c, srcActions, dgl);
    else
        return null;
}
项目:freemind_1.0.0_20140624_214725    文件:IndependantMapViewCreator.java   
protected MapView createMapView(Controller controller, MindMapMapModel model) {
    MapView mapView = new MapView(model, controller) {
        DragGestureListener getNodeDragListener() {
            return null;
        }

        DropTargetListener getNodeDropListener() {
            return null;
        }

        public void selectAsTheOnlyOneSelected(NodeView pNewSelected,
                boolean pRequestFocus) {
        }

    };
    return mapView;
}
项目:JamVM-PH    文件:GtkToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizer, DragSource ds, 
                            Component comp, int actions,
                            DragGestureListener l)
{
  if (recognizer.getName().equals("java.awt.dnd.MouseDragGestureRecognizer")
      && ! GraphicsEnvironment.isHeadless())
    {
      GtkMouseDragGestureRecognizer gestureRecognizer
        = new GtkMouseDragGestureRecognizer(ds, comp, actions, l);
      gestureRecognizer.registerListeners();
      return recognizer.cast(gestureRecognizer);
    }
  else
    {
      return null;
    }
}
项目:classpath    文件:GtkToolkit.java   
public <T extends DragGestureRecognizer> T
createDragGestureRecognizer(Class<T> recognizer, DragSource ds,
                            Component comp, int actions,
                            DragGestureListener l)
{
  if (recognizer.getName().equals("java.awt.dnd.MouseDragGestureRecognizer")
      && ! GraphicsEnvironment.isHeadless())
    {
      GtkMouseDragGestureRecognizer gestureRecognizer
        = new GtkMouseDragGestureRecognizer(ds, comp, actions, l);
      gestureRecognizer.registerListeners();
      return recognizer.cast(gestureRecognizer);
    }
  else
    {
      return null;
    }
}
项目:freemind    文件:IndependantMapViewCreator.java   
protected MapView createMapView(Controller controller, MindMapMapModel model) {
    MapView mapView = new MapView(model, controller) {
        DragGestureListener getNodeDragListener() {
            return null;
        }

        DropTargetListener getNodeDropListener() {
            return null;
        }

        public void selectAsTheOnlyOneSelected(NodeView pNewSelected,
                boolean pRequestFocus) {
        }

    };
    return mapView;
}
项目:VASSAL-src    文件:PieceSlot.java   
public void addTo(Buildable parent) {
  panel.setDropTarget(AbstractDragHandler.makeDropTarget(panel, DnDConstants.ACTION_MOVE, null));

  DragGestureListener dragGestureListener = new DragGestureListener() {
    public void dragGestureRecognized(DragGestureEvent dge) {
      startDrag();
      AbstractDragHandler.getTheDragHandler().dragGestureRecognized(dge);
    }
  };
  DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer(panel, DnDConstants.ACTION_MOVE, dragGestureListener);
}
项目:Equella    文件:FileListPanel.java   
private void registerDndHandlers()
{
    new DragSource().createDefaultDragGestureRecognizer(list, DnDConstants.ACTION_COPY, new DragGestureListener()
    {
        @Override
        public void dragGestureRecognized(DragGestureEvent dge)
        {
            Transferable t = new FileInfoTransferable(getSelectedFile());
            dge.startDrag(DragSource.DefaultMoveDrop, t);
        }
    });

    DnDUtils.registerDropHandler(this, dropHandlers, new HoverHandler()
    {
        @Override
        public void hovering(DropTargetDragEvent e)
        {
            FileInfo fi = getFileUnderMouseCursor();
            if( fi == null )
            {
                int i = getListIndexUnderPoint(e.getLocation());
                if( i >= 0 )
                {
                    fi = model.get(i);
                }
            }

            if( fi != null && fi.isDirectory() )
            {
                list.setSelectedValue(fi, true);
            }
            else
            {
                list.getSelectionModel().clearSelection();
            }
        }
    });
}
项目:OpenJSharp    文件:LightweightContent.java   
/**
 * Create a drag gesture recognizer for the lightweight frame.
 */
default public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return null;
}
项目:OpenJSharp    文件:JLightweightFrame.java   
public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return content == null ? null : content.createDragGestureRecognizer(
            abstractRecognizerClass, ds, c, srcActions, dgl);
}
项目:Tarski    文件:mxGraphHandler.java   
/**
 * 
 */
protected void installDragGestureHandler() {
  DragGestureListener dragGestureListener = new DragGestureListener() {
    public void dragGestureRecognized(DragGestureEvent e) {
      if (graphComponent.isDragEnabled() && first != null) {
        final TransferHandler th = graphComponent.getTransferHandler();

        if (th instanceof mxGraphTransferHandler) {
          final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
              .createTransferable(graphComponent);

          if (t != null) {
            e.startDrag(null, mxSwingConstants.EMPTY_IMAGE, new Point(), t,
                new DragSourceAdapter() {

                  /**
                   * 
                   */
                  public void dragDropEnd(DragSourceDropEvent dsde) {
                    ((mxGraphTransferHandler) th).exportDone(graphComponent, t,
                        TransferHandler.NONE);
                    first = null;
                  }
                });
          }
        }
      }
    }
  };

  DragSource dragSource = new DragSource();
  dragSource.createDefaultDragGestureRecognizer(graphComponent.getGraphControl(),
      (isCloneEnabled()) ? DnDConstants.ACTION_COPY_OR_MOVE : DnDConstants.ACTION_MOVE,
      dragGestureListener);
}
项目:jdk8u-jdk    文件:LightweightContent.java   
/**
 * Create a drag gesture recognizer for the lightweight frame.
 */
default public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return null;
}
项目:jdk8u-jdk    文件:JLightweightFrame.java   
public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return content == null ? null : content.createDragGestureRecognizer(
            abstractRecognizerClass, ds, c, srcActions, dgl);
}
项目:openjdk-jdk10    文件:HeadlessToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c,
                                int srcActions, DragGestureListener dgl)
{
    return null;
}
项目:openjdk-jdk10    文件:HToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c,
                                int srcActions, DragGestureListener dgl)
{
    return null;
}
项目:openjdk-jdk10    文件:LightweightContent.java   
/**
 * Create a drag gesture recognizer for the lightweight frame.
 */
default public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return null;
}
项目:openjdk-jdk10    文件:JLightweightFrame.java   
public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return content == null ? null : content.createDragGestureRecognizer(
            abstractRecognizerClass, ds, c, srcActions, dgl);
}
项目:openjdk9    文件:HeadlessToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c,
                                int srcActions, DragGestureListener dgl)
{
    return null;
}
项目:openjdk9    文件:HToolkit.java   
@Override
public <T extends DragGestureRecognizer> T
    createDragGestureRecognizer(Class<T> abstractRecognizerClass,
                                DragSource ds, Component c,
                                int srcActions, DragGestureListener dgl)
{
    return null;
}
项目:openjdk9    文件:LightweightContent.java   
/**
 * Create a drag gesture recognizer for the lightweight frame.
 */
default public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return null;
}
项目:openjdk9    文件:JLightweightFrame.java   
public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return content == null ? null : content.createDragGestureRecognizer(
            abstractRecognizerClass, ds, c, srcActions, dgl);
}
项目:jdk8u_jdk    文件:LightweightContent.java   
/**
 * Create a drag gesture recognizer for the lightweight frame.
 */
default public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return null;
}
项目:jdk8u_jdk    文件:JLightweightFrame.java   
public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return content == null ? null : content.createDragGestureRecognizer(
            abstractRecognizerClass, ds, c, srcActions, dgl);
}
项目:lookaside_java-1.8.0-openjdk    文件:LightweightContent.java   
/**
 * Create a drag gesture recognizer for the lightweight frame.
 */
default public <T extends DragGestureRecognizer> T createDragGestureRecognizer(
        Class<T> abstractRecognizerClass,
        DragSource ds, Component c, int srcActions,
        DragGestureListener dgl)
{
    return null;
}