Package dataPlotsFX

Class FXIconLoder

java.lang.Object
dataPlotsFX.FXIconLoder

public class FXIconLoder extends Object
Utility functions to load image files into Canvases to use as icons in displays, etc. Typical usage is icon = FXIconLoder.createIcon("Resources/BeamformIcon20.png", 20, 20);
Author:
dg50
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    static javafx.scene.canvas.Canvas
    createIcon(String imageResource)
    Create an icon the same size as the original image, no scaling.
    static javafx.scene.canvas.Canvas
    createIcon(String imageResource, int width, int height)
    Create a canvas with the image scaled / squashed / stretched to a set size.
    static javafx.scene.image.Image
    createImage(String imageResource)
    Create a image from a resource .

    Methods inherited from class java.lang.Object Link icon

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details Link icon

    • FXIconLoder Link icon

      public FXIconLoder()
  • Method Details Link icon

    • createIcon Link icon

      public static javafx.scene.canvas.Canvas createIcon(String imageResource)
      Create an icon the same size as the original image, no scaling.
      Parameters:
      imageResource - Image resource
      Returns:
      Canvas of the same size as the image.
    • createIcon Link icon

      public static javafx.scene.canvas.Canvas createIcon(String imageResource, int width, int height)
      Create a canvas with the image scaled / squashed / stretched to a set size.
      Parameters:
      imageResource - Image resource
      width - required width after scaling
      height - required height after scaling
      Returns:
      Canvas of the determined size.
    • createImage Link icon

      public static javafx.scene.image.Image createImage(String imageResource)
      Create a image from a resource .
      Parameters:
      imageResource - Image resource
      Returns:
      Canvas of the determined size.