/* */ }
/* 772 */ this.eventAgent.addSensorButtonListeners(this.sensor6D, sbls);
/* */ }
/* */
/* 776 */ if (this.resetViewButtonCount6D != 0) {
/* 777 */ SensorInputAdaptor r = new ResetViewListener(this.sensor6D, this.resetViewButtonCount6D);
/* */
/* 779 */ this.eventAgent.addSensorButtonListener(this.sensor6D, r);
/* 780 */ this.eventAgent.addSensorReadListener(this.sensor6D, r);
/* */ }
/* */ }
/* */
/* 784 */ if (this.sensor2D != null)
/* */ {
/* 786 */ if (this.readAction2D == -1) {
/* 787 */ this.readAction2D = 10;
/* */ }
/* */
/* 790 */ if (this.readAction2D == 10) {
/* 791 */ SensorReadListener r = new RotationListener2D(this.sensor2D, this.sensor6D);
/* */
/* 793 */ this.eventAgent.addSensorReadListener(this.sensor2D, r);
/* */ }
/* 795 */ else if (this.readAction2D == 8) {
/* 796 */ SensorReadListener r = new TranslationListener2D(this.sensor2D, this.sensor6D);
/* */
/* 798 */ this.eventAgent.addSensorReadListener(this.sensor2D, r);
/* */ }
/* 800 */ else if (this.readAction2D == 9) {
/* 801 */ SensorReadListener r = new ScaleListener2D(this.sensor2D, this.sensor6D);
/* */
/* 803 */ this.eventAgent.addSensorReadListener(this.sensor2D, r);
/* */ }
/* */
/* 807 */ int buttonCount = this.sensor2D.getSensorButtonCount();
/* 808 */ int buttonActionCount = this.buttonActions2D.size();
/* 809 */ if (buttonActionCount > buttonCount) {
/* 810 */ throw new IllegalArgumentException("\nbutton index " + (buttonActionCount - 1) + " >= number of buttons (" + buttonCount + ")");
/* */ }
/* */
/* 815 */ if (buttonActionCount > 0)
/* */ {
/* 817 */ SensorButtonListener[] sbls = new SensorButtonListener[buttonCount];
/* 818 */ for (int i = 0; i < buttonActionCount; i++) {
/* 819 */ Integer button = (Integer)this.buttonActions2D.get(i);
/* 820 */ if (button != null) {
/* 821 */ int action = button.intValue();
/* 822 */ if (action == 0)
/* 823 */ sbls[i] = null;
/* 824 */ else if (action == 10) {
/* 825 */ sbls[i] = new RotationListener2D(this.sensor2D, this.sensor6D);
/* */ }
/* 827 */ else if (action == 8) {
/* 828 */ sbls[i] = new TranslationListener2D(this.sensor2D, this.sensor6D);
/* */ }
/* 830 */ else if (action == 9) {
/* 831 */ sbls[i] = new ScaleListener2D(this.sensor2D, this.sensor6D);
/* */ }
/* */ }
/* */ }
/* */
/* 836 */ this.eventAgent.addSensorButtonListeners(this.sensor2D, sbls);
/* */ }
/* */
/* 840 */ if (this.resetViewButtonCount2D != 0) {
/* 841 */ SensorInputAdaptor r = new ResetViewListener(this.sensor2D, this.resetViewButtonCount2D);
/* */
/* 843 */ this.eventAgent.addSensorButtonListener(this.sensor2D, r);
/* 844 */ this.eventAgent.addSensorReadListener(this.sensor2D, r);
/* */ }
/* */ }