private void createView() {
        FontIcon closeBtn = Controls.fontIcon(Material2AL.CLOSE, "close-icon");
        closeBtn.setCursor(Cursor.HAND);
        closeBtn.setOnMouseClicked(e -> close());
        GridPane.setValignment(closeBtn, VPos.TOP);
        GridPane.setHalignment(closeBtn, HPos.RIGHT);
        TextFlow textFlow = Containers.create(TextFlow::new, "text");
        // sadly setMaxHeight() isn't working with TextFlow
        // so, we have to clip notification text manually
        Text text = new Text(notification.getClippedText(Toast.MAX_MESSAGE_LEN));
        textFlow.getChildren().addAll(text);
        Hyperlink expandBtn = new Hyperlink(t(ACTION_MORE));
        expandBtn.setOnAction(e -> expand());
        if (expandHandler == null) { expandBtn.setManaged(false); }
        add(textFlow, 0, 0);
        add(closeBtn, 1, 0);
        add(expandBtn, 0, 2, REMAINING, 1);
        getColumnConstraints().addAll(HGROW_ALWAYS, HGROW_NEVER);
        getRowConstraints().addAll(VGROW_ALWAYS, VGROW_NEVER);
        VBox.setVgrow(this, Priority.NEVER);
        getStyleClass().addAll("toast", notification.getType().name().toLowerCase());
    }
private void createView() {
        FontIcon closeBtn = Controls.fontIcon(Material2AL.CLOSE, "close-icon");
        closeBtn.setCursor(Cursor.HAND);
        closeBtn.setOnMouseClicked(e -> close());
        GridPane.setValignment(closeBtn, VPos.TOP);
        GridPane.setHalignment(closeBtn, HPos.RIGHT);
        TextFlow textFlow = Containers.create(TextFlow::new, "text");
       
       
        Text text = new Text(notification.getClippedText(Toast.MAX_MESSAGE_LEN));
        textFlow.getChildren().addAll(text);
        Hyperlink expandBtn = new Hyperlink(t(ACTION_MORE));
        expandBtn.setOnAction(e -> expand());
        if (expandHandler == null) { expandBtn.setManaged(false); }
        add(textFlow, 0, 0);
        add(closeBtn, 1, 0);
        add(expandBtn, 0, 2, REMAINING, 1);
        getColumnConstraints().addAll(HGROW_ALWAYS, HGROW_NEVER);
        getRowConstraints().addAll(VGROW_ALWAYS, VGROW_NEVER);
        VBox.setVgrow(this, Priority.NEVER);
        getStyleClass().addAll("toast", notification.getType().name().toLowerCase());
    }
private void createview() { fonticon closebtn = controls.fonticon(material2al.close, "close-icon"); closebtn.setcursor(cursor.hand); closebtn.setonmouseclicked(e -> close()); gridpane.setvalignment(closebtn, vpos.top); gridpane.sethalignment(closebtn, hpos.right); textflow textflow = containers.create(textflow::new, "text"); text text = new text(notification.getclippedtext(toast.max_message_len)); textflow.getchildren().addall(text); hyperlink expandbtn = new hyperlink(t(action_more)); expandbtn.setonaction(e -> expand()); if (expandhandler == null) { expandbtn.setmanaged(false); } add(textflow, 0, 0); add(closebtn, 1, 0); add(expandbtn, 0, 2, remaining, 1); getcolumnconstraints().addall(hgrow_always, hgrow_never); getrowconstraints().addall(vgrow_always, vgrow_never); vbox.setvgrow(this, priority.never); getstyleclass().addall("toast", notification.gettype().name().tolowercase()); }