/** Set whether this handler (and thus its drop target) will accept * any drops. * @param active whether this handler should accept drops. */ public void setActive(boolean active) { this.active = active; if (dropTarget != null) { dropTarget.setActive(active); } }
/** Set whether this handler (and thus its drop target) will accept * any drops. */ public void setActive(boolean active) { this.active = active; if (dropTarget != null) { dropTarget.setActive(active); } }
/** Activates or deactivates Drag support on asociated JTree * component * @param active true if the support should be active, false * otherwise */ public void activate(boolean active) { if (this.active == active) { return; } this.active = active; getDropTarget().setActive(active); }
/** Activates or deactivates Drag support on asociated JTree * component * @param active true if the support should be active, false * otherwise */ public void activate (boolean active) { if (this.active == active) return; this.active = active; getDropTarget().setActive(active); }
/** Activates or deactivates Drag support on asociated JTree * component * @param active true if the support should be active, false * otherwise */ public void activate(boolean active) { if (this.active == active) { return; } this.active = active; getDropTarget().setActive(active); }
/** Activates or deactivates Drag support on asociated JTree * component * @param active true if the support should be active, false * otherwise */ public void activate(boolean active) { if (this.active == active) { return; } this.active = active; getDropTarget().setActive(active); }
public void setFrozen(boolean frozen) { this.frozen = frozen; getDropTarget().setActive(!frozen); }
/** Activates or deactivates Drag support on asociated JTree * component * @param active true if the support should be active, false * otherwise */ public void activate (boolean active) { if (this.active == active) return; this.active = active; getDropTarget().setActive(active); }
/** Activates or deactivates Drag support on asociated JTree * component * @param active true if the support should be active, false * otherwise */ public void activate (boolean active) { if (this.active == active) return; this.active = active; getDropTarget().setActive(active); }
/** Activates or deactivates Drag support on asociated JTree * component * @param active true if the support should be active, false * otherwise */ public void activate (boolean active) { if (this.active == active) return; this.active = active; getDropTarget().setActive(active); }
public void setFrozen(boolean frozen) { this.frozen = frozen; getDropTarget().setActive(!frozen); }
void addDropListener(final DropTargetListener dtl) { if (dtl == null) { return; } final DropTarget dropTarget = new DropTarget(getMainView(), dtl); dropTarget.setActive(true); }
private void makeDropTargetActive(final PrintStream out, final Component c, boolean recursive, boolean active) { DropTarget dropTarget = c.getDropTarget(); if (dropTarget != null) dropTarget.setActive(active); if (c.getParent() != null) { DropTarget parentDropTarget = c.getDropTarget(); if (parentDropTarget != null) c.getDropTarget().setActive(active); } if (recursive && c instanceof Container) { // Get the container Container cont = (Container) c; // Get its components Component[] comps = cont.getComponents(); // Set its components as listeners also for (Component comp : comps) makeDropTargetActive(out, comp, recursive, active); } }
/** Activates or deactivates Drag support on asociated JTree * component * @param active true if the support should be active, false * otherwise */ public void activate(boolean active) { if (this.active == active) { return; } this.active = active; if (GraphicsEnvironment.isHeadless()) { return; } getDropTarget().setActive(active); //we want to support drop into scroll pane's free area and treat it as 'root node drop' if( null == outerDropTarget ) { outerDropTarget = new DropTarget(view.getViewport(), view.getAllowedDropActions(), this, false); } outerDropTarget.setActive(active); }
public void initialiseClassView() throws Exception { loadProperties(); options = new OWLVizViewOptions(); // options specific to this view selectionModel = new OWLVizSelectionModel(); setupExportFormats(); closableTabs = new HashSet(); componentGroupMap = new HashMap<OWLVizGraphPanel, List<GraphComponent>>(); graphComponents = new HashSet<GraphComponent>(); createOWLVizTabUI(); DropTarget dt = new DropTarget(this, this); dt.setActive(true); }
SwingUtilities.invokeLater(new Runnable() { public void run() { dt.setActive(false); display.getCanvas().setDropTarget(null); dt.setComponent(null); }}); }
public static void init(DropTarget obj, Thing thing, ActionContext actionContext){ Boolean active = JavaCreator.createBoolean(thing, "active"); if(active != null){ obj.setActive(active); } Integer defaultActions = JavaCreator.createInteger(thing, "defaultActions"); if(defaultActions != null){ obj.setDefaultActions(defaultActions); } } }
public DataPanelContainer(TrackPanel trackPanel) { super(trackPanel); DropTarget target = new DropTarget(this, new FileDropTargetListener(trackPanel)); setDropTarget(target); target.setActive(true); this.setLayout(new DataPanelLayout()); this.parent = trackPanel; createDataPanels(); }
void createViewer(final ExternalResource model, final NodeView view) { final JComponent viewer = createViewer(view.getMap().getModel(), model); if (imagePopupMenu == null) { imagePopupMenu = new ExternalImagePopupMenu(); } viewer.setBorder(VIEWER_BORDER_INSTANCE); final Set<NodeView> viewers = model.getViewers(); viewers.add(view); viewer.setBounds(viewer.getX() - 5, viewer.getY() - 5, viewer.getWidth() + 15, viewer.getHeight() + 15); view.addContent(viewer, VIEWER_POSITION); if(view.getMap().getModeController().canEdit()){ final DropTarget dropTarget = new DropTarget(viewer, DTL); dropTarget.setActive(true); } if(view.isShortened()) viewer.setVisible(false); else { viewer.revalidate(); viewer.repaint(); } }
/** Creates a new instance of EditorComponent */ public TiledLayerEditorComponent(TiledLayer tiledLayer) { this.setTiledLayer(tiledLayer); this.tiledLayer.addTiledLayerListener(this); this.addMouseListener(this); this.addMouseMotionListener(new PaintMotionListener()); this.setAutoscrolls(true); this.timer = new Timer(); this.timer.schedule(new HiliteAnimator(), 0, 100); ToolTipManager.sharedInstance().registerComponent(this); //DnD DropTarget dropTarget = new DropTarget(this, new TiledLayerDropTargetListener()); dropTarget.setActive(true); this.setDropTarget(dropTarget); this.rulerHorizontal = new RulerHorizontal(); this.rulerVertical = new RulerVertical(); this.setEditMode(EDIT_MODE_PAINT); this.setAutoResizable(true); // vlv: print putClientProperty("print.printable", Boolean.TRUE); // NOI18N }