Class ControlUtil
- java.lang.Object
- 
- net.sourceforge.pmd.util.fxdesigner.util.controls.ControlUtil
 
- 
 public final class ControlUtil extends java.lang.Object
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidanchorFirmly(javafx.scene.Node node)static voidbindLabelPropertyWithDefault(javafx.scene.control.Label label, java.lang.String defaultText, org.reactfx.value.Val<java.lang.String> boundProp)When the [boundProp] is blank, display instead the [defaultText] as grayed.static voidcopyToClipboardButton(javafx.scene.control.Button button, java.util.function.Supplier<java.lang.String> copiedText)static <T> voiddecorateCellFactory(javafx.scene.control.ListView<T> lv, java.util.function.Function<javafx.scene.control.ListCell<T>,javafx.scene.control.ListCell<T>> f)static <T> javafx.scene.control.ListCell<T>makeListCellFitListViewWidth(javafx.scene.control.ListCell<T> cell)Make a list cell never overflow the width of its container, to avoid having a horizontal scroll bar showing up.static voidmakeListViewFitToChildren(javafx.scene.control.ListView<?> view, double fixedCellHeight)Make a list view fit precisely the height of its items.static <T> voidmakeListViewNeverScrollHorizontal(javafx.scene.control.ListView<T> lv)This is supported by some CSS.static voidmakeTableViewFitToChildren(javafx.scene.control.TableView<?> view, double fixedCellHeight)Make a list view fit precisely the height of its items.static voidmakeTextFieldShowPromptEvenIfFocused(javafx.scene.control.TextField field)By default text fields don't show the prompt when the caret is inside the field, even if the text is empty.static org.reactfx.SubscriptionregisterDoubleClickListener(javafx.scene.Node node, java.lang.Runnable action)static voidsaveToFileButton(javafx.scene.control.Button button, javafx.stage.Stage popupStage, java.util.function.Supplier<java.lang.String> content, ApplicationComponent owner, java.util.function.Supplier<java.lang.String> initialFileName)static javafx.scene.layout.PanespacerPane()static voidsubscribeOnSkin(javafx.scene.control.Control node, java.util.function.Function<javafx.scene.control.Skin<?>,org.reactfx.Subscription> hook)Add a hook on the owner window.static voidsubscribeOnWindow(javafx.scene.Node node, java.util.function.Function<javafx.stage.Window,org.reactfx.Subscription> hook)Add a hook on the owner window.
 
- 
- 
- 
Method Detail- 
anchorFirmlypublic static void anchorFirmly(javafx.scene.Node node) 
 - 
bindLabelPropertyWithDefaultpublic static void bindLabelPropertyWithDefault(javafx.scene.control.Label label, java.lang.String defaultText, org.reactfx.value.Val<java.lang.String> boundProp)When the [boundProp] is blank, display instead the [defaultText] as grayed.
 - 
makeListViewFitToChildrenpublic static void makeListViewFitToChildren(javafx.scene.control.ListView<?> view, double fixedCellHeight)Make a list view fit precisely the height of its items.- Parameters:
- view- The listview to configure
- fixedCellHeight- The cell height to use, a good default is 24
 
 - 
makeTableViewFitToChildrenpublic static void makeTableViewFitToChildren(javafx.scene.control.TableView<?> view, double fixedCellHeight)Make a list view fit precisely the height of its items.- Parameters:
- view- The listview to configure
- fixedCellHeight- The cell height to use, a good default is 24
 
 - 
makeTextFieldShowPromptEvenIfFocusedpublic static void makeTextFieldShowPromptEvenIfFocused(javafx.scene.control.TextField field) By default text fields don't show the prompt when the caret is inside the field, even if the text is empty.
 - 
spacerPanepublic static javafx.scene.layout.Pane spacerPane() 
 - 
registerDoubleClickListenerpublic static org.reactfx.Subscription registerDoubleClickListener(javafx.scene.Node node, java.lang.Runnable action)
 - 
makeListCellFitListViewWidthpublic static <T> javafx.scene.control.ListCell<T> makeListCellFitListViewWidth(javafx.scene.control.ListCell<T> cell) Make a list cell never overflow the width of its container, to avoid having a horizontal scroll bar showing up. This defers resizing constraints to the contents of the cell.- Returns:
- The given cell
 
 - 
decorateCellFactorypublic static <T> void decorateCellFactory(javafx.scene.control.ListView<T> lv, java.util.function.Function<javafx.scene.control.ListCell<T>,javafx.scene.control.ListCell<T>> f)
 - 
makeListViewNeverScrollHorizontalpublic static <T> void makeListViewNeverScrollHorizontal(javafx.scene.control.ListView<T> lv) This is supported by some CSS. Hides the horizontal scroll, and alters the padding when the vertical scrollbar is shown so that the whole contents of the list cell are shown.- Parameters:
- lv- List view to alter
 
 - 
subscribeOnWindowpublic static void subscribeOnWindow(javafx.scene.Node node, java.util.function.Function<javafx.stage.Window,org.reactfx.Subscription> hook)Add a hook on the owner window. It's not possible to do this statically, since at construction time the window might not be set.
 - 
subscribeOnSkinpublic static void subscribeOnSkin(javafx.scene.control.Control node, java.util.function.Function<javafx.scene.control.Skin<?>,org.reactfx.Subscription> hook)Add a hook on the owner window. It's not possible to do this statically, since at construction time the window might not be set.
 - 
copyToClipboardButtonpublic static void copyToClipboardButton(javafx.scene.control.Button button, java.util.function.Supplier<java.lang.String> copiedText)
 - 
saveToFileButtonpublic static void saveToFileButton(javafx.scene.control.Button button, javafx.stage.Stage popupStage, java.util.function.Supplier<java.lang.String> content, ApplicationComponent owner, java.util.function.Supplier<java.lang.String> initialFileName)
 
- 
 
-