/** * Update the component according to the update mask specified in the * constructor of the action. * * @param target * target component to be updated. */ public void updateComponent(JTextComponent target) { updateComponent(target, this.updateMask); }
/** Update the component according to the update mask specified * in the constructor of the action. * @param target target component to be updated. */ public void updateComponent(JTextComponent target) { updateComponent(target, this.updateMask); }
/** * This method is made final here as there's an important processing that * must be done before the real action functionality is performed. It can * include the following: 1. Updating of the target component depending on * the update mask given in action constructor. 2. Possible macro recoding * when the macro recording is turned on. The real action functionality * should be done in the method actionPerformed(ActionEvent evt, * JTextComponent target) which must be redefined by the target action. */ public final void actionPerformed(ActionEvent evt) { JTextComponent target = getTextComponent(evt); if (recording && 0 == (updateMask & NO_RECORDING)) { recordAction(target, evt); } updateComponent(target); actionPerformed(evt, target); }
/** This method is made final here as there's an important * processing that must be done before the real action * functionality is performed. It can include the following: * 1. Updating of the target component depending on the update * mask given in action constructor. * 2. Possible macro recoding when the macro recording * is turned on. * The real action functionality should be done in * the method actionPerformed(ActionEvent evt, JTextComponent target) * which must be redefined by the target action. */ public final void actionPerformed(final ActionEvent evt) { final JTextComponent target = getTextComponent(evt); if( recording && 0 == (updateMask & NO_RECORDING) ) { recordAction( target, evt ); } updateComponent(target); if (asynchonous()) { RequestProcessor.getDefault().post(new Runnable () { public void run() { actionPerformed(evt, target); } }); } else { actionPerformed(evt, target); } }
ActionEvent newEvt = new ActionEvent( target, 0, new String( new char[] { ch } ) ); if( a instanceof BaseAction ) { ((BaseAction)a).updateComponent(target); ((BaseAction)a).actionPerformed( newEvt, target ); } else { ActionEvent fakeEvt = new ActionEvent( target, 0, "" ); if( a instanceof BaseAction ) { ((BaseAction)a).updateComponent(target); ((BaseAction)a).actionPerformed( fakeEvt, target ); } else {
ActionEvent newEvt = new ActionEvent(target, 0, new String(new char[] { ch })); if (a instanceof BaseAction) { ((BaseAction) a).updateComponent(target); ((BaseAction) a).actionPerformed(newEvt, target); ActionEvent fakeEvt = new ActionEvent(target, 0, ""); if (a instanceof BaseAction) { ((BaseAction) a).updateComponent(target); ((BaseAction) a).actionPerformed(fakeEvt, target);