Skip to content

Commit

Permalink
8328746: Remove unused imports in demo apps
Browse files Browse the repository at this point in the history
Reviewed-by: kcr
  • Loading branch information
Andy Goryachev committed Apr 1, 2024
1 parent edbb88f commit 01a1d90
Show file tree
Hide file tree
Showing 75 changed files with 202 additions and 293 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
* Copyright (c) 2010, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -31,9 +31,8 @@
*/
package com.javafx.experiments.importers.obj;

import static com.javafx.experiments.importers.obj.ObjImporter.log;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -49,8 +48,6 @@
import javafx.scene.paint.Material;
import javafx.scene.paint.PhongMaterial;

import static com.javafx.experiments.importers.obj.ObjImporter.*;

/** Reader for OBJ file MTL material files. */
public class MtlReader {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
* Copyright (c) 2010, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -32,16 +32,21 @@
package com.javafx.experiments.jfx3dviewer;

import javafx.animation.Timeline;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.event.EventHandler;
import javafx.scene.AmbientLight;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.PerspectiveCamera;
import javafx.scene.PointLight;
import javafx.scene.SubScene;
import javafx.scene.input.*;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseEvent;
import javafx.scene.input.ScrollEvent;
import javafx.scene.input.ZoomEvent;
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import javafx.scene.paint.PhongMaterial;
Expand All @@ -51,16 +56,10 @@
import javafx.scene.shape.Sphere;
import javafx.scene.transform.Rotate;
import javafx.scene.transform.Translate;

import javafx.util.Duration;
import com.javafx.experiments.shape3d.PolygonMeshView;
import com.javafx.experiments.shape3d.SubdivisionMesh;

import javafx.beans.property.ObjectProperty;
import javafx.event.EventHandler;
import javafx.event.EventType;
import javafx.scene.Scene;
import javafx.util.Duration;

/**
* 3D Content Model for Viewer App. Contains the 3D scene and everything related to it: light, cameras etc.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
* Copyright (c) 2010, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -34,7 +34,6 @@
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.Initializable;
import javafx.geometry.Side;
import javafx.scene.control.ScrollBar;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2014, Oracle and/or its affiliates.
* Copyright (c) 2010, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -32,7 +32,6 @@
package com.javafx.experiments.shape3d;

import java.util.Arrays;

import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty;
Expand All @@ -44,8 +43,8 @@
import javafx.scene.shape.DrawMode;
import javafx.scene.shape.MeshView;
import javafx.scene.shape.TriangleMesh;
import static javafx.scene.shape.TriangleMesh.*;
import static com.javafx.experiments.shape3d.SubdivisionMesh.*;
import com.javafx.experiments.shape3d.SubdivisionMesh.BoundaryMode;
import com.javafx.experiments.shape3d.SubdivisionMesh.MapBorderMode;

/**
* A MeshView node for Polygon Meshes
Expand Down
5 changes: 2 additions & 3 deletions apps/samples/Ensemble8/src/app/java/ensemble/DocsPage.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2015, Oracle and/or its affiliates.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -31,12 +31,10 @@
*/
package ensemble;

import ensemble.generated.Samples;
import javafx.beans.property.ReadOnlyStringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Node;
Expand All @@ -47,6 +45,7 @@
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import javafx.scene.web.WebView;
import ensemble.generated.Samples;

/**
* Ensmeble page for showing a page of documentation from the web
Expand Down
17 changes: 12 additions & 5 deletions apps/samples/Ensemble8/src/app/java/ensemble/SampleInfo.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -31,8 +31,6 @@
*/
package ensemble;

import ensemble.playground.PlaygroundProperty;
import ensemble.samplepage.SamplePage;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.AbstractList;
Expand All @@ -42,7 +40,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.ConditionalFeature;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
Expand All @@ -53,8 +50,18 @@
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.*;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.BackgroundImage;
import javafx.scene.layout.BackgroundPosition;
import javafx.scene.layout.BackgroundRepeat;
import javafx.scene.layout.BackgroundSize;
import javafx.scene.layout.CornerRadii;
import javafx.scene.layout.Pane;
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import ensemble.playground.PlaygroundProperty;
import ensemble.samplepage.SamplePage;

/**
* Descriptor for a ensemble sample. Everything the ui needs is determined at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2014, Oracle and/or its affiliates.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -31,13 +31,8 @@
*/
package ensemble;

import ensemble.control.Popover;
import ensemble.control.PopoverTreeList;
import ensemble.search.DocumentType;
import ensemble.search.SearchResult;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
Expand All @@ -57,6 +52,10 @@
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import ensemble.control.Popover;
import ensemble.control.PopoverTreeList;
import ensemble.search.DocumentType;
import ensemble.search.SearchResult;

/**
* Popover page that displays a list of search results.
Expand Down
16 changes: 11 additions & 5 deletions apps/samples/Ensemble8/src/app/java/ensemble/control/BookBend.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2015, Oracle and/or its affiliates.
* Copyright (c) 2012, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -33,17 +33,23 @@


import javafx.animation.AnimationTimer;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Point2D;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.effect.DisplacementMap;
import javafx.scene.effect.FloatMap;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.scene.paint.Color;
import javafx.scene.paint.CycleMethod;
import javafx.scene.paint.LinearGradient;
import javafx.scene.paint.Paint;
import javafx.scene.paint.Stop;
import javafx.scene.shape.ArcTo;
import javafx.scene.shape.ClosePath;
import javafx.scene.shape.LineTo;
import javafx.scene.shape.MoveTo;
import javafx.scene.shape.Path;

public class BookBend {
private Color bendEndColor = Color.LIGHTBLUE.interpolate(Color.BLACK, 0.6);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2014, Oracle and/or its affiliates.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -33,7 +33,6 @@

import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.EventHandler;
import javafx.scene.Cursor;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2014, Oracle and/or its affiliates.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -32,7 +32,6 @@
package ensemble.control;

import java.util.Arrays;
import javafx.beans.property.ReadOnlyStringProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.geometry.HPos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2014, Oracle and/or its affiliates.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -31,26 +31,28 @@
*/
package ensemble.samplepage;

import ensemble.EnsembleApp;
import ensemble.PlatformFeatures;
import ensemble.SampleInfo;
import ensemble.SampleInfo.URL;
import ensemble.generated.Samples;
import static ensemble.samplepage.SamplePage.INDENT;
import static ensemble.samplepage.SamplePageContent.title;
import javafx.application.ConditionalFeature;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.scene.control.*;
import javafx.scene.control.ContentDisplay;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.Tooltip;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.util.Callback;
import static ensemble.samplepage.SamplePage.INDENT;
import static ensemble.samplepage.SamplePageContent.title;
import javafx.application.ConditionalFeature;
import javafx.application.Platform;
import ensemble.EnsembleApp;
import ensemble.PlatformFeatures;
import ensemble.SampleInfo;
import ensemble.SampleInfo.URL;
import ensemble.generated.Samples;

/**
* Description Section on Sample Page
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2015, Oracle and/or its affiliates.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -31,23 +31,21 @@
*/
package ensemble.samplepage;

import ensemble.Page;
import ensemble.PageBrowser;
import ensemble.SampleInfo;
import static ensemble.SampleInfo.SampleRuntimeInfo;

import javafx.beans.binding.ObjectBinding;
import javafx.beans.binding.StringBinding;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.ReadOnlyStringProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Node;
import javafx.scene.layout.StackPane;
import javafx.util.Callback;
import ensemble.Page;
import ensemble.PageBrowser;
import ensemble.SampleInfo;
import ensemble.SampleInfo.SampleRuntimeInfo;

/**
* Page for showing a sample
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2014, Oracle and/or its affiliates.
* Copyright (c) 2008, 2024, Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
Expand Down Expand Up @@ -31,14 +31,12 @@
*/
package ensemble.samplepage;

import ensemble.PlatformFeatures;
import ensemble.SampleInfo;
import static ensemble.samplepage.SamplePage.INDENT;
import javafx.scene.Node;
import javafx.scene.layout.Region;
import javafx.scene.text.Text;
import javafx.util.Callback;

import static ensemble.samplepage.SamplePage.INDENT;
import ensemble.PlatformFeatures;
import ensemble.SampleInfo;

/**
* The content for Sample Page
Expand Down
Loading

1 comment on commit 01a1d90

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.