public void handleInitialInputEvent(InputEvent e) { System.err.println("HandleInitialInputEvent"); getLayout().layoutContainer(this); if (e instanceof MouseEvent) { Point p = SwingUtilities.convertPoint((JComponent) e.getSource(), ((MouseEvent) e).getPoint(), this); Component c = getComponentAt(p); if (c instanceof JRadioButton) { ((JRadioButton) c).setSelected(true); c.requestFocus(); fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, InplaceEditor.COMMAND_SUCCESS)); } } else { Component[] c = getComponents(); for (int i = 0; i < c.length; i++) { if (c[i] instanceof JRadioButton) { if (((JRadioButton) c[i]).isSelected()) { c[i].requestFocusInWindow(); } } } } }
public void handleInitialInputEvent(InputEvent e) { System.err.println("HandleInitialInputEvent"); getLayout().layoutContainer(this); if (e instanceof MouseEvent) { Point p = SwingUtilities.convertPoint( (JComponent)e.getSource(), ((MouseEvent) e).getPoint(), this); Component c = getComponentAt(p); if (c instanceof JRadioButton) { ((JRadioButton) c).setSelected(true); c.requestFocus(); fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, InplaceEditor.COMMAND_SUCCESS)); } } else { Component[] c = getComponents(); for (int i=0; i < c.length; i++) { if (c[i] instanceof JRadioButton) { if (((JRadioButton) c[i]).isSelected()) { c[i].requestFocusInWindow(); } } } } }
public void handleInitialInputEvent(InputEvent e) { System.err.println("HandleInitialInputEvent"); getLayout().layoutContainer(this); if (e instanceof MouseEvent) { Point p = SwingUtilities.convertPoint( (JComponent)e.getSource(), ((MouseEvent) e).getPoint(), this); Component c = getComponentAt(p); if (c instanceof JRadioButton) { ((JRadioButton) c).setSelected(true); c.requestFocus(); fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, InplaceEditor.COMMAND_SUCCESS)); } } else { Component[] c = getComponents(); for (int i=0; i < c.length; i++) { if (c[i] instanceof JRadioButton) { if (((JRadioButton) c[i]).isSelected()) { c[i].requestFocusInWindow(); } } } } }