Search in sources :

Example 1 with ControllerProcessorSettingsPanel

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

the class MainWindow method gcodeProcessorSettingsActionPerformed.

// GEN-LAST:event_helpButtonMachineControlActionPerformed
private void gcodeProcessorSettingsActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_gcodeProcessorSettingsActionPerformed
    UGSSettingsDialog gcsd = new UGSSettingsDialog(Localization.getString("settings.processors.header"), settings, new ControllerProcessorSettingsPanel(settings, 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 : ControllerProcessorSettingsPanel(com.willwinder.universalgcodesender.uielements.panels.ControllerProcessorSettingsPanel)

Example 2 with ControllerProcessorSettingsPanel

use of com.willwinder.universalgcodesender.uielements.panels.ControllerProcessorSettingsPanel 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)

Example 3 with ControllerProcessorSettingsPanel

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

the class WidgetPreviewer method main.

public static void main(String[] args) throws Exception {
    BackendAPI backend = new GUIBackend();
    backend.applySettings(SettingsFactory.loadSettings());
    JPanel panel = new JPanel();
    // Create the main frame.
    JFrame frame = new JFrame("Widget Previewer");
    frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    frame.getContentPane().setLayout(new BorderLayout());
    frame.getContentPane().add(panel, BorderLayout.CENTER);
    // Button panel...
    panel.setLayout(new MigLayout("wrap 1"));
    panel.add(frameLauncherButton("ConnectionPanelGroup", new ConnectionPanelGroup(backend, new JogService(backend))));
    panel.add(frameLauncherButton("CommandTextArea", new CommandTextArea(backend)));
    // panel.add(frameLauncherButton("ConnectionSettingsDialog", new ConnectionSettingsDialog(backend.getSettings()), null, false));
    panel.add(dialogLauncherButton("ConnectionSettingsPanel", new UGSSettingsDialog("ConnectionSettingsPanel", backend.getSettings(), new ConnectionSettingsPanel(backend.getSettings()), frame, true)));
    panel.add(dialogLauncherButton("ControllerProcessorSettingsPanel", new UGSSettingsDialog("ControllerProcessorSettingsPanel", backend.getSettings(), new ControllerProcessorSettingsPanel(backend.getSettings(), FirmwareUtils.getConfigFiles()), frame, true)));
    panel.add(frameLauncherButton("MacroActionPanel", new MacroActionPanel(backend)));
    panel.add(frameLauncherButton("MacroPanel", new MacroPanel(backend)));
    panel.add(frameLauncherButton("OverridesPanel", new OverridesPanel(backend)));
    panel.add(frameLauncherButton("SendStatusLine", new SendStatusLine(backend)));
    panel.add(frameLauncherButton("SendStatusPanel", new SendStatusPanel(backend)));
    panel.add(frameLauncherButton("ActionButtonPanel", new ActionButtonPanel(backend)));
    panel.add(frameLauncherButton("ActionPanel", new ActionPanel(backend)));
    panel.add(frameLauncherButton("CommandPanel", new CommandPanel(backend)));
    panel.add(frameLauncherButton("JogPanel(true)", new JogPanel(backend, new JogService(backend), true)));
    panel.add(frameLauncherButton("JogPanel(false)", new JogPanel(backend, new JogService(backend), false)));
    panel.add(frameLauncherButton("MachineStatusPanel", new MachineStatusPanel(backend)));
    // Display the main frame.
    frame.pack();
    frame.setVisible(true);
}
Also used : JogPanel(com.willwinder.universalgcodesender.uielements.jog.JogPanel) ConnectionPanelGroup(com.willwinder.universalgcodesender.uielements.panels.ConnectionPanelGroup) BackendAPI(com.willwinder.universalgcodesender.model.BackendAPI) MacroPanel(com.willwinder.universalgcodesender.uielements.macros.MacroPanel) MigLayout(net.miginfocom.swing.MigLayout) GUIBackend(com.willwinder.universalgcodesender.model.GUIBackend) SendStatusPanel(com.willwinder.universalgcodesender.uielements.panels.SendStatusPanel) JogService(com.willwinder.universalgcodesender.services.JogService) CommandTextArea(com.willwinder.universalgcodesender.uielements.components.CommandTextArea) CommandPanel(com.willwinder.universalgcodesender.uielements.panels.CommandPanel) BorderLayout(java.awt.BorderLayout) MachineStatusPanel(com.willwinder.universalgcodesender.uielements.panels.MachineStatusPanel) ConnectionSettingsPanel(com.willwinder.universalgcodesender.uielements.panels.ConnectionSettingsPanel) MacroActionPanel(com.willwinder.universalgcodesender.uielements.macros.MacroActionPanel) OverridesPanel(com.willwinder.universalgcodesender.uielements.panels.OverridesPanel) ControllerProcessorSettingsPanel(com.willwinder.universalgcodesender.uielements.panels.ControllerProcessorSettingsPanel) ActionPanel(com.willwinder.universalgcodesender.uielements.panels.ActionPanel) MacroActionPanel(com.willwinder.universalgcodesender.uielements.macros.MacroActionPanel) ActionButtonPanel(com.willwinder.universalgcodesender.uielements.panels.ActionButtonPanel)

Aggregations

ControllerProcessorSettingsPanel (com.willwinder.universalgcodesender.uielements.panels.ControllerProcessorSettingsPanel)3 BackendAPI (com.willwinder.universalgcodesender.model.BackendAPI)1 GUIBackend (com.willwinder.universalgcodesender.model.GUIBackend)1 JogService (com.willwinder.universalgcodesender.services.JogService)1 UGSSettingsDialog (com.willwinder.universalgcodesender.uielements.UGSSettingsDialog)1 CommandTextArea (com.willwinder.universalgcodesender.uielements.components.CommandTextArea)1 JogPanel (com.willwinder.universalgcodesender.uielements.jog.JogPanel)1 MacroActionPanel (com.willwinder.universalgcodesender.uielements.macros.MacroActionPanel)1 MacroPanel (com.willwinder.universalgcodesender.uielements.macros.MacroPanel)1 ActionButtonPanel (com.willwinder.universalgcodesender.uielements.panels.ActionButtonPanel)1 ActionPanel (com.willwinder.universalgcodesender.uielements.panels.ActionPanel)1 CommandPanel (com.willwinder.universalgcodesender.uielements.panels.CommandPanel)1 ConnectionPanelGroup (com.willwinder.universalgcodesender.uielements.panels.ConnectionPanelGroup)1 ConnectionSettingsPanel (com.willwinder.universalgcodesender.uielements.panels.ConnectionSettingsPanel)1 MachineStatusPanel (com.willwinder.universalgcodesender.uielements.panels.MachineStatusPanel)1 OverridesPanel (com.willwinder.universalgcodesender.uielements.panels.OverridesPanel)1 SendStatusPanel (com.willwinder.universalgcodesender.uielements.panels.SendStatusPanel)1 BorderLayout (java.awt.BorderLayout)1 MigLayout (net.miginfocom.swing.MigLayout)1