/** * This message goes to DragSourceListener, * informing it that the dragging has ended. * @param event Details about the drop event. */ public void dragDropEnd (DragSourceDropEvent event) { if (event.getDropSuccess ()) { // System.out.println ("added new class"); } }
/** * this message goes to DragSourceListener, informing it that the dragging * has ended * */ public void dragDropEnd (DragSourceDropEvent event) { if ( event.getDropSuccess()){ } }
public void dragDropEnd(DragSourceDropEvent dsde) { if (dsde.getDropSuccess()) { System.out.println("Succeeded"); } else { System.out.println("Failed"); } }
public void dragDropEnd(DragSourceDropEvent dsde) { if (!dsde.getDropSuccess() && activeDragItem != null) { activeDragItem.dragAccepted(); } }
public void dragDropEnd(DragSourceDropEvent dsde) { super.dragDropEnd(dsde); if (dsde.getDropSuccess()) { if (DEBUG) System.out.println("Drop successful"); // NOI18N } else { if (DEBUG) System.out.println("Drop unsuccessful"); // NOI18N } }
public void dragDropEnd(DragSourceDropEvent dsde) { super.dragDropEnd(dsde); if (dsde.getDropSuccess()) { if (DEBUG) System.out.println("Drop successful"); // NOI18N } else { if (DEBUG) System.out.println("Drop unsuccessful"); // NOI18N } }
public void dragDropEnd(DragSourceDropEvent dsde) { super.dragDropEnd(dsde); if (dsde.getDropSuccess()) { if (DEBUG) System.out.println("Drop successful"); // NOI18N } else { if (DEBUG) System.out.println("Drop unsuccessful"); // NOI18N } } }
@Override public void dragDropEnd(DragSourceDropEvent dsde) { super.dragDropEnd(dsde); if (dsde.getDropSuccess()) { if (DEBUG) { System.out.println("Drop End - success"); // NOI18N } } else { if (DEBUG) { System.out.println("Drop End - failure!!!"); // NOI18N } } } }
public void dragDropEnd(DragSourceDropEvent dsde) { if (!dsde.getDropSuccess()) { return; } if (this.movedList != null) { for (Object aMovedList : this.movedList) { ((DefaultListModel) getModel()).removeElement(aMovedList); } this.movedList = null; } }
public void dragDropEnd(DragSourceDropEvent dsde) { if (!dsde.getDropSuccess()) { return; } if (this.movedList != null) { for (Object e : this.movedList) { ((DefaultListModel) getModel()).removeElement(e); } this.movedList = null; } }
public void dragDropEnd(DragSourceDropEvent e) { if (e.getDropSuccess()) { int nAction = e.getDropAction(); if (nAction == DnDConstants.ACTION_MOVE) { // The dragged item (pathSource) has been inserted at the target // selected by the user. // Now it is time to delete it from its original location. System.out.println("REMOVING: " + pathSource.getLastPathComponent()); // . // .. ask your TreeModel to delete the node // . pathSource = null; } } else { repaint(); } }
public void dragDropEnd(DragSourceDropEvent dsde) { if (dsde.getDropSuccess() && dsde.getDropAction()==DnDConstants.ACTION_MOVE && draggedNodeParent != null) { ((DefaultTreeModel)tree.getModel()).nodeStructureChanged(draggedNodeParent); tree.expandPath(new TreePath(draggedNodeParent.getPath())); tree.expandPath(new TreePath(draggedNode.getPath())); } } public final void dragEnter(DragSourceDragEvent dsde) {
public void dragDropEnd(DragSourceDropEvent evt) { if (evt.getDropSuccess()) { Component comp = evt.getDragSourceContext().getComponent(); Transferable t = evt.getDragSourceContext().getTransferable(); if (t instanceof ListTransferable) { try { //noinspection unchecked List<Comparable> o = (List<Comparable>) t.getTransferData(ListTransferable.FLAVOR); if (comp instanceof JList) { JList list = (JList) comp; VariableListModel model = (VariableListModel) list.getModel(); for (Comparable c : o) { model.removeFirst(c); } } else { JTextField pane = (JTextField) comp; pane.setText(null); } regressionModel.setTargetName(getResponseField().getText()); regressionModel.setRegressorName(getPredictors()); } catch (Exception ex) { ex.printStackTrace(); } } } }
@Override public void dragDropEnd(DragSourceDropEvent evt) { if (evt.getDropSuccess()) { Component comp = evt.getDragSourceContext().getComponent(); Transferable t = evt.getDragSourceContext().getTransferable(); if (t instanceof ListTransferable) { try { //noinspection unchecked List<Node> o = (List<Node>) t.getTransferData(new ListTransferable(new ArrayList()).getDataFlavor()); if (comp instanceof JList) { JList<Node> list = (JList<Node>) comp; VariableListModel model = (VariableListModel) list.getModel(); for (Node c : o) { model.removeFirst(c); } } else { JTextField pane = (JTextField) comp; pane.setText(null); } wrapper.setSelectedVariables(getSelected()); } catch (Exception exception) { exception.printStackTrace(System.err); } } } }
public void dragDropEnd(DragSourceDropEvent dsde) { if (dsde.getDropSuccess()) { Transferable t = dsde.getDragSourceContext().getTransferable(); try { List list = (List) t.getTransferData(ListTransferable.DATA_FLAVOR); DefaultListModel model = (DefaultListModel) getModel(); for (Object o : list) { model.removeElement(o); } KnowledgeGroup group = knowledge.getKnowledgeGroups().get(index); KnowledgeGroup g; if (this.from) { g = new KnowledgeGroup(group.getType(), getElementsInModel(model), group.getToVariables()); } else { g = new KnowledgeGroup(group.getType(), group.getFromVariables(), getElementsInModel(model)); } try { knowledge.setKnowledgeGroup(index, g); } catch (IllegalArgumentException ex) { JOptionPane.showMessageDialog(OtherGroupsEditor.this, ex.getMessage()); // rebuild so the old values are resorted. rebuild(); } } catch (Exception ex) { ex.printStackTrace(); } } }
@Override public void dragDropEnd(DragSourceDropEvent e) { m_isDrawRect = false; m_lineRect.setRect(0, 0, 0, 0); // m_dragTabIndex = -1; if (hasGhost()) { s_glassPane.setVisible(false); s_glassPane.setImage(null); } // if drop failed, create new JFrame with JTabbedPane included with public access if(!e.getDropSuccess()){ // MenuLight class Extends JFrame and Included 1 component JTabbedPane called superPane MenuLight m = new MenuLight(); m.setLocation(e.getLocation()); m.setVisible(true); // after create Frame, transfer the tab to other jtabbedpane ((DnDCloseButtonTabbedPane) m.superPane).convertTab(getTabTransferData(e), getTargetTabIndex(e.getLocation())); } // if current JTabbedPane Tab is empty dispose it. if(getTabCount() < 1){ // unfortunly i didnt want to close my Original menu, so check the class of parent of DnD is create from MenuLight and dispose it if(parent.getClass().equals(MenuLight.class)){ ((javax.swing.JFrame) parent).dispose(); } } }
public void dragDropEnd(DragSourceDropEvent dsde) { DragSourceContext dsc = dsde.getDragSourceContext(); JComponent c = (JComponent) dsc.getComponent(); SynaptixTransferHandler th = (SynaptixTransferHandler) c .getTransferHandler(); clearDropDDCs(); if (dsde.getDropSuccess()) { th.exportDone(c, dsc.getTransferable(), dsde.getDropAction()); } else { th.exportDone(c, dsc.getTransferable(), NONE); } c.setAutoscrolls(scrolls); }
public void dragDropEnd(DragSourceDropEvent e) { describe("end", e); setModifiers(UNKNOWN_MODIFIERS); transferable = UNKNOWN_TRANSFERABLE; if (ghost != null) { if (e.getDropSuccess()) { ghost.dispose(); } else { ghost.returnToOrigin(); } ghost = null; } DragSource src = e.getDragSourceContext().getDragSource(); src.removeDragSourceMotionListener(this); moved = false; }
@Override public void dragDropEnd(DragSourceDropEvent e) { describe("end", e); setModifiers(UNKNOWN_MODIFIERS); transferable = UNKNOWN_TRANSFERABLE; if (ghost != null) { if (e.getDropSuccess()) { ghost.dispose(); } else { ghost.returnToOrigin(); } ghost = null; } DragSource src = e.getDragSourceContext().getDragSource(); src.removeDragSourceMotionListener(this); moved = false; }
/** * 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); }