Subversion Repositories svn.mios

Rev

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

Rev 732 Rev 738
Line 197... Line 197...
197
197
198
        deviceIDLabel = new JLabel("Device ID:");
198
        deviceIDLabel = new JLabel("Device ID:");
199
        deviceIDPanel.add(deviceIDLabel, gbc);
199
        deviceIDPanel.add(deviceIDLabel, gbc);
200
        gbc.gridx++;
200
        gbc.gridx++;
201
201
202
        deviceIDSpinner = new JSpinner(new SpinnerNumberModel(debugFunction.getDeviceID(), 0, 127, 1));
202
        deviceIDSpinner = new JSpinner(new SpinnerNumberModel(debugFunction
-
 
203
                .getDeviceID(), 0, 127, 1));
203
        deviceIDSpinner.addChangeListener(this);
204
        deviceIDSpinner.addChangeListener(this);
204
        JSpinner.DefaultEditor editor = (JSpinner.DefaultEditor) deviceIDSpinner
205
        JSpinner.DefaultEditor editor = (JSpinner.DefaultEditor) deviceIDSpinner
205
                .getEditor();
206
                .getEditor();
206
        JFormattedTextField tf = editor.getTextField();
207
        JFormattedTextField tf = editor.getTextField();
207
        tf.setFormatterFactory(new HexFormatterFactory());
208
        tf.setFormatterFactory(new HexFormatterFactory());
Line 331... Line 332...
331
332
332
        delayTimeLabel = new JLabel("Delay (ms):");
333
        delayTimeLabel = new JLabel("Delay (ms):");
333
        toolBar.add(delayTimeLabel, gbc);
334
        toolBar.add(delayTimeLabel, gbc);
334
        gbc.gridx++;
335
        gbc.gridx++;
335
336
336
        delayTimeSpinner = new JSpinner(new SpinnerNumberModel(debugFunction.getDelayTime(), 0, 2000, 1));
337
        delayTimeSpinner = new JSpinner(new SpinnerNumberModel(debugFunction
-
 
338
                .getDelayTime(), 0, 2000, 1));
337
        delayTimeSpinner.addChangeListener(this);
339
        delayTimeSpinner.addChangeListener(this);
338
        toolBar.add(delayTimeSpinner, gbc);
340
        toolBar.add(delayTimeSpinner, gbc);
339
341
340
        functionBuilder.add(toolBar, BorderLayout.NORTH);
342
        functionBuilder.add(toolBar, BorderLayout.NORTH);
341
343
Line 1019... Line 1021...
1019
            deleteRows();
1021
            deleteRows();
1020
        } else if (ae.getActionCommand().equals("help")) {
1022
        } else if (ae.getActionCommand().equals("help")) {
1021
            showHelp();
1023
            showHelp();
1022
1024
1023
        } else if (source == sramReadAddress) {
1025
        } else if (source == sramReadAddress) {
1024
            debugFunction.setSramReadAddress(decodeString(
1026
            debugFunction.setSramReadAddress(decodeString(sramReadAddress
1025
                    sramReadAddress.getText(), displayHexButton.isSelected()));
1027
                    .getText(), displayHexButton.isSelected()));
1026
1028
1027
        } else if (source == sramReadCounter) {
1029
        } else if (source == sramReadCounter) {
1028
            debugFunction.setSramReadCounter(decodeString(
1030
            debugFunction.setSramReadCounter(decodeString(sramReadCounter
1029
                    sramReadCounter.getText(), displayHexButton.isSelected()));
1031
                    .getText(), displayHexButton.isSelected()));
1030
1032
1031
        } else if (source == sramWriteAddress) {
1033
        } else if (source == sramWriteAddress) {
1032
            debugFunction.setSramWriteAddress(decodeString(sramWriteAddress
1034
            debugFunction.setSramWriteAddress(decodeString(sramWriteAddress
1033
                    .getText(), displayHexButton.isSelected()));
1035
                    .getText(), displayHexButton.isSelected()));
1034
1036
1035
        } else if (source == sramWriteData) {
1037
        } else if (source == sramWriteData) {
1036
            debugFunction.setSramWriteData(decodeString(sramWriteData.getText(),
1038
            debugFunction.setSramWriteData(decodeString(
1037
                    displayHexButton.isSelected()));
1039
                    sramWriteData.getText(), displayHexButton.isSelected()));
1038
        }
1040
        }
1039
    }
1041
    }
1040
1042
1041
    public void focusGained(FocusEvent fe) {
1043
    public void focusGained(FocusEvent fe) {
1042
1044
Line 1045... Line 1047...
1045
    public void focusLost(FocusEvent fe) {
1047
    public void focusLost(FocusEvent fe) {
1046
1048
1047
        Object source = fe.getSource();
1049
        Object source = fe.getSource();
1048
1050
1049
        if (source == sramReadAddress) {
1051
        if (source == sramReadAddress) {
1050
            debugFunction.setSramReadAddress(decodeString(
1052
            debugFunction.setSramReadAddress(decodeString(sramReadAddress
1051
                    sramReadAddress.getText(), displayHexButton.isSelected()));
1053
                    .getText(), displayHexButton.isSelected()));
1052
1054
1053
        } else if (source == sramReadCounter) {
1055
        } else if (source == sramReadCounter) {
1054
            debugFunction.setSramReadCounter(decodeString(
1056
            debugFunction.setSramReadCounter(decodeString(sramReadCounter
1055
                    sramReadCounter.getText(), displayHexButton.isSelected()));
1057
                    .getText(), displayHexButton.isSelected()));
1056
1058
1057
        } else if (source == sramWriteAddress) {
1059
        } else if (source == sramWriteAddress) {
1058
            debugFunction.setSramWriteAddress(decodeString(sramWriteAddress
1060
            debugFunction.setSramWriteAddress(decodeString(sramWriteAddress
1059
                    .getText(), displayHexButton.isSelected()));
1061
                    .getText(), displayHexButton.isSelected()));
1060
1062
1061
        } else if (source == sramWriteData) {
1063
        } else if (source == sramWriteData) {
1062
            debugFunction.setSramWriteData(decodeString(sramWriteData.getText(),
1064
            debugFunction.setSramWriteData(decodeString(
1063
                    displayHexButton.isSelected()));
1065
                    sramWriteData.getText(), displayHexButton.isSelected()));
1064
        }
1066
        }
1065
    }
1067
    }
1066
1068
1067
    public void update(Observable observable, Object object) {
1069
    public void update(Observable observable, Object object) {
1068
1070