forked from j62/ctbrec
1
0
Fork 0
ctbrec/client/src/main/java/ctbrec/ui/controls/ProgramSelectionBox.java

25 lines
554 B
Java

package ctbrec.ui.controls;
import java.io.File;
public class ProgramSelectionBox extends FileSelectionBox {
public ProgramSelectionBox() {
}
public ProgramSelectionBox(String initialValue) {
super(initialValue);
}
@Override
protected String validate(File file) {
String msg = super.validate(file);
if(msg != null) {
return msg;
} else if (!file.canExecute()) {
return "This is not an executable application";
} else {
return null;
}
}
}