use of java.awt.event.InputEvent in project jmeter by apache.
the class TristateCheckBox method iterateState.
// Mostly delegates to model
private void iterateState() {
//Maybe do nothing at all?
if (!getModel().isEnabled()) {
return;
}
grabFocus();
// Iterate state
getTristateModel().iterateState();
// Fire ActionEvent
int modifiers = 0;
AWTEvent currentEvent = EventQueue.getCurrentEvent();
if (currentEvent instanceof InputEvent) {
modifiers = ((InputEvent) currentEvent).getModifiers();
} else if (currentEvent instanceof ActionEvent) {
modifiers = ((ActionEvent) currentEvent).getModifiers();
}
fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, getText(), System.currentTimeMillis(), modifiers));
}
Aggregations