aboutsummaryrefslogtreecommitdiff
path: root/Week15 Mandelbrot/src/com/camilstaps/mandelbrot/MandelbrotWindow.java
diff options
context:
space:
mode:
authorCamil Staps2015-06-04 22:33:05 +0200
committerCamil Staps2015-06-04 22:33:30 +0200
commit85751141b5705dba503b507ab34cc4ee734a9e6a (patch)
tree03fd9ccca1cc3af668bd2ee2b3510ba32268cb33 /Week15 Mandelbrot/src/com/camilstaps/mandelbrot/MandelbrotWindow.java
parentStart week15 (diff)
Started own version
Diffstat (limited to 'Week15 Mandelbrot/src/com/camilstaps/mandelbrot/MandelbrotWindow.java')
-rw-r--r--Week15 Mandelbrot/src/com/camilstaps/mandelbrot/MandelbrotWindow.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/Week15 Mandelbrot/src/com/camilstaps/mandelbrot/MandelbrotWindow.java b/Week15 Mandelbrot/src/com/camilstaps/mandelbrot/MandelbrotWindow.java
new file mode 100644
index 0000000..163dca9
--- /dev/null
+++ b/Week15 Mandelbrot/src/com/camilstaps/mandelbrot/MandelbrotWindow.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2015 Camil Staps
+ */
+package com.camilstaps.mandelbrot;
+
+import javax.swing.JButton;
+import javax.swing.JTextField;
+
+/**
+ *
+ * @author camilstaps
+ */
+public class MandelbrotWindow {
+
+ private final DrawView drawView;
+
+ private final String INITIAL_CENTER_X = "0",
+ INITIAL_CENTER_Y = "0",
+ INITIAL_SCALE = "100",
+ INITIAL_REPETITIONS = "100";
+
+ private final JTextField field_centerX = new JTextField(INITIAL_CENTER_X, 6);
+ private final JTextField field_centerY = new JTextField(INITIAL_CENTER_Y, 6);
+ private final JTextField field_scale = new JTextField(INITIAL_SCALE, 6);
+ private final JTextField field_repetitions = new JTextField(INITIAL_REPETITIONS, 6);
+ private final JButton button_redraw = new JButton("Redraw");
+
+ private MandelbrotWindow() {
+ FractalModel fm = new FractalModel();
+ drawView = new DrawView(fm);
+
+ ZoomFrame frame = new ZoomFrame("Mandelbrot", drawView);
+ }
+
+ public static void main(String[] args) {
+ MandelbrotWindow mw = new MandelbrotWindow();
+ }
+
+}