private void setPriorities(int[] priorities) { final int count = encodings.length; if (priorities.length != count) throw new IllegalArgumentException("priorities"); for (int i = 0; i < count; i++) { encodingConfiguration.setPriority(encodings[i], priorities[i]); } }
@Override public void setValueAt(Object value, int rowIndex, int columnIndex) { if ((columnIndex == 0) && (value instanceof Boolean)) { int priority = ((Boolean) value) ? (getPriorities().length - rowIndex) : 0; MediaFormat encoding = encodings[rowIndex]; // We fire the update event before setting the configuration // property in order to have more reactive user interface. fireTableCellUpdated(rowIndex, columnIndex); encodingConfiguration.setPriority(encoding, priority); } }