A trait describing a factory object for net.sf.jguiraffe.gui.forms.ComponentHandler instances for JavaFX buttons.
A default implementation of ToolTipFactory.
A default implementation of ToolTipFactory.
This class creates very basic Tooltip instances that are just initialized with the passed in text. It is used per default by the standard manager implementations which create components if no custom factory is provided.
An implementation of the Callback interface which delegates to a passed in function.
An implementation of the Callback interface which delegates to a passed in function.
JavaFX uses Callback objects in many places. In Scala code, it is more convenient to deal with function objects. This class provides a way to create a callback object for a function.
Unfortunately, it does not help much to provide an implicit conversion; the compiler is not able to infer the correct type parameters. Therefore, it is easier to create callback objects manually; then the function literals can be expressed in a shorter form.
the parameter type of the callback
the return type of the callback
A helper class that wraps a JavaFX image.
A helper class that wraps a JavaFX image.
There is some functionality frequently required when dealing with icons. First, an image for the icon has to be managed. For many use cases, this is not sufficient: in order to display the image in the UI, it has to be added to a Node object, typically an ImageView. This simple helper class provides this functionality. It holds an image object and provides a factory method for creating a new ImageView.
Note, that it is intended to create always a new ImageView. It is not possible to add a single Node multiple times to the scene graph. Therefore, every time the icon is to be displayed, another ImageView has to be created.
the wrapped image
An internally used helper class for creating the tool tips of controls constructed during a builder operation.
An internally used helper class for creating the tool tips of controls constructed during a builder operation.
A builder typically runs in a background thread so that the UI is not blocked. This causes problems with Java FX tool tips which can only be created in the Java FX thread. Therefore, the Java FX-specific implementation of the ComponentManager interface does not create and assign tool tips directly. Rather, a task object is created which collects all requests for creating tool tips. After the build operation this task is run as a ComponentBuilderCallBack and handles the initialization of tool tips in the Java FX thread.
If tool tips are involved, an instance of this class is created on demand and stored in the current Jelly context. (This is safe from a threading aspect because the Jelly context is assigned to a single build operation only.) The companion object provides a method for easily obtaining the instance for the current Jelly context. It performs all necessary one-time initialization. Requests for new tool tips can be added to an instance obtained this way.
A trait providing functionality for the creation of tooltips.
A trait providing functionality for the creation of tooltips.
During a builder operation multiple manager objects need to create UI components which may have tooltips. In JavaFx the creation of tooltips is a bit more complex because this has to be done in the UI thread. Therefore, tooltips cannot be created directly in a builder operation; rather, the requests for the creation of tooltips are stored and then executed as callbacks. Corresponding functionality is offered by this trait.
Manager classes can simply mix in this trait. They have to provide the ToolTipFactory to be used. Then they can call one of the addCreateToolTipRequest() methods whenever the tooltip for a control needs to be created.
Definition of a trait for the creation of new tool tip objects.
Definition of a trait for the creation of new tool tip objects.
In Java FX tool tips are in the responsibility of the Tooltip class. This class offers some enhanced capabilities, so an application may wish to use or customize them. This can be achieved by creating a custom implementation of this trait and passing it to the manager objects which create components supporting tooltips.
An object providing common functionality related to the creation and manipulation of JavaFX components.
An object providing common functionality related to the creation and manipulation of JavaFX components.
This object defines multiple methods implementing standard functionality which is needed for multiple manager implementations.
Companion object for FunctionCallback.
Companion object for FunctionCallback.
This object provides a factory method for creating new callback instances.
The companion object for ToolTipCreationCallBack.
A trait describing a factory object for net.sf.jguiraffe.gui.forms.ComponentHandler instances for JavaFX buttons.
Component handlers for buttons have to be created in multiple places: when constructing the UI of a form, but also for a tool bar. This trait allows reusing the code which implements this functionality without introducing a tight coupling.