Java Code Examples for javax.swing.TransferHandler#COPY_OR_MOVE

The following examples show how to use javax.swing.TransferHandler#COPY_OR_MOVE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseCaret.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    
    if ((mods & InputEvent.BUTTON1_DOWN_MASK) == 0) {
        return TransferHandler.NONE;
    }
    
    return TransferHandler.COPY_OR_MOVE;
}
 
Example 2
Source File: EditorCaret.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private int mapDragOperationFromModifiers(MouseEvent e) {
    int mods = e.getModifiersEx();
    
    if ((mods & InputEvent.BUTTON1_DOWN_MASK) == 0) {
        return TransferHandler.NONE;
    }
    
    return TransferHandler.COPY_OR_MOVE;
}
 
Example 3
Source File: ProcessRendererDropTarget.java    From rapidminer-studio with GNU Affero General Public License v3.0 5 votes vote down vote up
public ProcessRendererDropTarget(final ProcessRendererView view, final DropTargetListener dropTargetListener) {
	super(view, TransferHandler.COPY_OR_MOVE | TransferHandler.LINK, null);
	this.view = view;
	try {
		super.addDropTargetListener(dropTargetListener);
	} catch (TooManyListenersException tmle) {
	}
}
 
Example 4
Source File: ListTransferHandler.java    From marathonv5 with Apache License 2.0 4 votes vote down vote up
@Override
public int getSourceActions(JComponent c) {
    return TransferHandler.COPY_OR_MOVE;
}
 
Example 5
Source File: TableRowTransferHandler.java    From RobotBuilder with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public int getSourceActions(JComponent c) {
    return TransferHandler.COPY_OR_MOVE;
}
 
Example 6
Source File: ZestTreeTransferHandler.java    From zap-extensions with Apache License 2.0 4 votes vote down vote up
@Override
public int getSourceActions(JComponent c) {
    logger.debug("getSourceActions " + c.getClass().getCanonicalName());
    return TransferHandler.COPY_OR_MOVE;
}
 
Example 7
Source File: TableRowTransferHandler.java    From PyramidShader with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getSourceActions(JComponent c) {
    return TransferHandler.COPY_OR_MOVE;
}
 
Example 8
Source File: TopicGrid.java    From wandora with GNU General Public License v3.0 4 votes vote down vote up
@Override
public int getSourceActions(JComponent c) {
    return TransferHandler.COPY_OR_MOVE;
}
 
Example 9
Source File: ChatRoomTransferHandler.java    From Spark with Apache License 2.0 4 votes vote down vote up
@Override
public int getSourceActions(JComponent c) {
       return TransferHandler.COPY_OR_MOVE;
   }