Skip to content

Commit

Permalink
Revert "8295324: Apply patch with junit from the issue"
Browse files Browse the repository at this point in the history
This reverts commit c76b820.
  • Loading branch information
eduardsdv committed Dec 1, 2022
1 parent db6065f commit 127cb03
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 443 deletions.
Expand Up @@ -153,25 +153,17 @@ public J2DPrinterJob(javafx.print.PrinterJob fxJob) {
fxPrinter = fxPrinterJob.getPrinter();
j2dPrinter = getJ2DPrinter(fxPrinter);
settings = fxPrinterJob.getJobSettings();
pJob2D = createPrinterJob();
pJob2D = java.awt.print.PrinterJob.getPrinterJob();
try {
pJob2D.setPrintService(j2dPrinter.getService());
} catch (PrinterException pe) {
}
printReqAttrSet = new HashPrintRequestAttributeSet();
printReqAttrSet.add(DialogTypeSelection.NATIVE);
j2dPageable = createJ2dPageable();
j2dPageable = new J2DPageable();
pJob2D.setPageable(j2dPageable);
}

protected java.awt.print.PrinterJob createPrinterJob() {
return java.awt.print.PrinterJob.getPrinterJob();
}

protected J2DPageable createJ2dPageable() {
return new J2DPageable();
}

private void setEnabledState(Window owner, boolean state) {
if (owner == null) {
return;
Expand Down Expand Up @@ -1050,7 +1042,7 @@ public void run() {
}
}

protected class J2DPageable implements Pageable, Printable {
private class J2DPageable implements Pageable, Printable {

private volatile boolean pageDone;

Expand All @@ -1076,7 +1068,7 @@ private boolean waitForNextPage(int pageIndex) {
}
}
currPageInfo = null;
setPageDone(true);
pageDone = true;
synchronized (monitor) {
if (newPageInfo == null) {
monitor.notify(); // page is printed and no new page to print
Expand Down Expand Up @@ -1187,10 +1179,6 @@ public Printable getPrintable(int pageIndex) {
return this;
}

protected PageFormat getCurrentPageFormat() {
return currPageFormat;
}

public PageFormat getPageFormat(int pageIndex) {
getPage(pageIndex);
return currPageFormat;
Expand Down Expand Up @@ -1222,7 +1210,7 @@ private void implPrintPage(PageLayout pageLayout, Node node) {
* So, when we are in here, we know that the app is providing
* the info for the next page.
*/
setPageDone(false);
pageDone = false;
synchronized (monitor) {
newPageInfo = new PageInfo(pageLayout, node);
monitor.notify();
Expand All @@ -1245,10 +1233,6 @@ private void implPrintPage(PageLayout pageLayout, Node node) {
}
}

protected void setPageDone(boolean pageDone) {
this.pageDone = pageDone;
}

} /* END J2DPageable class */


Expand Down

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions modules/javafx.graphics/src/test/addExports
Expand Up @@ -40,13 +40,11 @@
--add-exports javafx.graphics/com.sun.prism.impl.shape=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.prism=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.prism.paint=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.prism.j2d.print=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.scenario.animation=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.scenario.animation.shared=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.scenario.effect=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.scenario.effect.light=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.scenario=ALL-UNNAMED
--add-exports javafx.graphics/sun.print=ALL-UNNAMED
--add-opens javafx.graphics/javafx.scene=ALL-UNNAMED
--add-opens javafx.graphics/javafx.scene.robot=ALL-UNNAMED
--add-opens javafx.graphics/javafx.scene.layout=ALL-UNNAMED
Expand Down
Expand Up @@ -98,9 +98,6 @@ public class StubToolkit extends Toolkit {

private ScreenConfiguration[] screenConfigurations = DEFAULT_SCREEN_CONFIG;

// By default, always on the FX app thread
private boolean fxUserThread = true;

static {
try {
// ugly hack to initialize "runLater" method in Platform.java
Expand Down Expand Up @@ -156,11 +153,8 @@ public void checkFxUserThread() {

@Override
public boolean isFxUserThread() {
return fxUserThread;
}

public void setFxUserThread(boolean fxUserThread) {
this.fxUserThread = fxUserThread;
// Always on the FX app thread
return true;
}

@Override
Expand Down

0 comments on commit 127cb03

Please sign in to comment.