/*
 * Copyright (C) 2016 Satomichi Nishihara
 *
 * This file is distributed under the terms of the
 * GNU General Public License. See the file `LICENSE'
 * in the root directory of the present distribution,
 * or http://www.gnu.org/copyleft/gpl.txt .
 */

package burai.app.project.editor.modeler;

import java.net.URL;
import java.util.ResourceBundle;

import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TextField;
import javafx.scene.control.ToggleButton;
import burai.app.QEFXAppController;
import burai.app.project.QEFXProjectController;

public class QEFXModelerEditorController extends QEFXAppController {

    @FXML
    private Button superButton;

    @FXML
    private TextField scaleField1;

    @FXML
    private TextField scaleField2;

    @FXML
    private TextField scaleField3;

    @FXML
    private Button slabButton;

    @FXML
    private TextField millerField1;

    @FXML
    private TextField millerField2;

    @FXML
    private TextField millerField3;

    @FXML
    private ToggleButton symbolToggle;

    @FXML
    private ComboBox<Double> widthCombo;

    @FXML
    private ComboBox<Integer> typeCombo;

    public QEFXModelerEditorController(QEFXProjectController projectController) {
        super(projectController == null ? null : projectController.getMainController());
    }

    @Override
    public void initialize(URL location, ResourceBundle resources) {
        this.setupSuperButton();
        this.setupScaleField1();
        this.setupScaleField2();
        this.setupScaleField3();

        this.setupSlabButton();
        this.setupMillerField1();
        this.setupMillerField2();
        this.setupMillerField3();
    }

    private void setupSuperButton() {
        if (this.superButton == null) {
            return;
        }
        // TODO
    }

    private void setupScaleField1() {
        if (this.scaleField1 == null) {
            return;
        }
        // TODO
    }

    private void setupScaleField2() {
        if (this.scaleField2 == null) {
            return;
        }
        // TODO
    }

    private void setupScaleField3() {
        if (this.scaleField3 == null) {
            return;
        }
        // TODO
    }

    private void setupSlabButton() {
        if (this.slabButton == null) {
            return;
        }
        // TODO
    }

    private void setupMillerField1() {
        if (this.millerField1 == null) {
            return;
        }
        // TODO
    }

    private void setupMillerField2() {
        if (this.millerField2 == null) {
            return;
        }
        // TODO
    }

    private void setupMillerField3() {
        if (this.millerField3 == null) {
            return;
        }
        // TODO
    }

}

@@ -636,78 +636,399 @@
 r;%0D%0A
-%0D%0Apublic class QEFXModelerEditorController extends QEFXAppController %7B
+import burai.com.graphic.svg.SVGLibrary;%0D%0Aimport burai.com.graphic.svg.SVGLibrary.SVGData;%0D%0A%0D%0Apublic class QEFXModelerEditorController extends QEFXAppController %7B%0D%0A%0D%0A    private static final double GRAPHIC_SIZE = 20.0;%0D%0A    private static final String GRAPHIC_CLASS = %22piclight-button%22;%0D%0A%0D%0A    protected QEFXProjectController projectController;%0D%0A%0D%0A    @FXML%0D%0A    private Button screenButton;
 %0D%0A%0D%0A
@@ -1747,24 +1747,77 @@
 roller());%0D%0A
+        this.projectController = projectController;%0D%0A
     %7D%0D%0A%0D%0A   
@@ -1894,24 +1894,61 @@
 sources) %7B%0D%0A
+        this.setupScreenButton();%0D%0A%0D%0A
         this
@@ -2212,32 +2212,494 @@
 d3();%0D%0A    %7D%0D%0A%0D%0A
+    private void setupScreenButton() %7B%0D%0A        if (this.screenButton == null) %7B%0D%0A            return;%0D%0A        %7D%0D%0A%0D%0A        this.screenButton.setText(%22%22);%0D%0A        this.screenButton.setGraphic(SVGLibrary.getGraphic(SVGData.CAMERA, GRAPHIC_SIZE, null, GRAPHIC_CLASS));%0D%0A%0D%0A        this.screenButton.setOnAction(event -%3E %7B%0D%0A            if (this.projectController != null) %7B%0D%0A                this.projectController.sceenShot();%0D%0A            %7D%0D%0A        %7D);%0D%0A    %7D%0D%0A%0D%0A
     private void

set screen-shot of Modeler