/******************************************************************************************************************* * * ******************************************************************************************************************/ private void computeEnablements() { count.setEnabled(countType.getValue() != CountType.NOT_COUNTED); maxCount.setEnabled(countType.getValue() == CountType.RANGE); }
@Override public void onConfirm() { flowController.finish(); } }));
public void onCheckedChanged (final @Nonnull CompoundButton buttonView, final boolean isChecked) { property.setValue(isChecked); } });
/******************************************************************************************************************* * ******************************************************************************************************************/ private void onButtonDialogOkPressed() { presentation.notify(notificationWithFeedback() .withCaption("Notification") .withText("Now press the button") .withFeedback(feedback().withOnConfirm(() -> presentation.notify("Pressed ok")))); }
public void run() { Toast.makeText(activity, notification.getText(), Toast.LENGTH_SHORT).show(); } });
private void showFeedback() { final int text = (model.getValue() != null) ? R.string.noteUpdated : R.string.noteErased; Toast.makeText(context, text, Toast.LENGTH_SHORT).show(); } }
/******************************************************************************************************************* * * ******************************************************************************************************************/ public CountAndGenderFormModel() { computeEnablements(); countType.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange (final @Nonnull PropertyChangeEvent event) { computeEnablements(); } }); }
public void actionPerformed (final @Nonnull ActionEvent event) { pickTaxon(); controlFlow.toNextStep(); } };
public boolean compute (final @Nonnull Object... args) { return !condition.compute(args); } };
/******************************************************************************************************************* * * ******************************************************************************************************************/ public void setValue (final Type value) { log.trace("{}.setValue({})", name, value); final Type oldValue = this.value; this.value = value; propertyChangeSupport.firePropertyChange(PROP_VALUE, oldValue, value); form.revalidate(); }
/******************************************************************************************************************* * * * ******************************************************************************************************************/ public ReportUserNotificationWithFeedback (final @Nonnull String title) { super(title, "", new Feedback()); reportFactory = reportFactoryProvider.createReportFactory(); }
/******************************************************************************************************************* * * * ******************************************************************************************************************/ @Nonnull public static UserNotificationMatcher notification (final @Nonnull String caption, final @Nonnull String text) { return new UserNotificationMatcher(caption, text); }
/******************************************************************************************************************* * * * ******************************************************************************************************************/ @Nonnull public static UserNotificationWithFeedbackMatcher notificationWithFeedback (final @Nonnull String caption, final @Nonnull String text) { return new UserNotificationWithFeedbackMatcher(caption, text); }
/******************************************************************************************************************* * ******************************************************************************************************************/ private void onButtonDialogOkCancelPressed() { presentation.notify(notificationWithFeedback() .withCaption("Notification") .withText("Now press the button") .withFeedback(feedback().withOnConfirm(() -> presentation.notify("Pressed ok")) .withOnCancel(() -> presentation.notify("Pressed cancel")))); }
public void run() { Toast.makeText(view.getContext(), notification.getText(), Toast.LENGTH_SHORT).show(); } });
public void onNothingSelected (final @Nonnull AdapterView<?> parent) { property.setValue(null); } });
public void actionPerformed (final @Nonnull ActionEvent event) { pickTaxon(); controlFlow.toNextStep(ADD_MORE__); } };
public void onClick (final @Nonnull DialogInterface dialog, final int whichButton) { model.setValue(etNote.getText().toString().trim()); showFeedback(); } })
public void onClick (final @Nonnull DialogInterface dialog, final int whichButton) { model.setValue(null); showFeedback(); } })
public void onItemSelected (final @Nonnull AdapterView<?> parent, final @Nonnull View view, final @Nonnegative int position, final long id) { property.setValue(values[position]); }