Java Code Examples for javafx.scene.paint.Color#LIGHTGREY

The following examples show how to use javafx.scene.paint.Color#LIGHTGREY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AnchorPaneSample.java    From marathonv5 with Apache License 2.0 8 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    AnchorPane anchorPane = new AnchorPane();

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    anchorPane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle r1 = new Rectangle(14, 14, Color.web("#1c89f4"));
    Rectangle r2 = new Rectangle(45, 10, Color.web("#349b00"));
    Rectangle r3 = new Rectangle(35, 14, Color.web("#349b00"));

    anchorPane.getChildren().addAll(r1, r2, r3);
    AnchorPane.setTopAnchor(r1, Double.valueOf(1));
    AnchorPane.setLeftAnchor(r1, Double.valueOf(1));
    AnchorPane.setTopAnchor(r2, Double.valueOf(20));
    AnchorPane.setLeftAnchor(r2, Double.valueOf(1));
    AnchorPane.setBottomAnchor(r3, Double.valueOf(1));
    AnchorPane.setRightAnchor(r3, Double.valueOf(5));

    sp.getChildren().addAll(rectangle, anchorPane);
    return new Group(sp);
}
 
Example 2
Source File: HBoxSample.java    From marathonv5 with Apache License 2.0 7 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    HBox hbox = new HBox(3);
    hbox.setAlignment(Pos.CENTER);

    Rectangle rectangle = new Rectangle(70, 25, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    hbox.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle r1 = new Rectangle(14, 14, Color.web("#1c89f4"));
    Rectangle r2 = new Rectangle(14, 14, Color.web("#349b00"));
    Rectangle r3 = new Rectangle(18, 14, Color.web("#349b00"));

    hbox.getChildren().addAll(r1, r2, r3);
    sp.getChildren().addAll(rectangle, hbox);

    return new Group(sp);
}
 
Example 3
Source File: FlowPaneSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    FlowPane fp = new FlowPane();
    fp.setAlignment(Pos.CENTER);

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    fp.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle[] littleRecs = new Rectangle[4];
    Rectangle[] bigRecs = new Rectangle[4];
    for (int i = 0; i < 4; i++) {
        littleRecs[i] = new Rectangle(14, 14, Color.web("#1c89f4"));
        bigRecs[i] = new Rectangle(16, 12, Color.web("#349b00"));
        fp.getChildren().addAll(littleRecs[i], bigRecs[i]);
        FlowPane.setMargin(littleRecs[i], new Insets(2, 2, 2, 2));
    }
    sp.getChildren().addAll(rectangle, fp);
    return new Group(sp);
}
 
Example 4
Source File: VBoxSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    VBox vbox = new VBox(3);
    vbox.setAlignment(Pos.CENTER);
    vbox.setPadding(new Insets(5, 5, 5, 5));

    Rectangle rectangle = new Rectangle(32, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    vbox.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
    Rectangle r1 = new Rectangle(18, 14, Color.web("#1c89f4"));
    Rectangle r2 = new Rectangle(18, 14, Color.web("#349b00"));
    Rectangle r3 = new Rectangle(18, 20, Color.web("#349b00"));

    vbox.getChildren().addAll(r1, r2, r3);
    sp.getChildren().addAll(rectangle, vbox);
    return new Group(sp);
}
 
Example 5
Source File: AnchorPaneSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    AnchorPane anchorPane = new AnchorPane();

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    anchorPane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle r1 = new Rectangle(14, 14, Color.web("#1c89f4"));
    Rectangle r2 = new Rectangle(45, 10, Color.web("#349b00"));
    Rectangle r3 = new Rectangle(35, 14, Color.web("#349b00"));

    anchorPane.getChildren().addAll(r1, r2, r3);
    AnchorPane.setTopAnchor(r1, Double.valueOf(1));
    AnchorPane.setLeftAnchor(r1, Double.valueOf(1));
    AnchorPane.setTopAnchor(r2, Double.valueOf(20));
    AnchorPane.setLeftAnchor(r2, Double.valueOf(1));
    AnchorPane.setBottomAnchor(r3, Double.valueOf(1));
    AnchorPane.setRightAnchor(r3, Double.valueOf(5));

    sp.getChildren().addAll(rectangle, anchorPane);
    return new Group(sp);
}
 
Example 6
Source File: TilePaneSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    TilePane iconTilePane = new TilePane();
    iconTilePane.setAlignment(Pos.CENTER);

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    iconTilePane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle[] rec = new Rectangle[9];
    for (int i = 0; i < rec.length; i++) {
        rec[i] = new Rectangle(14, 14, Color.web("#349b00"));
        TilePane.setMargin(rec[i], new Insets(2, 2, 2, 2));
    }
    iconTilePane.getChildren().addAll(rec);
    sp.getChildren().addAll(rectangle, iconTilePane);
    return new Group(sp);
}
 
Example 7
Source File: FlowPaneSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    FlowPane fp = new FlowPane();
    fp.setAlignment(Pos.CENTER);

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    fp.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle[] littleRecs = new Rectangle[4];
    Rectangle[] bigRecs = new Rectangle[4];
    for (int i = 0; i < 4; i++) {
        littleRecs[i] = new Rectangle(14, 14, Color.web("#1c89f4"));
        bigRecs[i] = new Rectangle(16, 12, Color.web("#349b00"));
        fp.getChildren().addAll(littleRecs[i], bigRecs[i]);
        FlowPane.setMargin(littleRecs[i], new Insets(2, 2, 2, 2));
    }
    sp.getChildren().addAll(rectangle, fp);
    return new Group(sp);
}
 
Example 8
Source File: VBoxSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    VBox vbox = new VBox(3);
    vbox.setAlignment(Pos.CENTER);
    vbox.setPadding(new Insets(5, 5, 5, 5));

    Rectangle rectangle = new Rectangle(32, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    vbox.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
    Rectangle r1 = new Rectangle(18, 14, Color.web("#1c89f4"));
    Rectangle r2 = new Rectangle(18, 14, Color.web("#349b00"));
    Rectangle r3 = new Rectangle(18, 20, Color.web("#349b00"));

    vbox.getChildren().addAll(r1, r2, r3);
    sp.getChildren().addAll(rectangle, vbox);
    return new Group(sp);
}
 
Example 9
Source File: HBoxSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    HBox hbox = new HBox(3);
    hbox.setAlignment(Pos.CENTER);

    Rectangle rectangle = new Rectangle(70, 25, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    hbox.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle r1 = new Rectangle(14, 14, Color.web("#1c89f4"));
    Rectangle r2 = new Rectangle(14, 14, Color.web("#349b00"));
    Rectangle r3 = new Rectangle(18, 14, Color.web("#349b00"));

    hbox.getChildren().addAll(r1, r2, r3);
    sp.getChildren().addAll(rectangle, hbox);

    return new Group(sp);
}
 
Example 10
Source File: TilePaneSample.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    TilePane iconTilePane = new TilePane();
    iconTilePane.setAlignment(Pos.CENTER);

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    iconTilePane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle[] rec = new Rectangle[9];
    for (int i = 0; i < rec.length; i++) {
        rec[i] = new Rectangle(14, 14, Color.web("#349b00"));
        TilePane.setMargin(rec[i], new Insets(2, 2, 2, 2));
    }
    iconTilePane.getChildren().addAll(rec);
    sp.getChildren().addAll(rectangle, iconTilePane);
    return new Group(sp);
}
 
Example 11
Source File: StackPaneSample.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    sp.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle biggerRec = new Rectangle(55, 55, Color.web("#1c89f4"));
    Rectangle smallerRec = new Rectangle(35, 35, Color.web("#349b00"));

    sp.getChildren().addAll(rectangle, biggerRec, smallerRec);
    return new Group(sp);
}
 
Example 12
Source File: BorderPaneSample.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    BorderPane borderPane = new BorderPane();

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    borderPane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
 
    Rectangle recTop = new Rectangle(62, 5, Color.web("#349b00"));
    recTop.setStroke(Color.BLACK);
    Rectangle recBottom = new Rectangle(62, 14, Color.web("#349b00"));
    recBottom.setStroke(Color.BLACK);
    Rectangle recLeft = new Rectangle(20, 41, Color.TRANSPARENT);
    recLeft.setStroke(Color.BLACK);
    Rectangle recRight = new Rectangle(20, 41, Color.TRANSPARENT);
    recRight.setStroke(Color.BLACK);
    Rectangle centerRight = new Rectangle(20, 41, Color.TRANSPARENT);
    centerRight.setStroke(Color.BLACK);
    borderPane.setRight(recRight);
    borderPane.setTop(recTop);
    borderPane.setLeft(recLeft);
    borderPane.setBottom(recBottom);
    borderPane.setCenter(centerRight);
 
    sp.getChildren().addAll(rectangle, borderPane);
    return new Group(sp);
}
 
Example 13
Source File: StackPaneSample.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    sp.setPrefSize(rectangle.getWidth(), rectangle.getHeight());

    Rectangle biggerRec = new Rectangle(55, 55, Color.web("#1c89f4"));
    Rectangle smallerRec = new Rectangle(35, 35, Color.web("#349b00"));

    sp.getChildren().addAll(rectangle, biggerRec, smallerRec);
    return new Group(sp);
}
 
Example 14
Source File: BorderPaneSample.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
public static Node createIconContent() {
    StackPane sp = new StackPane();
    BorderPane borderPane = new BorderPane();

    Rectangle rectangle = new Rectangle(62, 62, Color.LIGHTGREY);
    rectangle.setStroke(Color.BLACK);
    borderPane.setPrefSize(rectangle.getWidth(), rectangle.getHeight());
 
    Rectangle recTop = new Rectangle(62, 5, Color.web("#349b00"));
    recTop.setStroke(Color.BLACK);
    Rectangle recBottom = new Rectangle(62, 14, Color.web("#349b00"));
    recBottom.setStroke(Color.BLACK);
    Rectangle recLeft = new Rectangle(20, 41, Color.TRANSPARENT);
    recLeft.setStroke(Color.BLACK);
    Rectangle recRight = new Rectangle(20, 41, Color.TRANSPARENT);
    recRight.setStroke(Color.BLACK);
    Rectangle centerRight = new Rectangle(20, 41, Color.TRANSPARENT);
    centerRight.setStroke(Color.BLACK);
    borderPane.setRight(recRight);
    borderPane.setTop(recTop);
    borderPane.setLeft(recLeft);
    borderPane.setBottom(recBottom);
    borderPane.setCenter(centerRight);
 
    sp.getChildren().addAll(rectangle, borderPane);
    return new Group(sp);
}
 
Example 15
Source File: ConfigProperties.java    From LogFX with GNU General Public License v3.0 5 votes vote down vote up
ConfigProperties() {
    standardLogColors = new SimpleObjectProperty<>( new LogLineColors( Color.BLACK, Color.LIGHTGREY ) );
    observableExpressions = FXCollections.observableArrayList();
    observableFiles = FXCollections.observableSet( new LinkedHashSet<>( 4 ) );
    panesOrientation = new SimpleObjectProperty<>( Orientation.HORIZONTAL );
    paneDividerPositions = FXCollections.observableArrayList();
    font = new BindableValue<>( Font.font( FxUtils.isMac() ? "Monaco" : "Courier New" ) );
    enableFilters = new SimpleBooleanProperty( false );
}
 
Example 16
Source File: TimelineChart.java    From constellation with Apache License 2.0 4 votes vote down vote up
/**
     * Constructs a new <code>TimelineChart</code> component given a parent
     * panel and axes.
     *
     * @param parent the panel containing this chart.
     * @param xAxis the x axis.
     * @param yAxis the y axis.
     *
     * @see TimelinePanel
     * @see NumberAxis
     */
    public TimelineChart(final TimelinePanel parent, final Axis<Number> xAxis, final NumberAxis yAxis) {
        super(xAxis, yAxis);

        this.parent = parent;
        timeline = this;

        this.xAxis = (NumberAxis) xAxis;
        this.yAxis = yAxis;
//        this.xAxis.setLowerBound(System.currentTimeMillis() - (31536000000l * 5));
//        this.xAxis.setUpperBound(System.currentTimeMillis());
//        setExtents(System.currentTimeMillis() - (31536000000l * 5), System.currentTimeMillis(), true);
        tooltip = createTooltip();

        formatAxes();
        // Create the selection box:
        selection = createSelectionRectange();
        selection.setStroke(Color.SILVER);
        selection.setStrokeWidth(2d);
        final LinearGradient gradient
                = new LinearGradient(0.0, 0.0, 0.0, 0.75, true, CycleMethod.NO_CYCLE, new Stop[]{
            new Stop(0, Color.LIGHTGREY),
            new Stop(1, Color.GREY.darker())
        });
        selection.setFill(gradient);
        selection.setSmooth(true);

        // Round the edges of the rectangle:
        selection.setArcWidth(5.0);
        selection.setArcHeight(5.0);
        getChildren().add(selection);

        // Install event handlers:
        //  Handles zooming for the timeline:
        setOnScroll(new EventHandler<ScrollEvent>() {
            @Override
            public void handle(final ScrollEvent t) {
                final double mouseX = t.getX();
                performZoom(t, mouseX);
                t.consume();
            }
        });
        //  Recognise mouse presses:
        setOnMousePressed(timelineMouseHandler);
        //  Handles scrolling back and forth:

        setOnMouseDragged(timelineMouseHandler);
        //  Handles determination of time under the mouse cursor, and sets tooltips accordingly:

        setOnMouseMoved(timelineMouseHandler);
        //  Handles the change of the mouse cursor for the timeline:

        setOnMouseEntered(timelineMouseHandler);
        // Handles the release of selection events:

        setOnMouseReleased(timelineMouseHandler);
        setOnMouseClicked(timelineMouseHandler);

        // Style the timeline:
        setAnimated(true);
        setLegendVisible(false);
        setVerticalZeroLineVisible(false);
    }