當前位置: 首頁>>代碼示例>>Java>>正文


Java DragSourceDropEvent.getDropSuccess方法代碼示例

本文整理匯總了Java中java.awt.dnd.DragSourceDropEvent.getDropSuccess方法的典型用法代碼示例。如果您正苦於以下問題:Java DragSourceDropEvent.getDropSuccess方法的具體用法?Java DragSourceDropEvent.getDropSuccess怎麽用?Java DragSourceDropEvent.getDropSuccess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.awt.dnd.DragSourceDropEvent的用法示例。


在下文中一共展示了DragSourceDropEvent.getDropSuccess方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
/**
 * as the operation completes
 */
@Override
public void dragDropEnd(DragSourceDropEvent dsde) {
	DragSourceContext dsc = dsde.getDragSourceContext();
	JComponent c = (JComponent) dsc.getComponent();
	if (dsde.getDropSuccess()) {
		((AbstractPatchedTransferHandler) c.getTransferHandler()).exportDone(c, dsc.getTransferable(),
				dsde.getDropAction());
	} else {
		((AbstractPatchedTransferHandler) c.getTransferHandler()).exportDone(c, dsc.getTransferable(), NONE);
	}
	c.setAutoscrolls(scrolls);
	fireDragEnded();
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:17,代碼來源:AbstractPatchedTransferHandler.java

示例2: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 */
public void dragDropEnd(DragSourceDropEvent dsde) {
    DragSourceContext dsc = dsde.getDragSourceContext();
    JComponent c = (JComponent)dsc.getComponent();

    if (dsde.getDropSuccess()) {
        ((DefaultTransferHandler)c.getTransferHandler()).exportDone(c,
            dsc.getTransferable(), dsde.getDropAction());
    } else {
        ((DefaultTransferHandler)c.getTransferHandler()).exportDone(c,
            null, NONE);
    }
    c.setAutoscrolls(scrolls);
}
 
開發者ID:FreeCol,項目名稱:freecol,代碼行數:17,代碼來源:DefaultTransferHandler.java

示例3: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent event)
{
    if (event.getDropSuccess())
    {
    }
    // DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)
    // getLastSelectedPathComponent();
    // ED_UserObject userObject = (ED_UserObject) treeNode.getUserObject();
    // userObject._editing = false;
    // setEditable(true);
    SB_Canvas canvas = ComponentRegistry.getContent().getActiveCanvas();
    canvas._allowDrop = true;
    canvas._dropType = SB_Canvas.kDropUnknown;
}
 
開發者ID:StottlerHenkeAssociates,項目名稱:SimBionic,代碼行數:15,代碼來源:SB_LocalsTree.java

示例4: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent event)
{
    if (event.getDropSuccess())
    {
    }

    _dragNode = null;
    _dragRow = -1;

    SB_Canvas canvas = ComponentRegistry.getContent().getActiveCanvas();
    canvas._allowDrop = true;
    canvas._dropType = SB_Canvas.kDropUnknown;
}
 
開發者ID:StottlerHenkeAssociates,項目名稱:SimBionic,代碼行數:14,代碼來源:SB_Catalog.java

示例5: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent ev)
{
	DragSourceContext dragSourceContext = ev.getDragSourceContext();
	JComponent component = (JComponent) dragSourceContext.getComponent();
	if (ev.getDropSuccess())
	{
		exportDone(component, dragSourceContext.getTransferable(), ev.getDropAction());
	}
	else
	{
		exportDone(component, dragSourceContext.getTransferable(), NONE);
	}
	component.setAutoscrolls(this.autoscrolls);
}
 
開發者ID:valsr,項目名稱:SweetHome3D,代碼行數:15,代碼來源:VisualTransferHandler.java

示例6: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent e)
{
  if (e.getDropSuccess() == false)
    return;

  int action = e.getDropAction();
  if ((action & DnDConstants.ACTION_MOVE) != 0)
    setText("");
}
 
開發者ID:vilie,項目名稱:javify,代碼行數:10,代碼來源:Demo.java

示例7: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent e)
{
  DragSourceContext ctx = e.getDragSourceContext();
  JComponent c = (JComponent) ctx.getComponent();
  TransferHandler th = c.getTransferHandler();
  if (e.getDropSuccess())
    {
      th.exportDone(c, ctx.getTransferable(), e.getDropAction());
    }
  else
    {
      th.exportDone(c, ctx.getTransferable(), e.getDropAction());
    }
  c.setAutoscrolls(autoscrolls);
}
 
開發者ID:vilie,項目名稱:javify,代碼行數:16,代碼來源:TransferHandler.java

示例8: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent dsde) {
    if (dsde.getDropSuccess()) {
        //System.out.println("Succeeded");
    } else {
        //System.out.println("Failed");
    }
}
 
開發者ID:hyounesy,項目名稱:ALEA,代碼行數:8,代碼來源:ReorderableJList.java

示例9: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
@Override
public void dragDropEnd(DragSourceDropEvent event) {
  Component component = event.getDragSourceContext().getComponent();
  if (!event.getDropSuccess() &&
      component instanceof PaletteComponentList &&
      getRootPane() == ((JComponent)component).getRootPane()) {
    clearActiveItem();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:PaletteWindow.java

示例10: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
@Override
public void dragDropEnd(DragSourceDropEvent event) {
  Component component = event.getDragSourceContext().getComponent();
  if (!event.getDropSuccess() &&
      component instanceof PaletteItemsComponent &&
      myDesigner != null &&
      myDesigner.getRootPane() == ((JComponent)component).getRootPane()) {
    myDesigner.getToolProvider().loadDefaultTool();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:PalettePanel.java

示例11: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
@Override
public void dragDropEnd(final DragSourceDropEvent dsde) {
  if (dsde.getDropSuccess() && (dsde.getDropAction() == DnDConstants.ACTION_MOVE)
      && (draggedNodeParent != null)) {
    ((DefaultTreeModel) tree.getModel()).nodeStructureChanged(draggedNodeParent);
  }
}
 
開發者ID:google,項目名稱:binnavi,代碼行數:8,代碼來源:AbstractTreeTransferHandler.java

示例12: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
/**
 * as the operation completes
 */
@Override
public void dragDropEnd(DragSourceDropEvent dsde) {
    DragSourceContext dsc = dsde.getDragSourceContext();
    JComponent c = (JComponent) dsc.getComponent();
    DefaultDrawingViewTransferHandler th = (DefaultDrawingViewTransferHandler) c.getTransferHandler();
    if (dsde.getDropSuccess()) {
        th.exportDone(c, dsc.getTransferable(), dsde.getDropAction());
    } else {
        th.exportDone(c, dsc.getTransferable(), NONE);
    }
    c.setAutoscrolls(scrolls);
}
 
開發者ID:umple,項目名稱:umple,代碼行數:16,代碼來源:DefaultDrawingViewTransferHandler.java

示例13: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
@Override
public void dragDropEnd(DragSourceDropEvent dsde)
{
	if (!dsde.getDropSuccess())
	{
		this.oldParent.setCard(this.card, this.location);
		this.oldParent.validate();
		this.oldParent.repaint();
	}
}
 
開發者ID:slaymaker1907,項目名稱:triple-triad-ai,代碼行數:11,代碼來源:CardDragHandler.java

示例14: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
@Override
public void dragDropEnd(DragSourceDropEvent event) {
	if (event.getDropSuccess()) {
		if (!mDropReceived) {
			if ((event.getDropAction() & mAllowedRowDragTypes) == DnDConstants.ACTION_MOVE) {
				externalMoveDrop(event.getDragSourceContext().getTransferable());
			}
		}
	}
	setSourceDragColumn(null);
}
 
開發者ID:Ayutac,項目名稱:toolkit,代碼行數:12,代碼來源:TreePanel.java

示例15: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
/**
 * as the operation completes
 */
public void dragDropEnd(DragSourceDropEvent dsde) {
	DragSourceContext dsc = dsde.getDragSourceContext();
	JComponent c = (JComponent) dsc.getComponent();
	if (dsde.getDropSuccess()) {
		((AbstractPatchedTransferHandler) c.getTransferHandler()).exportDone(c, dsc.getTransferable(), dsde.getDropAction());
	} else {
		((AbstractPatchedTransferHandler) c.getTransferHandler()).exportDone(c, dsc.getTransferable(), NONE);
	}
	c.setAutoscrolls(scrolls);
	fireDragEnded();
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:15,代碼來源:AbstractPatchedTransferHandler.java


注:本文中的java.awt.dnd.DragSourceDropEvent.getDropSuccess方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。