本文整理匯總了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();
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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("");
}
示例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);
}
示例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");
}
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
示例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);
}
示例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();
}
}
示例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);
}
示例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();
}