32 lines
695 B
Java
32 lines
695 B
Java
public class Button {
|
|
private String text; // Text of button.
|
|
private int irCode; // IR code of button.
|
|
|
|
/**
|
|
* Constructor. Initializes text and IR code.
|
|
* @param text Text of button.
|
|
* @param irCode IR code of button.
|
|
*/
|
|
public Button(String text, int irCode) {
|
|
this.text = text;
|
|
this.irCode = irCode;
|
|
System.out.println("New button: " + text + " " + irCode);
|
|
}
|
|
|
|
public String getText() {
|
|
return text;
|
|
}
|
|
|
|
public void setText(String text) {
|
|
this.text = text;
|
|
}
|
|
|
|
public int getIrCode() {
|
|
return irCode;
|
|
}
|
|
|
|
public void setIrCode(int irCode) {
|
|
this.irCode = irCode;
|
|
}
|
|
}
|