/** * Returns the text area that fired the specified event. * @param evt The event */ public static JEditTextArea getTextArea(EventObject evt) { if(evt != null) { Object o = evt.getSource(); if(o instanceof Component) { // find the parent text area Component c = (Component)o; for(;;) { if(c instanceof JEditTextArea) return (JEditTextArea)c; else if(c == null) break; if(c instanceof JPopupMenu) c = ((JPopupMenu)c) .getInvoker(); else c = c.getParent(); } } } // this shouldn't happen System.err.println("BUG: getTextArea() returning null"); System.err.println("Report this to Slava Pestov <*****@*****.**>"); return null; }
public synchronized void eventRegistered(EventObject e) { if (e.getSource() == model && model.isReady()) { setCanPaint(true); setWantsPaint(true); notifyListeners(); } }
@Override protected boolean doAction(EventObject e) { this.settingsFrm.setWaitCursor(true); boolean rv = false; Object src = e.getSource(); if (src != null) { if ((src == this.btnMon31_64x16) || (src == this.btnMon31_64x32) || (src == this.btnMonSCCH80) || (src == this.btnMonSCCH1088) || (src == this.btnMon2010)) { rv = true; upd2010FieldsEnabled(); updSCCHFieldsEnabled(); fireDataChanged(); } else if (src instanceof AbstractButton) { rv = true; fireDataChanged(); } } if (!rv) { rv = this.tabGIDE.doAction(e); } this.settingsFrm.setWaitCursor(false); return rv; }
@Override public boolean isCellEditable(EventObject e) { if (e instanceof MouseEvent && e.getSource() instanceof JTree) { MouseEvent me = (MouseEvent) e; JTree tree = (JTree) e.getSource(); TreePath path = tree.getPathForLocation(me.getX(), me.getY()); Rectangle r = tree.getPathBounds(path); if (r == null) { return false; } Dimension d = getPreferredSize(); r.setSize(new Dimension(d.width, r.height)); if (r.contains(me.getX(), me.getY())) { if (str == null && System.getProperty("java.version").startsWith("1.7.0")) { setBounds(new Rectangle(0, 0, d.width, r.height)); } // System.out.println(getBounds()); return true; } } return false; }
public MapBaseLayerChangedEvent(EventObject eventObject) { super(eventObject.getJSObject()); }
public MarkerBrowserEvent(EventObject eventObject) { super(eventObject.getJSObject()); }
public MapMoveEvent(EventObject eventObject) { super(eventObject.getJSObject()); }