import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
-import java.util.concurrent.Callable;
import javax.swing.JComboBox;
import javax.swing.JLabel;
*/
public void showDialog()
{
- Callable<Void> okAction = forCreate ? getCreateAction()
- : getAmendAction();
- Callable<Void> cancelAction = getCancelAction();
+ Runnable okAction = forCreate ? getCreateAction() : getAmendAction();
+ Runnable cancelAction = getCancelAction();
/*
* set dialog action handlers for OK (create/Amend) and Cancel options
*
* @return
*/
- protected Callable getCancelAction()
+ protected Runnable getCancelAction()
{
- Callable<Void> okAction = () -> {
+ Runnable okAction = () -> {
ap.highlightSearchResults(null);
ap.paintAlignment(false, false);
- return null;
};
return okAction;
}
*
* @return
*/
- protected Callable getCreateAction()
+ protected Runnable getCreateAction()
{
- Callable<Void> okAction = new Callable()
+ Runnable okAction = new Runnable()
{
boolean useLastDefaults = features.get(0).getType() == null;
@Override
- public Void call()
+ public void run()
{
final String enteredType = name.getText().trim();
final String enteredGroup = group.getText().trim();
repaintPanel();
}
- return null;
}
};
return okAction;
*
* @return
*/
- protected Callable getDeleteAction()
+ protected Runnable getDeleteAction()
{
- Callable<Void> deleteAction = () -> {
+ Runnable deleteAction = () -> {
SequenceFeature sf = features.get(featureIndex);
sequences.get(0).getDatasetSequence().deleteFeature(sf);
fr.featuresAdded();
ap.getSeqPanel().seqCanvas.highlightSearchResults(null);
ap.paintAlignment(true, true);
- return null;
};
return deleteAction;
}
*
* @return
*/
- protected Callable getAmendAction()
+ protected Runnable getAmendAction()
{
- Callable<Void> okAction = new Callable()
+ Runnable okAction = new Runnable()
{
boolean useLastDefaults = features.get(0).getType() == null;
String featureGroup = group.getText();
@Override
- public Void call()
+ public void run()
{
final String enteredType = name.getText().trim();
final String enteredGroup = group.getText().trim();
fr.featuresAdded();
}
repaintPanel();
- return null;
}
};
return okAction;