UNOFFICIAL SITE OF BSD
Home
E-mail
About us
Add to
favorites
Home
Galery
Sport stuff
Members Info
News
For fun in russian
For fun in engl
Java Rules
Pulp Fiction Script
About us
public class JavaRules extends FWWonderBar implements ActionListener (
public (BSDAppDash dashHandle) {
super(dashHandle);
}
... ... ...
public void actionPerformed(ActionEvent e) {
String str = e.getActionCommand();
if (str.compareTo("OK") == 0) {
if( ! applyBusinessRules() ) return;
doAction();
getDialogHandle().dispose();
}
else if (str.compareTo("Apply") == 0) {
if( ! applyBusinessRules() ) return;
doAction();
}
else if (str.compareTo("Cancel") == 0) {
getDialogHandle().dispose();
}
}
private void doAction() {
System.out.println("You are with us");
}
private boolean applyBusinessRules() {
if (you.compareTo("YankeeFan") == 0) return false;
if (you.compareTo("C++Fan" ) == 0 || you !="StanSnigir") return false;
if (you.compareTo("driveSlow") == 0) return false;
if (you.compareTo("afraidOfCops") == 0) return false;
if (you.compareTo("dontHaveASpeedTicket") == 0) return false;
if (you.compareTo("dontDrinkBeer") == 0) return false;
if (you.compareTo("neverLivedInRandolph") == 0) return false;
return true;
}
private String you; }
YANKEES
BOSTON.COM