comparison src/viewer_swing/java/com/glavsoft/viewer/swing/gui/OptionsDialog.java @ 396:b344444aca13

Add RederingForSpeed option to OptionsDialog
author innparusu
date Thu, 01 Oct 2015 19:55:42 +0900
parents 17b702648079
children
comparison
equal deleted inserted replaced
395:704ac9e79e25 396:b344444aca13
50 50
51 private RadioButtonSelectedState<LocalPointer> mouseCursorTrackSelected; 51 private RadioButtonSelectedState<LocalPointer> mouseCursorTrackSelected;
52 private Map<LocalPointer, JRadioButton> mouseCursorTrackMap; 52 private Map<LocalPointer, JRadioButton> mouseCursorTrackMap;
53 private JCheckBox useCompressionLevel; 53 private JCheckBox useCompressionLevel;
54 private JCheckBox useJpegQuality; 54 private JCheckBox useJpegQuality;
55 private JCheckBox renderingQuality;
55 private JLabel jpegQualityPoorLabel; 56 private JLabel jpegQualityPoorLabel;
56 private JLabel jpegQualityBestLabel; 57 private JLabel jpegQualityBestLabel;
57 private JLabel compressionLevelFastLabel; 58 private JLabel compressionLevelFastLabel;
58 private JLabel compressionLevelBestLabel; 59 private JLabel compressionLevelBestLabel;
59 private JCheckBox allowCopyRect; 60 private JCheckBox allowCopyRect;
135 jpegQuality.setValue(Math.abs(settings.getJpegQuality())); 136 jpegQuality.setValue(Math.abs(settings.getJpegQuality()));
136 setJpegQualityPaneEnable(); 137 setJpegQualityPaneEnable();
137 138
138 allowCopyRect.setSelected(settings.isAllowCopyRect()); 139 allowCopyRect.setSelected(settings.isAllowCopyRect());
139 disableClipboardTransfer.setSelected( ! settings.isAllowClipboardTransfer()); 140 disableClipboardTransfer.setSelected( ! settings.isAllowClipboardTransfer());
140 } 141 renderingQuality.setSelected(uiSettings.getData().isRenderingForSpeed());
142 }
141 143
142 private void setSettingsFromControls() { 144 private void setSettingsFromControls() {
143 settings.setViewOnly(viewOnlyCheckBox.isSelected()); 145 settings.setViewOnly(viewOnlyCheckBox.isSelected());
144 settings.setPreferredEncoding(((EncodingSelectItem)encodings.getSelectedItem()).type); 146 settings.setPreferredEncoding(((EncodingSelectItem)encodings.getSelectedItem()).type);
145 147
155 settings.setJpegQuality(useJpegQuality.isSelected() ? 157 settings.setJpegQuality(useJpegQuality.isSelected() ?
156 jpegQuality.getValue() : 158 jpegQuality.getValue() :
157 - Math.abs(settings.getJpegQuality())); 159 - Math.abs(settings.getJpegQuality()));
158 settings.setAllowCopyRect(allowCopyRect.isSelected()); 160 settings.setAllowCopyRect(allowCopyRect.isSelected());
159 settings.setAllowClipboardTransfer( ! disableClipboardTransfer.isSelected()); 161 settings.setAllowClipboardTransfer( ! disableClipboardTransfer.isSelected());
162 uiSettings.getData().setRenderingForSpeed(renderingQuality.isSelected());
160 settings.fireListeners(); 163 settings.fireListeners();
161 } 164 }
162 165
163 private Component createLeftPane() { 166 private Component createLeftPane() {
164 Box box = Box.createVerticalBox(); 167 Box box = Box.createVerticalBox();
200 203
201 disableClipboardTransfer = new JCheckBox("Disable clipboard transfer"); 204 disableClipboardTransfer = new JCheckBox("Disable clipboard transfer");
202 disableClipboardTransfer.setAlignmentX(LEFT_ALIGNMENT); 205 disableClipboardTransfer.setAlignmentX(LEFT_ALIGNMENT);
203 restrictionsBox.add(disableClipboardTransfer); 206 restrictionsBox.add(disableClipboardTransfer);
204 207
208 renderingQuality = new JCheckBox("Rendering for speed");
209 renderingQuality.setAlignmentX(LEFT_ALIGNMENT);
210 restrictionsBox.add(renderingQuality);
211
205 return restrictionsPanel; 212 return restrictionsPanel;
206 } 213 }
214
207 215
208 private JPanel createEncodingsPanel() { 216 private JPanel createEncodingsPanel() {
209 JPanel encodingsPanel = new JPanel(); 217 JPanel encodingsPanel = new JPanel();
210 encodingsPanel.setAlignmentX(LEFT_ALIGNMENT); 218 encodingsPanel.setAlignmentX(LEFT_ALIGNMENT);
211 encodingsPanel.setLayout(new BoxLayout(encodingsPanel, BoxLayout.Y_AXIS)); 219 encodingsPanel.setLayout(new BoxLayout(encodingsPanel, BoxLayout.Y_AXIS));