@ -8,13 +8,29 @@ import javafx.scene.input.KeyCode;
public abstract class ControlKey {
public abstract class ControlKey {
private String name ;
private String name ;
protected int protocolCode ;
/ * *
/ * *
* Constructor for Control
* Constructor for key state with specified protocol code
* @param name of action
* @param protocolCode - 1 if not sent
* /
public ControlKey ( String name , int protocolCode ) {
this . name = name ;
this . protocolCode = protocolCode ;
}
/ * *
* Constructor for key state not sent over network
* @param name name of the key
* @param name name of the key
* /
* /
public ControlKey ( String name ) {
public ControlKey ( String name ) {
this . name = name ;
this . name = name ;
this . protocolCode = - 1 ;
}
public int getProtocolCode ( ) {
return protocolCode ;
}
}
/ * *
/ * *