public class JfxUtils extends Object
| Constructor and Description |
|---|
JfxUtils() |
| Modifier and Type | Method and Description |
|---|---|
static javafx.scene.image.ImageView |
copyImageView(javafx.scene.image.ImageView icon)
Creates a clone of the given ImageView item.
|
static javafx.scene.control.MenuItem |
createMenuItem(String title,
javafx.scene.image.ImageView icon,
javafx.event.EventHandler<javafx.event.ActionEvent> handler)
Create an item for a menu.
|
static javafx.scene.control.Button |
createToolButton(javafx.scene.image.ImageView icon,
javafx.event.EventHandler<javafx.event.ActionEvent> handler)
Create a button with no text, only with the image.
|
static javafx.scene.image.ImageView |
loadImage(Class<?> cls,
String resource,
double height,
double width)
Loads an image from the given resource, and creates an ImageView for it.
|
public static javafx.scene.image.ImageView loadImage(Class<?> cls, String resource, double height, double width)
cls - The class to load the resource.resource - The resource name or path.height - The height of the ImageViewwidth - The width of the ImageViewpublic static javafx.scene.control.MenuItem createMenuItem(String title, javafx.scene.image.ImageView icon, javafx.event.EventHandler<javafx.event.ActionEvent> handler)
title - The title of the item.icon - The icon of the item.handler - The handler for the item.public static javafx.scene.control.Button createToolButton(javafx.scene.image.ImageView icon,
javafx.event.EventHandler<javafx.event.ActionEvent> handler)
icon - The icon of the button.handler - The handler for the button.public static javafx.scene.image.ImageView copyImageView(javafx.scene.image.ImageView icon)
icon - The image to clone.Copyright © 2015–2018 Bridje Framework. All rights reserved.