\r
options.customCompressLevel.setSelected(viewer.customCompressLevel.getValue());\r
digit = 0 + viewer.compressLevel.getValue();\r
- options.compressLevel.setSelectedIndex(digit);\r
+ options.compressLevel.setSelectedItem(digit);\r
options.noJpeg.setSelected(!viewer.noJpeg.getValue());\r
digit = 0 + viewer.qualityLevel.getValue();\r
- options.qualityLevel.setSelectedIndex(digit);\r
+ options.qualityLevel.setSelectedItem(digit);\r
\r
options.viewOnly.setSelected(viewer.viewOnly.getValue());\r
options.acceptClipboard.setSelected(viewer.acceptClipboard.getValue());\r
cp.customCompressLevel = viewer.customCompressLevel.getValue();\r
encodingChange = true;\r
}\r
- viewer.compressLevel.setParam(Integer.toString(options.compressLevel.getSelectedIndex()));\r
+ viewer.compressLevel.setParam(options.compressLevel.getSelectedItem().toString());\r
if (cp.compressLevel != viewer.compressLevel.getValue()) {\r
cp.compressLevel = viewer.compressLevel.getValue();\r
encodingChange = true;\r
cp.noJpeg = viewer.noJpeg.getValue();\r
encodingChange = true;\r
}\r
- viewer.qualityLevel.setParam(Integer.toString(options.qualityLevel.getSelectedIndex()));\r
+ viewer.qualityLevel.setParam(options.qualityLevel.getSelectedItem().toString());\r
if (cp.qualityLevel != viewer.qualityLevel.getValue()) {\r
cp.qualityLevel = viewer.qualityLevel.getValue();\r
encodingChange = true;\r
JPanel tightPanel = new JPanel(new GridBagLayout());\r
customCompressLevel = new JCheckBox("Custom Compression Level");\r
customCompressLevel.addItemListener(this);\r
- String[] compressionLevels = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };\r
+ Object[] compressionLevels = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };\r
compressLevel = new JComboBox(compressionLevels);\r
JLabel compressionLabel = new JLabel("Level (1=fast, 9=best)");\r
noJpeg = new JCheckBox("Allow JPEG Compression");\r
noJpeg.addItemListener(this);\r
- String[] qualityLevels = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };\r
+ Object[] qualityLevels = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };\r
qualityLevel = new JComboBox(qualityLevels);\r
JLabel qualityLabel = new JLabel("Level (1=poor, 9=best)");\r
addGBComponent(customCompressLevel, tightPanel, 0, 0, 2, 1, 2, 2, 1, 0, GridBagConstraints.HORIZONTAL, GridBagConstraints.FIRST_LINE_START, new Insets(0,2,0,0));\r