/** * Sets the values of all buttons for this SensorRead object. * * @param values array contining the new buttons for this SensorRead * @exception ArrayIndexOutOfBoundsException if this object has 0 buttons or if values.length is * less than the number of buttons in this object. */ public void setButtons(int[] values) { if (numButtons == 0) throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("SensorRead1")); else if (values.length < numButtons) throw new ArrayIndexOutOfBoundsException(J3dI18N.getString("SensorRead0")); System.arraycopy(values, 0, buttonValues, 0, numButtons); }