dt.addDropTargetListener(new DropListener(this)); this.setDropTarget(dt); } catch (Exception e) {
dt.addDropTargetListener(this.dropListener);
@Override public void addDropTargetListener(DropTargetListener dtl) throws TooManyListenersException { delegate.addDropTargetListener(dtl); }
DropTarget dropTarget = label.getDropTarget(); try { dropTarget.addDropTargetListener(dropListener); } catch (TooManyListenersException e) { e.printStackTrace(); }
RowHeaderTable rowTable = new RowHeaderTable(mainTable); rowTable.setAutoscrolls(true); rowTable.setDragEnabled(true); rowTable.setTransferHandler(new RowHeaderTransferHandler(mainTable)); rowTable.setDropMode(DropMode.INSERT_ROWS); try { DropTarget dropTarget = rowTable.getDropTarget(); dropTarget.addDropTargetListener(rowTable); } catch(TooManyListenersException e) { e.printStackTrace(); }
@Override public void addDropTargetListener(DropTargetListener dtl) throws TooManyListenersException { //#131830: It is to avoid NPE on JDK 1.5 orig.removeDropTargetListener(dtl); orig.addDropTargetListener( dtl ); }
public DesignerPaneDropTarget(DesignerPane designerPane) { super(); setComponent(designerPane); try { super.addDropTargetListener(DEFAULT_TRANSFER_HANDLER_DROP_TARGET_LISTENER); } catch (TooManyListenersException tmle) { // No op. } }
/** * */ protected void installDropTargetHandler() { DropTarget dropTarget = graphComponent.getDropTarget(); try { if (dropTarget != null) { dropTarget.addDropTargetListener(this); currentDropTarget = dropTarget; } } catch (TooManyListenersException e) { // should not happen... swing drop target is multicast log.log(Level.SEVERE, "Failed to install drop target handler", e); } }
/** * */ protected void installDropTargetHandler() { DropTarget dropTarget = graphComponent.getDropTarget(); try { if (dropTarget != null) { dropTarget.addDropTargetListener(this); currentDropTarget = dropTarget; } } catch (TooManyListenersException tmle) { // should not happen... swing drop target is multicast } }
public void setDropTarget(DropTarget _dt) { super.setDropTarget(_dt); if (_dt != null) { // FuLog.debug("BTF: setDropTarget"); try { _dt.removeDropTargetListener(DtDragSensible.SINGLETON); } catch (IllegalArgumentException ex) {} try { _dt.addDropTargetListener(DtDragSensible.SINGLETON); } catch (TooManyListenersException ex) {} } }
public void setDropTarget(DropTarget _dt) { super.setDropTarget(_dt); if(_dt!=null) { //FuLog.debug("BLI: setDropTarget"); try { _dt.removeDropTargetListener(DtDragSensible.SINGLETON); } catch(IllegalArgumentException ex) { } try { _dt.addDropTargetListener(DtDragSensible.SINGLETON); } catch(TooManyListenersException ex) { } } }
public void setDropTarget(DropTarget _dt) { super.setDropTarget(_dt); if(_dt!=null) { //FuLog.debug("BTR: setDropTarget"); try { _dt.removeDropTargetListener(DtDragSensible.SINGLETON); } catch(IllegalArgumentException ex) { } try { _dt.addDropTargetListener(DtDragSensible.SINGLETON); } catch(TooManyListenersException ex) { } } }
public void setDropTarget(DropTarget _dt) { super.setDropTarget(_dt); if(_dt!=null) { //FuLog.debug("BTA: setDropTarget"); try { _dt.removeDropTargetListener(DtDragSensible.SINGLETON); } catch(IllegalArgumentException ex) { } try { _dt.addDropTargetListener(DtDragSensible.SINGLETON); } catch(TooManyListenersException ex) { } } }
public void setDropTarget(DropTarget _dt) { super.setDropTarget(_dt); if (_dt != null) { // FuLog.debug("BTA: setDropTarget"); try { _dt.removeDropTargetListener(DtDragSensible.SINGLETON); } catch (IllegalArgumentException ex) {} try { _dt.addDropTargetListener(DtDragSensible.SINGLETON); } catch (TooManyListenersException ex) {} } }
public static void createDropTargetListeners(ActionContext actionContext) throws TooManyListenersException{ Thing self = (Thing) actionContext.get("self"); DropTarget parent = (DropTarget) actionContext.get("parent"); for(Thing child : self.getChilds()){ DropTargetListener listener = (DropTargetListener) child.doAction("create", actionContext); if(listener != null){ parent.addDropTargetListener(listener); } } }
@Override public void setTransferHandler(TransferHandler newHandler) { super.setTransferHandler(newHandler); try { getDropTarget() .addDropTargetListener(new TextAreaDropHandler(this)); } catch (TooManyListenersException e) { Log.log(Log.ERROR, this, e); } } // }}}
private static void addListener(JComponent comp, DropTargetListener listener) { DropTarget target = comp.getDropTarget(); if (target == null) { comp.setDropTarget(new DropTarget(comp, listener)); } else { try { target.addDropTargetListener(listener); } catch (TooManyListenersException e) { Log.log(e); } } }
public GridDragDropHandler(JGridCell gridCell) { super(); this.gridCell = gridCell; this.gridCell.setTransferHandler(createTransferHandler()); try { this.gridCell.getDropTarget().addDropTargetListener(this); } catch (TooManyListenersException e) { } this.gridCell.addMouseListener(this); this.gridCell.addMouseMotionListener(this); }
/** * A pane that represents a single day in the calendar. */ public void init(int iDateOffset, Border border) { m_iDateOffset = iDateOffset; if (border != null) this.setBorder(border); this.setForeground(Color.black); this.setOpaque(false); // I accept calendar item drops (either product or detail items) DropTarget dt = new DropTarget(); this.setDropTarget(dt); try { dt.addDropTargetListener(new CalendarPaneDropTargetListener(null)); } catch (TooManyListenersException ex) { ex.printStackTrace(); } } /**
public void configureDnD(Component c) { if (drag!=null) { DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer( c,DnDConstants.ACTION_COPY_OR_MOVE,new ClarionDragGesture(this)); } if (drop!=null) { try { c.setDropTarget(new DropTarget()); c.getDropTarget().addDropTargetListener(new ClarionDropTargetListener(this)); } catch (TooManyListenersException e) { e.printStackTrace(); } } }