JavaFX Utils

Tip

Component to control delay of Tooltip.

Tip class is generic in T extends Control.

This component uses reflection to control delay of Tooltip. During the mounting process (void mount() throws ComponentException) it can occurs reflection Exceptions, if this happens a ComponentException will be thrown.

Constructors

public Tip(T control, Tooltip tooltip, int delay)

  • control : Control in which will be mounted the tooltip with specified delay.
  • tooltip : Tooltip in which will be mounted the specified delay.
  • delay : delay that tooltip will take to appear. This time is in milliseconds.

There are more constructors with different parameters, but all will internally call this first one.

Variations :

  • Constructors that don't receive int delay this value is assumed as 50.
  • Constructors that receive String description instantiate Tooltip with it.
  • Constructors that receive IComponent<T> component and obtain Control object from component.getNode().
public Tip(T control, Tooltip tooltip)
public Tip(T control, String description, int delay)
public Tip(T control, String description)
public Tip(IComponent<T> component, Tooltip tooltip, int delay)
public Tip(IComponent<T> component, Tooltip tooltip)
public Tip(IComponent<T> component, String description, int delay)
public Tip(IComponent<T> component, String description)

Usage

	Button button;

	try{
		new Tip<>(button, "Tip", 1000).mount();
	} catch (ComponentException e) {
		//Treat Exception
	}
					

Links