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

项目:incubator-netbeans    文件:DnDSupport.java   
void remove( CategoryDescriptor descriptor ) {
    ArrayList<DragGestureRecognizer> recognizersToRemove = new ArrayList<DragGestureRecognizer>( 2 );
    for( Iterator<DragGestureRecognizer> i=recognizers.iterator(); i.hasNext(); ) {
        DragGestureRecognizer dgr = i.next();
        if( dgr.getComponent() == descriptor.getButton()
            || dgr.getComponent() == descriptor.getList() ) {
            recognizersToRemove.add( dgr );
            dgr.removeDragGestureListener( this );
        }
    }
    recognizers.removeAll( recognizersToRemove );

    ArrayList<DropTarget> dropTargetsToRemove = new ArrayList<DropTarget>( 2 );
    for( Iterator<DropTarget> i=dropTargets.iterator(); i.hasNext(); ) {
        DropTarget dt = i.next();
        if( dt.getComponent() == descriptor.getButton()
            || dt.getComponent() == descriptor.getList() ) {
            dropTargetsToRemove.add( dt );
            dt.removeDropTargetListener( this );
        }
    }
    dropTargets.removeAll( dropTargetsToRemove );
}
项目: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;
}
项目: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;
    }
}
项目:polydes    文件:LeafTransferHandler.java   
public void dispose()
{
    try
    {
        DragGestureRecognizer recognizer =
                (DragGestureRecognizer) FieldUtils.readStaticField
                (
                    TransferHandler.class,
                    "recognizer",
                    true
                );
        if(recognizer != null && recognizer.getComponent() == installedOn)
        {
            recognizer.setComponent(null);
        }
    }
    catch(IllegalAccessException e)
    {
        e.printStackTrace();
    }

    installedOn = null;
    folderModel = 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;
    }
}
项目:incubator-netbeans    文件:DnDSupport.java   
public void register(Component c) {
    synchronized( recognizers ) {
        DragGestureRecognizer dgr = recognizers.get( c );
        if( null == dgr ) {
            dgr = dragSource.createDefaultDragGestureRecognizer(c, DnDConstants.ACTION_MOVE, this);
            recognizers.put( c, dgr );
        }
    }
}
项目:incubator-netbeans    文件:DnDSupport.java   
public void unregister(Component c) {
    synchronized( recognizers ) {
        DragGestureRecognizer dgr = recognizers.get(c);
        if( null != dgr ) {
            dgr.setComponent(null);
        }
        recognizers.remove( c );
    }
}
项目: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);
}
项目: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;
}
项目:lookaside_java-1.8.0-openjdk    文件: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);
}