Top Inners Fields Constructors Methods
org.jabref.gui.util

public Class ControlHelper

extends Object
Class Inheritance
Imports
java.util.function.Consumer, .UnaryOperator, javafx.css.PseudoClass, javafx.event.ActionEvent, .Event, javafx.scene.Parent, javafx.scene.control.Button, .ButtonType, .Cell, .DialogPane, .TextFormatter, javafx.scene.input.DragEvent

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private static PseudoClass
private static PseudoClass
private static PseudoClass

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean
public static DroppingMouseLocation
getDroppingMouseLocation(Cell<?> cell, DragEvent event)

Determines where the mouse is in the given cell.

public static TextFormatter<String>
getIntegerTextFormatter()

Returns a text formatter that restricts input to integers

public static void
public static void
removePseudoClasses(Cell<?> cell, PseudoClass... pseudoClasses)

public static void
setAction(ButtonType buttonType, DialogPane dialogPane, Consumer<Event> consumer)

public static void
public static void
public static String

Returns:

the new, truncated string
truncateString
(String
text which should be truncated, if needed
text
,
int
maximum amount of characters which the resulting text should have, including the ellipsisString; if set to -1, then the default length of 75 characters will be used
maxCharacters
,
String
string which should be used for indicating the truncation
ellipsisString
,
ControlHelper.EllipsisPosition
location in the given text where the truncation should be performed
ellipsisPosition
)

If needed, truncates a given string to maxCharacters, adding ellipsisString instead.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dragOverBottomback to summary
private static PseudoClass dragOverBottom
dragOverCenterback to summary
private static PseudoClass dragOverCenter
dragOverTopback to summary
private static PseudoClass dragOverTop

Constructor Detail

ControlHelperback to summary
public ControlHelper()

Method Detail

childIsFocusedback to summary
public static boolean childIsFocused(Parent node)
getDroppingMouseLocationback to summary
public static DroppingMouseLocation getDroppingMouseLocation(Cell<?> cell, DragEvent event)

Determines where the mouse is in the given cell.

getIntegerTextFormatterback to summary
public static TextFormatter<String> getIntegerTextFormatter()

Returns a text formatter that restricts input to integers

removeDroppingPseudoClassesback to summary
public static void removeDroppingPseudoClasses(Cell<?> cell)
removePseudoClassesback to summary
public static void removePseudoClasses(Cell<?> cell, PseudoClass... pseudoClasses)
setActionback to summary
public static void setAction(ButtonType buttonType, DialogPane dialogPane, Consumer<Event> consumer)
setDroppingPseudoClassesback to summary
public static void setDroppingPseudoClasses(Cell<?> cell, DragEvent event)
setDroppingPseudoClassesback to summary
public static void setDroppingPseudoClasses(Cell<?> cell)
truncateStringback to summary
public static String truncateString(String text, int maxCharacters, String ellipsisString, ControlHelper.EllipsisPosition ellipsisPosition)

If needed, truncates a given string to maxCharacters, adding ellipsisString instead.

Parameters
text:String

text which should be truncated, if needed

maxCharacters:int

maximum amount of characters which the resulting text should have, including the ellipsisString; if set to -1, then the default length of 75 characters will be used

ellipsisString:String

string which should be used for indicating the truncation

ellipsisPosition:ControlHelper.EllipsisPosition

location in the given text where the truncation should be performed

Returns:String

the new, truncated string

org.jabref.gui.util back to summary

public final Enum ControlHelper.EllipsisPosition

extends Enum<ControlHelper.EllipsisPosition>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ControlHelper.EllipsisPosition
public static final ControlHelper.EllipsisPosition
public static final ControlHelper.EllipsisPosition

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ControlHelper.EllipsisPosition
public static ControlHelper.EllipsisPosition[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BEGINNINGback to summary
public static final ControlHelper.EllipsisPosition BEGINNING
CENTERback to summary
public static final ControlHelper.EllipsisPosition CENTER
ENDINGback to summary
public static final ControlHelper.EllipsisPosition ENDING

Constructor Detail

EllipsisPositionback to summary
private EllipsisPosition()

Method Detail

valueOfback to summary
public static ControlHelper.EllipsisPosition valueOf(String name)
valuesback to summary
public static ControlHelper.EllipsisPosition[] values()