List of usage examples for javafx.scene.paint Color LIGHTGRAY
Color LIGHTGRAY
To view the source code for javafx.scene.paint Color LIGHTGRAY.
Click Source Link
From source file:Main.java
@Override public void start(Stage stage) { Arc arc = new Arc(0, 0, 50, 100, 0, 90); arc.setFill(Color.LIGHTGRAY); HBox box = new HBox(arc); Scene scene = new Scene(box); stage.setScene(scene);//from w ww.ja v a 2s . com stage.setTitle("Test"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Rectangle rect1 = new Rectangle(100, 50, Color.LIGHTGRAY); rect1.setStroke(Color.BLACK); Rectangle rect2 = new Rectangle(100, 50, Color.YELLOW); rect2.setStroke(Color.BLACK); Translate translate = new Translate(50, 10); Rotate rotate = new Rotate(30, 0, 0); Scale scale = new Scale(0.5, 0.5); Shear shear = new Shear(0.5, 0.5); rect2.getTransforms().addAll(translate, rotate, scale, shear); Pane root = new Pane(rect1, rect2); root.setPrefSize(200, 100);//from w w w . j av a2s. co m Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle(""); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Path pathTriangle = new Path(new MoveTo(50, 0), new LineTo(0, 50), new LineTo(100, 50), new LineTo(50, 0)); pathTriangle.setFill(Color.LIGHTGRAY); pathTriangle.setStroke(Color.BLACK); SVGPath svgTriangle = new SVGPath(); svgTriangle.setContent("M50, 0 L10, 20 L100, 50 Z"); svgTriangle.setFill(Color.LIGHTGRAY); svgTriangle.setStroke(Color.BLACK); HBox root = new HBox(pathTriangle, svgTriangle); root.setSpacing(10);/* ww w. java2s . c o m*/ root.setStyle("-fx-padding: 10;" + "-fx-border-style: solid inside;" + "-fx-border-width: 2;" + "-fx-border-insets: 5;" + "-fx-border-radius: 5;" + "-fx-border-color: blue;"); Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle("2D Shapes using Path and SVGPath Classes"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { rootNode.setExpanded(true);// w w w. jav a 2s . co m for (Employee employee : employees) { TreeItem<String> empLeaf = new TreeItem<String>(employee.getName()); boolean found = false; for (TreeItem<String> depNode : rootNode.getChildren()) { if (depNode.getValue().contentEquals(employee.getDepartment())) { depNode.getChildren().add(empLeaf); found = true; break; } } if (!found) { TreeItem depNode = new TreeItem(employee.getDepartment()); rootNode.getChildren().add(depNode); depNode.getChildren().add(empLeaf); } } stage.setTitle("Tree View Sample"); VBox box = new VBox(); final Scene scene = new Scene(box, 400, 300); scene.setFill(Color.LIGHTGRAY); TreeView<String> treeView = new TreeView<String>(rootNode); treeView.setShowRoot(true); treeView.setEditable(true); box.getChildren().add(treeView); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { rootNode.setExpanded(true);/* ww w.j a v a2s.com*/ System.out.println(rootNode.isLeaf()); for (Employee employee : employees) { TreeItem<String> empLeaf = new TreeItem<String>(employee.getName()); boolean found = false; for (TreeItem<String> depNode : rootNode.getChildren()) { if (depNode.getValue().contentEquals(employee.getDepartment())) { depNode.getChildren().add(empLeaf); found = true; break; } } if (!found) { TreeItem depNode = new TreeItem(employee.getDepartment()); rootNode.getChildren().add(depNode); depNode.getChildren().add(empLeaf); } } stage.setTitle("Tree View Sample"); VBox box = new VBox(); final Scene scene = new Scene(box, 400, 300); scene.setFill(Color.LIGHTGRAY); TreeView<String> treeView = new TreeView<String>(rootNode); treeView.setShowRoot(true); treeView.setEditable(true); box.getChildren().add(treeView); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { rootNode.setExpanded(true);/*from w w w .j av a 2 s .c o m*/ System.out.println(rootNode.isExpanded()); for (Employee employee : employees) { TreeItem<String> empLeaf = new TreeItem<String>(employee.getName()); boolean found = false; for (TreeItem<String> depNode : rootNode.getChildren()) { if (depNode.getValue().contentEquals(employee.getDepartment())) { depNode.getChildren().add(empLeaf); found = true; break; } } if (!found) { TreeItem depNode = new TreeItem(employee.getDepartment()); rootNode.getChildren().add(depNode); depNode.getChildren().add(empLeaf); } } stage.setTitle("Tree View Sample"); VBox box = new VBox(); final Scene scene = new Scene(box, 400, 300); scene.setFill(Color.LIGHTGRAY); TreeView<String> treeView = new TreeView<String>(rootNode); treeView.setShowRoot(true); treeView.setEditable(true); box.getChildren().add(treeView); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { rootNode.setExpanded(true);/*from w w w.j av a 2 s . c o m*/ rootNode.setGraphic(rootIcon); for (Employee employee : employees) { TreeItem<String> empLeaf = new TreeItem<String>(employee.getName()); boolean found = false; for (TreeItem<String> depNode : rootNode.getChildren()) { if (depNode.getValue().contentEquals(employee.getDepartment())) { depNode.getChildren().add(empLeaf); found = true; break; } } if (!found) { TreeItem depNode = new TreeItem(employee.getDepartment()); rootNode.getChildren().add(depNode); depNode.getChildren().add(empLeaf); } } stage.setTitle("Tree View Sample"); VBox box = new VBox(); final Scene scene = new Scene(box, 400, 300); scene.setFill(Color.LIGHTGRAY); TreeView<String> treeView = new TreeView<String>(rootNode); treeView.setShowRoot(true); treeView.setEditable(true); box.getChildren().add(treeView); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { rootNode.setExpanded(true);/* w ww .ja va2 s.c o m*/ rootNode.setValue("new value"); for (Employee employee : employees) { TreeItem<String> empLeaf = new TreeItem<String>(employee.getName()); boolean found = false; for (TreeItem<String> depNode : rootNode.getChildren()) { if (depNode.getValue().contentEquals(employee.getDepartment())) { depNode.getChildren().add(empLeaf); found = true; break; } } if (!found) { TreeItem depNode = new TreeItem(employee.getDepartment()); rootNode.getChildren().add(depNode); depNode.getChildren().add(empLeaf); } } stage.setTitle("Tree View Sample"); VBox box = new VBox(); final Scene scene = new Scene(box, 400, 300); scene.setFill(Color.LIGHTGRAY); TreeView<String> treeView = new TreeView<String>(rootNode); treeView.setShowRoot(true); treeView.setEditable(true); box.getChildren().add(treeView); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { rootNode.setExpanded(true);// w w w . j a va2 s .c om System.out.println(rootNode.toString()); for (Employee employee : employees) { TreeItem<String> empLeaf = new TreeItem<String>(employee.getName()); boolean found = false; for (TreeItem<String> depNode : rootNode.getChildren()) { if (depNode.getValue().contentEquals(employee.getDepartment())) { depNode.getChildren().add(empLeaf); found = true; break; } } if (!found) { TreeItem depNode = new TreeItem(employee.getDepartment()); rootNode.getChildren().add(depNode); depNode.getChildren().add(empLeaf); } } stage.setTitle("Tree View Sample"); VBox box = new VBox(); final Scene scene = new Scene(box, 400, 300); scene.setFill(Color.LIGHTGRAY); TreeView<String> treeView = new TreeView<String>(rootNode); treeView.setShowRoot(true); treeView.setEditable(true); box.getChildren().add(treeView); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { rootNode.setExpanded(true);/*from www .j av a 2s . c om*/ for (Employee employee : employees) { TreeItem<String> empLeaf = new TreeItem<>(employee.getName()); boolean found = false; for (TreeItem<String> depNode : rootNode.getChildren()) { if (depNode.getValue().contentEquals(employee.getDepartment())) { depNode.getChildren().add(empLeaf); found = true; break; } } if (!found) { TreeItem depNode = new TreeItem(employee.getDepartment()); rootNode.getChildren().add(depNode); depNode.getChildren().add(empLeaf); } } stage.setTitle("Tree View Sample"); VBox box = new VBox(); final Scene scene = new Scene(box, 400, 300); scene.setFill(Color.LIGHTGRAY); TreeView<String> treeView = new TreeView<>(rootNode); treeView.setEditable(true); treeView.setCellFactory((TreeView<String> p) -> new TextFieldTreeCellImpl()); box.getChildren().add(treeView); stage.setScene(scene); stage.show(); }