summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoredsells <edsells@cb376a5e-1013-0410-a455-b6b1f9ac8223>2007-08-16 19:07:27 +0000
committeredsells <edsells@cb376a5e-1013-0410-a455-b6b1f9ac8223>2007-08-16 19:07:27 +0000
commit26e35a6ffb444357d30e0af757a81a31e2d85deb (patch)
tree896b83a3c08722c03d9a47cfa9c755559df83847
parent2e046bf442b43d15ec14414390adf7610eb487f7 (diff)
downloadreprap-backup-26e35a6ffb444357d30e0af757a81a31e2d85deb.tar.gz
reprap-backup-26e35a6ffb444357d30e0af757a81a31e2d85deb.zip
Working notes on WorkingVolumeProbe
git-svn-id: https://reprap.svn.sourceforge.net/svnroot/reprap@825 cb376a5e-1013-0410-a455-b6b1f9ac8223
-rw-r--r--trunk/users/ed/Potential mods to code121
1 files changed, 121 insertions, 0 deletions
diff --git a/trunk/users/ed/Potential mods to code b/trunk/users/ed/Potential mods to code
index dc0c2374..035f4f0b 100644
--- a/trunk/users/ed/Potential mods to code
+++ b/trunk/users/ed/Potential mods to code
@@ -14,3 +14,124 @@ Add to org.reprap.Main above "JMenuItem toolsExerciser":
}});
toolsMenu.add(toolsWorkingVolume);
+Existing WorkingVolumeFrame:
+
+/* @author Ed Sells 27 July 2007
+ *
+ * Status: Actively working on it.
+ *
+ * Designed to walk the axes to their extents
+ * thus setting the working volume of the printer.
+ *
+ */
+
+package org.reprap.gui.steppertest;
+
+import java.awt.BorderLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+//import javax.swing.JTextField;
+import javax.swing.border.EtchedBorder;
+import javax.swing.border.TitledBorder;
+//import org.reprap.Printer;
+//import java.io.IOException;
+
+public class WorkingVolumeFrame extends JFrame {
+
+ private JLabel status;
+
+ public WorkingVolumeFrame()
+ {
+ status = new JLabel("Pick an axis, then zero it by clicking on the home button.");
+ getContentPane().add(status, BorderLayout.CENTER);
+
+ createControlPanel();
+ pack();
+ setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ show();
+ }
+
+ public void createControlPanel()
+ {
+ JPanel xPanel = createXPanel();
+ //JPanel yPanel = createYPanel();
+ //JPanel zPanel = createZPanel();
+
+ JPanel controlPanel = new JPanel();
+ controlPanel.setLayout(new GridLayout(3,1));
+ controlPanel.add(xPanel);
+ //controlPanel.add(yPanel);
+ //controlPanel.add(zPanel);
+
+ getContentPane().add(controlPanel, BorderLayout.SOUTH);
+
+ }
+
+ public JPanel createXPanel()
+ {
+ JButton home = new JButton("Home");
+ home.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ status.setText("Homing...");
+ status.repaint();
+ //onHomeReset();
+ //When homed, reset JLabel to "When homed, push an 'Advance' button to move towards the end of the axis..."
+ }
+ });
+
+ JButton advanceFast = new JButton("Advance FAST");
+ advanceFast.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ status.setText("Advancing... be ready to push the STOP button when the axis nears the end.");
+ status.repaint();
+ //go fast;
+ }
+ });
+
+ JButton advanceSlow = new JButton("Advance SLOW");
+ advanceSlow.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ status.setText("Advancing... be ready to push the STOP button when the axis nears the end.");
+ status.repaint();
+ //go slow;
+ }
+ });
+
+ JButton stop = new JButton("STOP!");
+ stop.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ status.setText("Axis stopped. To save this position as the endstop, click 'Set as Limit'.");
+ status.repaint();
+ //stop;
+ }
+ });
+
+ JButton set = new JButton("Set as Limit");
+ set.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ status.setText("Limit set. Returning home...");
+ status.repaint();
+ //update preferences
+ //go home
+ //when home reset JLabel
+ }
+ });
+
+ JPanel panel = new JPanel();
+
+ panel.setBorder(new TitledBorder(new EtchedBorder(), "X-Axis"));
+ panel.add(home);
+ panel.add(advanceFast);
+ panel.add(advanceSlow);
+ panel.add(stop);
+ panel.add(set);
+ return panel;
+
+ }
+}
+