middle = new ButtonImpl(ButtonID.MIDDLE);
if(numButtons>2) { middle = new ButtonImpl(ButtonID.MIDDLE); } if(numButtons>3) { side = new ButtonImpl(ButtonID.SIDE); } if(numButtons>4) { extra = new ButtonImpl(ButtonID.EXTRA); } if(numButtons>5) { forward = new ButtonImpl(ButtonID.FORWARD); } if(numButtons>6) { back = new ButtonImpl(ButtonID.BACK); }
        public ButtonsImpl() {            super(DirectInputMouse.this.getName() + " buttons");            left = new ButtonImpl(ButtonID.LEFT);            right = new ButtonImpl(ButtonID.RIGHT);            middle = new ButtonImpl(ButtonID.MIDDLE);        }