Permalink
Browse files

Bug fix

Bug fix
  • Loading branch information...
2 parents 750f698 + 9b7206f commit 0773eb4419e126d2cfa18863306ad1c48050e9b6 @alexbodogit committed Nov 27, 2016
@@ -15,12 +15,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
- */
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+*/
+
package com.anchorage.docks.containers;
import com.anchorage.docks.containers.common.DockCommons;
@@ -40,7 +36,7 @@
@Override
public void putDock(DockNode node, DockNode.DockPosition position, double percentage) {
-
+
if (getChildren().isEmpty()) {
getChildren().add(node);
node.setParentContainer(this);
@@ -52,7 +48,7 @@ public void putDock(DockNode node, DockNode.DockPosition position, double percen
@Override
public void putDock(DockNode node, DockNode nodeTarget, DockNode.DockPosition position, double percentage) {
-
+
if (getChildren().get(0) == nodeTarget) {
manageSubContainers(node, position, percentage);
}
@@ -88,7 +84,7 @@ public void undock(DockNode node) {
node.setParentContainer(null);
}
}
-
+
private void manageSubContainers(DockNode node, DockNode.DockPosition position, double percentage) {
Node existNode = getChildren().get(0);
@@ -104,7 +100,6 @@ private void manageSubContainers(DockNode node, DockNode.DockPosition position,
position = DockNode.DockPosition.BOTTOM;
DockSplitterContainer splitter = (DockSplitterContainer) existNode;
node.dock((DockStation)this, position);
-
} else {
getChildren().remove(existNode);
DockTabberContainer tabber = DockCommons.createTabber(existNode, node, position);
@@ -16,11 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
package com.anchorage.docks.containers.common;
/**
@@ -16,11 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+
package com.anchorage.docks.containers.common;
import com.anchorage.docks.containers.interfaces.DockContainableComponent;
@@ -43,7 +39,7 @@ public static boolean isABorderPosition(DockNode.DockPosition position) {
public static DockSplitterContainer createSplitter(Node existNode, Node newNode, DockNode.DockPosition position, double percentage) {
DockSplitterContainer splitter = createEmptySplitter();
-
+
if (position == DockNode.DockPosition.BOTTOM || position == DockNode.DockPosition.TOP) {
splitter.setOrientation(Orientation.VERTICAL);
}
@@ -16,11 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
package com.anchorage.docks.containers.interfaces;
@@ -16,11 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+
package com.anchorage.docks.containers.interfaces;
import com.anchorage.docks.node.DockNode;
@@ -16,11 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+
package com.anchorage.docks.containers.subcontainers;
import com.anchorage.docks.containers.common.DockCommons;
@@ -16,11 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+
package com.anchorage.docks.containers.subcontainers;
import com.anchorage.docks.containers.common.DockCommons;
@@ -49,7 +45,7 @@ public void putDock(DockNode node, DockNode.DockPosition position, double percen
node.setParentContainer(this);
node.ensureVisibility();
}
-
+
private void createSplitter(DockNode node, DockNode.DockPosition position) {
DockContainer currentContainer = container;
@@ -16,11 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+
package com.anchorage.docks.containers.zones;
import com.anchorage.docks.containers.common.AnchorageSettings;
@@ -16,11 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+
package com.anchorage.docks.containers.zones;
import com.anchorage.docks.node.DockNode;
@@ -16,11 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
+
package com.anchorage.docks.node.ui;
import com.anchorage.docks.containers.SingleDockContainer;
@@ -1,4 +1,21 @@
-
+/**
+ * Copyright 2015-2016 Alessio Vinerbi. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
/*
Created on : 27-dic-2015, 13.25.27
Author : Alessio Vinerbi
@@ -1,4 +1,22 @@
/*
+ * Copyright 2015-2016 Alessio Vinerbi. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
@@ -10,10 +28,8 @@
import com.anchorage.system.AnchorageSystem;
import javafx.application.Application;
import javafx.scene.Scene;
-import javafx.scene.control.TableView;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
-import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;
import java.util.Random;
@@ -1,8 +1,22 @@
/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+ * Copyright 2015-2016 Alessio Vinerbi. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
+
package com.anchorage.demo;
import com.anchorage.docks.containers.common.AnchorageSettings;
@@ -12,15 +26,9 @@
import com.anchorage.system.AnchorageSystem;
import javafx.application.Application;
import javafx.scene.Scene;
-import javafx.scene.control.TreeItem;
-import javafx.scene.control.TreeView;
-import javafx.stage.Stage;
-
-import java.util.Random;
import javafx.scene.control.Label;
-import javafx.scene.layout.Pane;
-import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
+import javafx.stage.Stage;
/**
*
@@ -39,6 +47,7 @@ public void start(Stage primaryStage) {
DockNode node1 = AnchorageSystem.createDock("Events", new MyPanel());
node1.dock(station, DockNode.DockPosition.LEFT);
+
AnchorageSystem.installDefaultStyle();
@@ -1,11 +1,28 @@
/*
+ * Copyright 2015-2016 Alessio Vinerbi. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.anchorage.demo;
-import com.anchorage.docks.containers.common.AnchorageSettings;
import com.anchorage.docks.node.DockNode;
import com.anchorage.docks.stations.DockStation;
import com.anchorage.system.AnchorageSystem;
@@ -1,4 +1,22 @@
/*
+ * Copyright 2015-2016 Alessio Vinerbi. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
@@ -1,4 +1,22 @@
/*
+ * Copyright 2015-2016 Alessio Vinerbi. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
@@ -10,7 +28,6 @@
import com.anchorage.system.AnchorageSystem;
import javafx.application.Application;
import javafx.scene.Scene;
-import javafx.scene.control.TableView;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.web.HTMLEditor;
@@ -41,13 +58,13 @@ public void start(Stage primaryStage) {
// DockNode node1 = AnchorageSystem.createDock("Tree", generateRandomTree());
-// node1.dock(station, DockNode.DOCK_POSITION.CENTER);
+// node1.dock(station, DockNode.DockPosition.CENTER);
//
// DockNode node2 = AnchorageSystem.createDock("Editor", new HTMLEditor());
-// node2.dock(station, DockNode.DOCK_POSITION.RIGHT);
+// node2.dock(station, DockNode.DockPosition.RIGHT);
//
// DockNode node3 = AnchorageSystem.createDock("Below the editor", generateRandomTree());
-// node3.dock(node2, DockNode.DOCK_POSITION.BOTTOM,0.8);
+// node3.dock(node2, DockNode.DockPosition.BOTTOM,0.8);
AnchorageSystem.installDefaultStyle();

0 comments on commit 0773eb4

Please sign in to comment.