Created
June 29, 2010 12:10
-
-
Save borkdude/457132 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ButtonOperator extends Button { | |
/*public ButtonOperator(final CalculatorController controller, | |
final AbstractOperator op) { | |
super(op.label); | |
this.addClickHandler(new ClickHandler() { | |
@Override | |
public void onClick(ClickEvent event) { | |
controller.processOperator(op); | |
} | |
}); | |
this.setStyleName(CalculatorConstants.STYLE_BUTTON); | |
}*/ | |
public ButtonOperator(final CalculatorController controller, | |
final BinaryOperator op) { | |
super(op.label); | |
this.addClickHandler(new ClickHandler() { | |
@Override | |
public void onClick(ClickEvent event) { | |
controller.processOperator(op); | |
} | |
}); | |
this.setStyleName(CalculatorConstants.STYLE_BUTTON); | |
} | |
public ButtonOperator(final CalculatorController controller, | |
final UnaryOperator op) { | |
super(op.label); | |
this.addClickHandler(new ClickHandler() { | |
@Override | |
public void onClick(ClickEvent event) { | |
controller.processOperator(op); | |
} | |
}); | |
this.setStyleName(CalculatorConstants.STYLE_BUTTON); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment