Example usage for java.awt.dnd DnDConstants ACTION_NONE

List of usage examples for java.awt.dnd DnDConstants ACTION_NONE

Introduction

In this page you can find the example usage for java.awt.dnd DnDConstants ACTION_NONE.

Prototype

int ACTION_NONE

To view the source code for java.awt.dnd DnDConstants ACTION_NONE.

Click Source Link

Document

An int representing no action.

Usage

From source file:net.sf.jabref.external.ExternalFilePanel.java

public ExternalFilePanel(final JabRefFrame frame, final MetaData metaData, final EntryEditor entryEditor,
        final String fieldName, final OpenFileFilter off, final FieldEditor editor) {

    this.frame = frame;
    this.metaData = metaData;
    this.off = off;
    this.entryEditor = entryEditor;

    setLayout(new GridLayout(2, 2));

    JButton browseBut = new JButton(Localization.lang("Browse"));
    JButton download = new JButton(Localization.lang("Download"));
    JButton auto = new JButton(Localization.lang("Auto"));
    JButton xmp = new JButton(Localization.lang("Write XMP"));
    xmp.setToolTipText(Localization.lang("Write BibtexEntry as XMP-metadata to PDF."));

    browseBut.addActionListener(new ActionListener() {

        @Override//www.j  av  a  2 s  .c o  m
        public void actionPerformed(ActionEvent e) {
            browseFile(fieldName, editor);
            // editor.setText(chosenValue);
            entryEditor.storeFieldAction.actionPerformed(new ActionEvent(editor, 0, ""));
        }
    });

    download.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            downLoadFile(fieldName, editor, frame);
        }
    });

    auto.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            JabRefExecutorService.INSTANCE.execute(autoSetFile(fieldName, editor));
        }
    });
    xmp.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            pushXMP(fieldName, editor);
        }
    });

    add(browseBut);
    add(download);
    add(auto);
    add(xmp);

    // Add drag and drop support to the field
    if (editor != null) {
        ((JComponent) editor).setDropTarget(new DropTarget((Component) editor, DnDConstants.ACTION_NONE,
                new UrlDragDrop(entryEditor, frame, editor)));
    }
}

From source file:org.freeplane.features.clipboard.mindmapmode.MClipboardController.java

public void paste(final Transferable t, final NodeModel target, final boolean asSibling, final boolean isLeft) {
    paste(t, target, asSibling, isLeft, DnDConstants.ACTION_NONE);
}

From source file:org.freeplane.features.clipboard.mindmapmode.MClipboardController.java

void paste(final Transferable t, final IDataFlavorHandler handler, final NodeModel target,
        final boolean asSibling, final boolean isLeft) {
    paste(t, handler, target, asSibling, isLeft, DnDConstants.ACTION_NONE);
}

From source file:org.kuali.test.ui.dnd.RepositoryDropTargetAdapter.java

@Override
public void dragOver(DropTargetDragEvent dtde) {
    if (canDrop(dtde)) {
        dtde.acceptDrag(dtde.getDropAction());
    } else {/*from   ww w  . ja  v a  2s. c o  m*/
        dtde.acceptDrag(DnDConstants.ACTION_NONE);
        dtde.rejectDrag();
    }
}

From source file:org.nuclos.client.explorer.ExplorerNode.java

/**
 * source actions for drag&drop./*from ww  w .j a v  a2  s  .  co  m*/
 * @see DnDConstants
 * @return (default: DnDConstants.ACTION_NONE)
 */
public int getDataTransferSourceActions() {
    return DnDConstants.ACTION_NONE;
}