Search in sources :

Example 1 with UGSSettingsDialog

use of com.willwinder.universalgcodesender.uielements.UGSSettingsDialog in project Universal-G-Code-Sender by winder.

the class ExperimentalWindow method grblConnectionSettingsMenuItemActionPerformed.

// TODO: It would be nice to streamline this somehow...
private void grblConnectionSettingsMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_grblConnectionSettingsMenuItemActionPerformed
    UGSSettingsDialog gcsd = new UGSSettingsDialog(Localization.getString("sender.header"), backend.getSettings(), new ConnectionSettingsPanel(backend.getSettings()), this, true);
    gcsd.setVisible(true);
    if (gcsd.saveChanges()) {
        try {
            backend.applySettings(backend.getSettings());
        } catch (Exception e) {
            displayErrorDialog(e.getMessage());
        }
    }
}
Also used : UGSSettingsDialog(com.willwinder.universalgcodesender.uielements.UGSSettingsDialog) ConnectionSettingsPanel(com.willwinder.universalgcodesender.uielements.panels.ConnectionSettingsPanel)

Example 2 with UGSSettingsDialog

use of com.willwinder.universalgcodesender.uielements.UGSSettingsDialog in project Universal-G-Code-Sender by winder.

the class ExperimentalWindow method gcodeProcessorSettingsActionPerformed.

// GEN-LAST:event_grblFirmwareSettingsMenuItemActionPerformed
private void gcodeProcessorSettingsActionPerformed(java.awt.event.ActionEvent evt) {
    UGSSettingsDialog gcsd = new UGSSettingsDialog(Localization.getString("settings.processors.header"), backend.getSettings(), new ControllerProcessorSettingsPanel(backend.getSettings(), FirmwareUtils.getConfigFiles()), this, true);
    gcsd.setVisible(true);
    if (gcsd.saveChanges()) {
    // TODO: Reprocess gcode file?
    /*
            try {
                backend.applySettings(settings);
            } catch (Exception e) {
                displayErrorDialog(e.getMessage());
            }

            if (this.vw != null) {
                vw.setMinArcLength(backend.getSettings().getSmallArcThreshold());
                vw.setArcLength(backend.getSettings().getSmallArcSegmentLength());
            }
            */
    }
}
Also used : UGSSettingsDialog(com.willwinder.universalgcodesender.uielements.UGSSettingsDialog) ControllerProcessorSettingsPanel(com.willwinder.universalgcodesender.uielements.panels.ControllerProcessorSettingsPanel)

Aggregations

UGSSettingsDialog (com.willwinder.universalgcodesender.uielements.UGSSettingsDialog)2 ConnectionSettingsPanel (com.willwinder.universalgcodesender.uielements.panels.ConnectionSettingsPanel)1 ControllerProcessorSettingsPanel (com.willwinder.universalgcodesender.uielements.panels.ControllerProcessorSettingsPanel)1