diff --git a/CalendarFXExperimental/.gitignore b/CalendarFXExperimental/.gitignore deleted file mode 100644 index 6ada21e2..00000000 --- a/CalendarFXExperimental/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -*.iml \ No newline at end of file diff --git a/CalendarFXExperimental/pom.xml b/CalendarFXExperimental/pom.xml deleted file mode 100644 index 9d505ae3..00000000 --- a/CalendarFXExperimental/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 4.0.0 - experimental - CalendarFXExperimental - - - com.calendarfx - calendar - 11.6.4 - - - - true - - - - - com.calendarfx - view - 11.6.4 - - - com.calendarfx - sampler - 11.6.4 - - - \ No newline at end of file diff --git a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPane.java b/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPane.java deleted file mode 100644 index 3e83da06..00000000 --- a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPane.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2017 Dirk Lemmermann Software & Consulting (dlsc.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.calendarfx.experimental; - -import com.calendarfx.view.CalendarFXControl; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import javafx.scene.Parent; -import javafx.scene.control.Skin; - -import java.util.Objects; - -/** - * Created by dirk on 18/01/17. - */ -public class IntroPane extends CalendarFXControl { - - public IntroPane() { - getStylesheets().add(IntroPane.class.getResource("intro.css").toExternalForm()); - - getStyleClass().add("intro-pane"); - } - - @Override - protected Skin createDefaultSkin() { - return new IntroPaneSkin(this); - } - - private final ObservableList targets = FXCollections.observableArrayList(); - - public final ObservableList getTargets() { - return targets; - } - - public static class IntroTarget { - - private final Parent parent; - private final String id; - - public IntroTarget(Parent parent, String id) { - this.parent = Objects.requireNonNull(parent); - this.id = Objects.requireNonNull(id); - } - - public final Parent getParent() { - return parent; - } - - public final String getId() { - return id; - } - } -} diff --git a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPaneApp.java b/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPaneApp.java deleted file mode 100644 index e1680f94..00000000 --- a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPaneApp.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2017 Dirk Lemmermann Software & Consulting (dlsc.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.calendarfx.experimental; - -import com.calendarfx.model.Calendar; -import com.calendarfx.model.Calendar.Style; -import com.calendarfx.model.CalendarSource; -import com.calendarfx.view.CalendarView; -import javafx.application.Application; -import javafx.application.Platform; -import javafx.scene.Scene; -import javafx.scene.layout.StackPane; -import javafx.stage.Stage; - -import java.time.LocalDate; -import java.time.LocalTime; - -public class IntroPaneApp extends Application { - - @Override - public void start(Stage primaryStage) { - CalendarView calendarView = new CalendarView(); - - Calendar katja = new Calendar("Katja"); - Calendar dirk = new Calendar("Dirk"); - Calendar philip = new Calendar("Philip"); - Calendar jule = new Calendar("Jule"); - Calendar armin = new Calendar("Armin"); - Calendar birthdays = new Calendar("Birthdays"); - Calendar holidays = new Calendar("Holidays"); - - katja.setShortName("K"); - dirk.setShortName("D"); - philip.setShortName("P"); - jule.setShortName("J"); - armin.setShortName("A"); - birthdays.setShortName("B"); - holidays.setShortName("H"); - - katja.setStyle(Style.STYLE1); - dirk.setStyle(Style.STYLE2); - philip.setStyle(Style.STYLE3); - jule.setStyle(Style.STYLE4); - armin.setStyle(Style.STYLE5); - birthdays.setStyle(Style.STYLE6); - holidays.setStyle(Style.STYLE7); - - CalendarSource familyCalendarSource = new CalendarSource("Family"); - familyCalendarSource.getCalendars().addAll(birthdays, holidays, katja, dirk, philip, jule, armin); - - calendarView.getCalendarSources().setAll(familyCalendarSource); - calendarView.setRequestedTime(LocalTime.now()); - - IntroPane introPane = new IntroPane(); - introPane.getTargets().add(new IntroPane.IntroTarget(calendarView.getDayPage(), "#add-calendar-button")); - introPane.getTargets().add(new IntroPane.IntroTarget(calendarView.getDayPage(), ".navi-button")); - introPane.getTargets().add(new IntroPane.IntroTarget(calendarView.getDayPage(), ".agenda-view")); - - StackPane stackPane = new StackPane(); - stackPane.getChildren().addAll(calendarView, introPane); - - Thread updateTimeThread = new Thread("Calendar: Update Time Thread") { - @Override - public void run() { - while (true) { - Platform.runLater(() -> { - calendarView.setToday(LocalDate.now()); - calendarView.setTime(LocalTime.now()); - }); - - try { - // update every 10 seconds - sleep(10000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - - } - } - }; - - updateTimeThread.setPriority(Thread.MIN_PRIORITY); - updateTimeThread.setDaemon(true); - updateTimeThread.start(); - - Scene scene = new Scene(stackPane); - primaryStage.setTitle("Calendar"); - primaryStage.setScene(scene); - primaryStage.setWidth(1300); - primaryStage.setHeight(1000); - primaryStage.setMinWidth(1000); - primaryStage.setMinHeight(850); - primaryStage.centerOnScreen(); - primaryStage.show(); - } - - public static void main(String[] args) { - launch(args); - } -} diff --git a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPaneLauncher.java b/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPaneLauncher.java deleted file mode 100644 index eeba5963..00000000 --- a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPaneLauncher.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2017 Dirk Lemmermann Software & Consulting (dlsc.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.calendarfx.experimental; - -public class IntroPaneLauncher { - - public static void main(String[] args) { - System.setProperty("calendarfx.developer", "true"); - IntroPaneApp.main(args); - } -} diff --git a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPaneSkin.java b/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPaneSkin.java deleted file mode 100644 index 95c5d35b..00000000 --- a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/IntroPaneSkin.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2017 Dirk Lemmermann Software & Consulting (dlsc.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.calendarfx.experimental; - -import javafx.application.Platform; -import javafx.beans.InvalidationListener; -import javafx.beans.Observable; -import javafx.geometry.Bounds; -import javafx.geometry.Rectangle2D; -import javafx.scene.Node; -import javafx.scene.Scene; -import javafx.scene.SnapshotParameters; -import javafx.scene.control.SkinBase; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; -import javafx.scene.image.WritableImage; -import javafx.scene.layout.Region; -import javafx.scene.paint.ImagePattern; -import javafx.scene.shape.Line; - -import java.util.Set; - -/** - * Created by dirk on 18/01/17. - */ -public class IntroPaneSkin extends SkinBase { - - public IntroPaneSkin(IntroPane pane) { - super(pane); - - InvalidationListener updateViewListener = (Observable it) -> updateView(); - pane.getTargets().addListener(updateViewListener); - pane.widthProperty().addListener(updateViewListener); - pane.heightProperty().addListener(updateViewListener); - - Platform.runLater(() -> updateView()); - } - - private void updateView() { - getChildren().clear(); - - getSkinnable().setVisible(false); - final Scene scene = getSkinnable().getScene(); - if (scene == null) { - return; - } - - for (IntroPane.IntroTarget target : getSkinnable().getTargets()) { - Set nodes = target.getParent().lookupAll(target.getId()); - if (nodes != null) { - nodes.forEach(node -> snapshotNode(scene, node)); - } - } - - getSkinnable().setVisible(true); - getSkinnable().requestLayout(); - } - - private void snapshotNode(Scene scene, Node node) { - SnapshotParameters params = new SnapshotParameters(); - Bounds layoutBounds = node.getLayoutBounds(); - Bounds bounds = node.localToScene(layoutBounds); - - if (!(bounds.getWidth() > 0 && bounds.getHeight() > 0)) { - return; - } - - params.setViewport(new Rectangle2D(bounds.getMinX(), bounds.getMinY(), bounds.getWidth(), bounds.getHeight())); - WritableImage writable = new WritableImage((int) bounds.getWidth(), (int) bounds.getHeight()); - writable = scene.getRoot().snapshot(params, writable); - - ImageView imageView = new ImageView(writable); - imageView.getStyleClass().add("snapshot-image"); - imageView.setManaged(false); - imageView.setLayoutX(bounds.getMinX()); - imageView.setLayoutY(bounds.getMinY()); - imageView.setFitWidth(bounds.getWidth()); - imageView.setFitHeight(bounds.getHeight()); - - Region rect = new Region(); - rect.getStyleClass().add("snapshot-background"); - rect.setLayoutX(bounds.getMinX() - 5); - rect.setLayoutY(bounds.getMinY() - 5); - rect.resize(bounds.getWidth() + 10, bounds.getHeight() + 10); - rect.setManaged(false); - - Line line = new Line(); - line.setStartX(bounds.getMaxX() + 4); - line.setStartY(bounds.getMaxY() + 4); - line.setEndX(bounds.getMaxX() + 200); - line.setEndY(bounds.getMaxY() + 200); - line.setStroke(imagePattern); - line.setStrokeWidth(5); - line.setManaged(false); - - getChildren().addAll(rect, imageView); //, line); - } - - private final ImagePattern imagePattern = new ImagePattern(new Image(IntroPane.class.getResource("texture.jpg").toExternalForm())); -} diff --git a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/package-info.java b/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/package-info.java deleted file mode 100644 index 60fa11a0..00000000 --- a/CalendarFXExperimental/src/main/java/com/calendarfx/experimental/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2017 Dirk Lemmermann Software & Consulting (dlsc.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - */ -/** - * @author gdiaz - * - */ -package com.calendarfx.experimental; \ No newline at end of file diff --git a/CalendarFXExperimental/src/main/java/module-info.java b/CalendarFXExperimental/src/main/java/module-info.java deleted file mode 100644 index 1a0e2fbf..00000000 --- a/CalendarFXExperimental/src/main/java/module-info.java +++ /dev/null @@ -1,6 +0,0 @@ -module com.calendarfx.experimental { - requires javafx.controls; - requires com.calendarfx.view; - - exports com.calendarfx.experimental; -} \ No newline at end of file diff --git a/CalendarFXExperimental/src/main/resources/com/calendarfx/experimental/intro.css b/CalendarFXExperimental/src/main/resources/com/calendarfx/experimental/intro.css deleted file mode 100644 index c17ced4c..00000000 --- a/CalendarFXExperimental/src/main/resources/com/calendarfx/experimental/intro.css +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017 Dirk Lemmermann Software & Consulting (dlsc.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -.intro-pane { - -fx-background-color: rgba(0, 0, 0, .8); -} - -.snapshot-image { - -fx-stroke: red; - -fx-fill: green; -} - -.snapshot-background { - -fx-background-color: white; - -fx-background-radius: 4; -} \ No newline at end of file diff --git a/CalendarFXExperimental/src/main/resources/com/calendarfx/experimental/texture.jpg b/CalendarFXExperimental/src/main/resources/com/calendarfx/experimental/texture.jpg deleted file mode 100644 index 3e1197cb..00000000 Binary files a/CalendarFXExperimental/src/main/resources/com/calendarfx/experimental/texture.jpg and /dev/null differ diff --git a/CalendarFXGoogle/launchers/GoogleCalendarApp.launch b/CalendarFXGoogle/launchers/GoogleCalendarApp.launch deleted file mode 100644 index e6988d4b..00000000 --- a/CalendarFXGoogle/launchers/GoogleCalendarApp.launch +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/CalendarFXSampler/launchers/FlexGanttFXSampler.launch b/CalendarFXSampler/launchers/FlexGanttFXSampler.launch deleted file mode 100644 index 6d9122f7..00000000 --- a/CalendarFXSampler/launchers/FlexGanttFXSampler.launch +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/pom.xml b/pom.xml index 628d7729..679aceb0 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,6 @@ CalendarFXRecurrence CalendarFXSampler CalendarFXView - CalendarFXExperimental CalendarFXGoogle CalendarFXApp CalendarFXiCal