Skip to content

Instantly share code, notes, and snippets.

View kleopatra's full-sized avatar

Jeanette Winzenburg kleopatra

  • Berlin
View GitHub Profile
@kleopatra
kleopatra / ListEditStateCommitOnFocusLost.java
Last active February 21, 2022 13:11
Sneak preview: api changes to support commitOnFocusLost
* Created 02.05.2021
*/
package control.cell.edit;
import javafx.application.Application;
import javafx.beans.Observable;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
@kleopatra
kleopatra / SkinBaseObservableListFullSupport.java
Last active January 25, 2021 14:06
Comparing effect of listener support api in SkinBase
/**
* Listening to listChanges of a list-valued property.
* see https://bugs.openjdk.java.net/browse/JDK-8258777
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public static class SkinBaseObservableList extends SkinBase<ExampleControl> {
public SkinBaseObservableList(ExampleControl control) {
super(control);
// list-valued observables need invalidation listener to re-wire content listener reliably
@kleopatra
kleopatra / CellSkinComputeHeightCounter.java
Last active June 16, 2020 10:06
counting calls to listCellSkin computeXX
package control.skin;
import java.util.Locale;
import java.util.logging.Logger;
import static support.VirtualFlowTestUtils.*;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
@kleopatra
kleopatra / CompareSortAndReverse.java
Created June 4, 2020 08:16
Compare handling of selection state after sort vs. replace
package control.table;
import java.util.Arrays;
import java.util.Locale;
import java.util.logging.Logger;
//import java.util.stream.Collectors;
import static java.util.Comparator.*;
import static java.util.stream.Collectors.*;
import static javafx.collections.FXCollections.*;
@kleopatra
kleopatra / TableCellLiveTest
Created February 23, 2019 15:01
TestFx TableViewMatchers.containsRowAtIndex: does not test "live" cell?
import java.util.function.Supplier;
import org.junit.Test;
import org.testfx.framework.junit.ApplicationTest;
import org.testfx.matcher.control.TableViewMatchersTest.Person;
import org.testfx.util.WaitForAsyncUtils;
import static org.junit.Assert.*;
import static org.testfx.api.FxAssert.*;