Skip to content

Commit

Permalink
8251353: Many javafx scenegraph classes have implicit no-arg construc…
Browse files Browse the repository at this point in the history
…tors

Reviewed-by: kcr, nlisker
  • Loading branch information
bhaweshkc authored and nlisker committed Aug 28, 2020
1 parent 7a4bd9b commit 23ad8f4
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public abstract class TableFocusModel<T, TC extends TableColumnBase<T,?>> extend
* *
**********************************************************************/

/**
* Constructor for subclasses to call.
*/
public TableFocusModel() {
}

/**
* Causes the item at the given index to receive the focus.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
*/
public abstract class TableSelectionModel<T> extends MultipleSelectionModelBase<T> {

/**
* Constructor for subclasses to call.
*/
public TableSelectionModel() {
}

/**
* Convenience function which tests whether the given row and column index
* is currently selected in this table instance. If the table control is in its
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ public abstract class Preloader extends Application {
lineSeparator = prop != null ? prop : "\n";
}

/**
* Constructor for subclasses to call.
*/
public Preloader() {
}

/**
* Indicates download progress.
* This method is called by the FX runtime to indicate progress while
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@
* @since JavaFX 8.0
*/
public abstract class ScheduledService<V> extends Service<V> {

/**
* Constructor for subclasses to call.
*/
public ScheduledService() {
}

/**
* A Callback implementation for the <code>backoffStrategy</code> property which
* will exponentially backoff the period between re-executions in the case of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
*/
public abstract class PseudoClass {

/**
* Constructor for subclasses to call.
*/
public PseudoClass() {
}

/**
* There is only one PseudoClass instance for a given pseudoClass.
* @param pseudoClass the pseudo-class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
*/
public class StyleConverter<F, T> {

/**
* Creates a {@code StyleConverter}.
*/
public StyleConverter() {
}

/**
* Convert from the parsed CSS value to the target property type.
*
Expand Down Expand Up @@ -532,6 +538,12 @@ public static class StringStore {
private final Map<String,Integer> stringMap = new HashMap<String,Integer>();
public final List<String> strings = new ArrayList<String>();

/**
* Creates a {@code StringStore}.
*/
public StringStore() {
}

public int addString(String s) {
Integer index = stringMap.get(s);
if (index == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
* @since JavaFX 2.0
*/
public class ClipboardContent extends HashMap<DataFormat, Object> {

/**
* Creates a {@code ClipboardContent}.
*/
public ClipboardContent() {
}

/**
* Gets whether a plain text String ({@code DataFormat.PLAIN_TEXT})
* has been put to this {@code ClipboardContent}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public void setHelper(PathElement pathElement, PathElementHelper pathElementHelp
*/
WeakReferenceQueue nodes = new WeakReferenceQueue();

/**
* Constructor for subclasses to call.
*/
public PathElement() {
}

void addNode(final Node n) {
nodes.add(n);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ public Transform createImmutableTransform(Transform transform,
});
}

/**
* Constructor for subclasses to call.
*/
public Transform() {
}

/* *************************************************************************
* *
* Factories *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public final class DirectoryChooser {
*/
private StringProperty title;

/**
* Creates a {@code DirectoryChooser}.
*/
public DirectoryChooser() {
}

public final void setTitle(final String value) {
titleProperty().set(value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ private static void validateArgs(final String description,
*/
private StringProperty title;

/**
* Creates a {@code FileChooser}.
*/
public FileChooser() {
}

public final void setTitle(final String value) {
titleProperty().set(value);
}
Expand Down
6 changes: 6 additions & 0 deletions modules/javafx.graphics/src/main/java/javafx/stage/Popup.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
*/
public class Popup extends PopupWindow {

/**
* Creates a {@code Popup}.
*/
public Popup() {
}

/**
* The ObservableList of {@code Node}s to be rendered on this
* {@code Popup}. The content forms the complete visual representation of
Expand Down

0 comments on commit 23ad8f4

Please sign in to comment.