Search in sources :

Example 1 with VisualizerPanel

use of com.willwinder.universalgcodesender.visualizer.VisualizerPanel in project Universal-G-Code-Sender by winder.

the class ExperimentalWindow method initComponents.

/**
 * This method is called from within the constructor to
 * initialize the form.
 */
@SuppressWarnings("unchecked")
private void initComponents() {
    // Initialize services
    jogService = new JogService(backend);
    controlContextTabbedPane = new JTabbedPane();
    actionPanel = new ActionPanel(backend);
    macroEditPanel = new JScrollPane();
    macroPanel = new MacroPanel(backend);
    visualizerPanel = new VisualizerPanel(backend);
    connectionPanel = new ConnectionPanelGroup(backend, jogService);
    commandPanel = new CommandPanel(backend);
    mainMenuBar = new JMenuBar();
    settingsMenu = new JMenu();
    grblConnectionSettingsMenuItem = new javax.swing.JMenuItem();
    firmwareSettingsMenu = new javax.swing.JMenu();
    grblFirmwareSettingsMenuItem = new javax.swing.JMenuItem();
    gcodeProcessorSettings = new javax.swing.JMenuItem();
    pendantMenu = new com.willwinder.universalgcodesender.uielements.components.PendantMenu(backend);
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setMinimumSize(new java.awt.Dimension(640, 520));
    controlContextTabbedPane.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
    controlContextTabbedPane.setMinimumSize(new java.awt.Dimension(395, 175));
    controlContextTabbedPane.setPreferredSize(new java.awt.Dimension(2000, 283));
    controlContextTabbedPane.addComponentListener(new java.awt.event.ComponentAdapter() {

        public void componentShown(java.awt.event.ComponentEvent evt) {
            controlContextTabbedPaneComponentShown(evt);
        }
    });
    controlContextTabbedPane.addTab("Machine Control", actionPanel);
    macroEditPanel.setViewportView(macroPanel);
    controlContextTabbedPane.addTab("Macros", macroEditPanel);
    controlContextTabbedPane.addTab("Visualizer", visualizerPanel);
    connectionPanel.setMinimumSize(new java.awt.Dimension(1, 1));
    connectionPanel.setPreferredSize(new java.awt.Dimension(275, 130));
    settingsMenu.setText("Settings");
    grblConnectionSettingsMenuItem.setText("Sender Settings");
    grblConnectionSettingsMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            grblConnectionSettingsMenuItemActionPerformed(evt);
        }
    });
    settingsMenu.add(grblConnectionSettingsMenuItem);
    gcodeProcessorSettings.setText("Gcode Processor Settings");
    gcodeProcessorSettings.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            gcodeProcessorSettingsActionPerformed(evt);
        }
    });
    settingsMenu.add(gcodeProcessorSettings);
    firmwareSettingsMenu.setText("Firmware Settings");
    grblFirmwareSettingsMenuItem.setText("GRBL");
    grblFirmwareSettingsMenuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            grblFirmwareSettingsMenuItemActionPerformed(evt);
        }
    });
    firmwareSettingsMenu.add(grblFirmwareSettingsMenuItem);
    settingsMenu.add(firmwareSettingsMenu);
    mainMenuBar.add(settingsMenu);
    pendantMenu.setText("Pendant");
    mainMenuBar.add(pendantMenu);
    setJMenuBar(mainMenuBar);
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout.createSequentialGroup().add(connectionPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(controlContextTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 764, Short.MAX_VALUE).add(commandPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))));
    layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout.createSequentialGroup().add(controlContextTabbedPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 294, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(commandPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)).add(connectionPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    pack();
}
Also used : ConnectionPanelGroup(com.willwinder.universalgcodesender.uielements.panels.ConnectionPanelGroup) JogService(com.willwinder.universalgcodesender.services.JogService) CommandPanel(com.willwinder.universalgcodesender.uielements.panels.CommandPanel) VisualizerPanel(com.willwinder.universalgcodesender.visualizer.VisualizerPanel) MacroPanel(com.willwinder.universalgcodesender.uielements.macros.MacroPanel) ComponentEvent(java.awt.event.ComponentEvent) javax.swing(javax.swing) ActionPanel(com.willwinder.universalgcodesender.uielements.panels.ActionPanel) java.awt(java.awt)

Aggregations

JogService (com.willwinder.universalgcodesender.services.JogService)1 MacroPanel (com.willwinder.universalgcodesender.uielements.macros.MacroPanel)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 VisualizerPanel (com.willwinder.universalgcodesender.visualizer.VisualizerPanel)1 java.awt (java.awt)1 ComponentEvent (java.awt.event.ComponentEvent)1 javax.swing (javax.swing)1