Subversion Repositories svn.mios

Rev

Rev 628 | Rev 732 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 628 Rev 721
Line 96... Line 96...
96
96
97
    private ButtonGroup buttonGroup;
97
    private ButtonGroup buttonGroup;
98
98
99
    private JCheckBox waitForUploadRequestCheck;
99
    private JCheckBox waitForUploadRequestCheck;
100
100
101
    private JCheckBox MIOS32Check; // changed during loading preferences
101
    private JCheckBox MIOS32Check;
102
102
103
    private JLabel delayTimeLabel;
103
    private JLabel delayTimeLabel;
104
104
105
    private JSpinner delayTimeSpinner;
105
    private JSpinner delayTimeSpinner;
106
106
Line 228... Line 228...
228
        protocolPanel.add(deviceIDSpinner, gbc);
228
        protocolPanel.add(deviceIDSpinner, gbc);
229
        gbc.gridx++;
229
        gbc.gridx++;
230
230
231
        gbc.insets = new Insets(2, 15, 2, 2);
231
        gbc.insets = new Insets(2, 15, 2, 2);
232
232
233
        MIOS32Check = new JCheckBox("MIOS32", hexFileUpload.getMIOS32_Mode());
233
        MIOS32Check = new JCheckBox("MIOS32", hexFileUpload.isMIOS32Mode());
234
        MIOS32Check.addActionListener(this);
234
        MIOS32Check.addActionListener(this);
235
        protocolPanel.add(MIOS32Check, gbc);
235
        protocolPanel.add(MIOS32Check, gbc);
236
236
237
        gbc.gridx = 0;
237
        gbc.gridx = 0;
238
        gbc.gridy++;
238
        gbc.gridy++;
Line 333... Line 333...
333
        deviceIDLabel.setEnabled(!bUploading);
333
        deviceIDLabel.setEnabled(!bUploading);
334
        deviceIDSpinner.setEnabled(!bUploading);
334
        deviceIDSpinner.setEnabled(!bUploading);
335
335
336
        MIOS32Check.setEnabled(!bUploading);
336
        MIOS32Check.setEnabled(!bUploading);
337
337
338
        if (hexFileUpload.getMIOS32_Mode()) {
338
        if (hexFileUpload.isMIOS32Mode()) {
339
            smartModeButton.setEnabled(false);
339
            smartModeButton.setEnabled(false);
340
            dumbModeButton.setEnabled(false);
340
            dumbModeButton.setEnabled(false);
341
            waitForUploadRequestCheck.setEnabled(false);
341
            waitForUploadRequestCheck.setEnabled(false);
342
            delayTimeLabel.setEnabled(false);
342
            delayTimeLabel.setEnabled(false);
343
            delayTimeSpinner.setEnabled(false);
343
            delayTimeSpinner.setEnabled(false);
Line 356... Line 356...
356
                            && hexFileUpload.getUploadMode() == HexFileUpload.DUMB_MODE);
356
                            && hexFileUpload.getUploadMode() == HexFileUpload.DUMB_MODE);
357
        }
357
        }
358
358
359
        startButton.setEnabled(!bUploading && hexFileUpload.getFile() != null);
359
        startButton.setEnabled(!bUploading && hexFileUpload.getFile() != null);
360
        stopButton.setEnabled(bUploading);
360
        stopButton.setEnabled(bUploading);
361
        queryButton.setEnabled(!bUploading && hexFileUpload.getMIOS32_Mode());
361
        queryButton.setEnabled(!bUploading && hexFileUpload.isMIOS32Mode());
362
    }
362
    }
363
363
364
    public void stateChanged(ChangeEvent e) {
364
    public void stateChanged(ChangeEvent e) {
365
365
366
        Object source = e.getSource();
366
        Object source = e.getSource();
Line 426... Line 426...
426
            hexFileUpload
426
            hexFileUpload
427
                    .setUploadMode(smartModeButton.isSelected() ? HexFileUpload.SMART_MODE
427
                    .setUploadMode(smartModeButton.isSelected() ? HexFileUpload.SMART_MODE
428
                            : HexFileUpload.DUMB_MODE);
428
                            : HexFileUpload.DUMB_MODE);
429
429
430
        } else if (source == MIOS32Check) {
430
        } else if (source == MIOS32Check) {
431
            hexFileUpload.setMIOS32_Mode(MIOS32Check.isSelected());
431
            hexFileUpload.setMIOS32Mode(MIOS32Check.isSelected());
432
432
433
        } else if (source == waitForUploadRequestCheck) {
433
        } else if (source == waitForUploadRequestCheck) {
434
            hexFileUpload.setWaitForUploadRequest(waitForUploadRequestCheck
434
            hexFileUpload.setWaitForUploadRequest(waitForUploadRequestCheck
435
                    .isSelected());
435
                    .isSelected());
436
        }
436
        }
Line 482... Line 482...
482
482
483
                dumbModeButton
483
                dumbModeButton
484
                        .setSelected(hexFileUpload.getUploadMode() == HexFileUpload.DUMB_MODE);
484
                        .setSelected(hexFileUpload.getUploadMode() == HexFileUpload.DUMB_MODE);
485
485
486
            } else if (object == HexFileUpload.MIOS32_MODE) {
486
            } else if (object == HexFileUpload.MIOS32_MODE) {
487
                MIOS32Check.setSelected(hexFileUpload.getMIOS32_Mode());
487
                MIOS32Check.setSelected(hexFileUpload.isMIOS32Mode());
488
            } else if (object == HexFileUpload.WAIT_FOR_UPLOAD) {
488
            } else if (object == HexFileUpload.WAIT_FOR_UPLOAD) {
489
                waitForUploadRequestCheck.setSelected(hexFileUpload
489
                waitForUploadRequestCheck.setSelected(hexFileUpload
490
                        .isWaitForUploadRequest());
490
                        .isWaitForUploadRequest());
491
            }
491
            }
492
492