org.fxmisc.wellbehaved.skin.Visual Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of WellBehavedFX Show documentation
Show all versions of WellBehavedFX Show documentation
Composable event handlers and skin skeletons for JavaFX controls.
The newest version!
package org.fxmisc.wellbehaved.skin;
import java.util.Collections;
import java.util.List;
import javafx.css.CssMetaData;
import javafx.css.Styleable;
import javafx.scene.control.Control;
/**
* Represents the view aspect of a JavaFX control. It defines how the control
* is rendered visually on the screen. The implementations should either
* implement {@link SimpleVisualBase}, or extend from {@link ComplexVisualBase}.
*
* @param type of the control this Visual is used for.
*/
public interface Visual {
/**
* Returns the control this Visual is used for.
*/
C getControl();
/**
* Called to release resources associated with this Visual when it is no
* longer being used, in particular to stop observing the control, i.e.
* remove any listeners, etc.
*/
void dispose();
/**
* Returns information about the extra styleable properties availabe on the
* skin in addition to those available on the control itself. The default
* implementation returns an empty list.
*/
default List> getCssMetaData() {
return Collections.emptyList();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy