Skip to content

8340354: Open source AWT desktop properties and print related tests#21197

Closed
kumarabhi006 wants to merge 3 commits intoopenjdk:masterfrom
kumarabhi006:JDK-8340354
Closed

8340354: Open source AWT desktop properties and print related tests#21197
kumarabhi006 wants to merge 3 commits intoopenjdk:masterfrom
kumarabhi006:JDK-8340354

Conversation

@kumarabhi006
Copy link
Contributor

@kumarabhi006 kumarabhi006 commented Sep 26, 2024

AWT Desktop properties and printer related tests are converted from applet to manual and moved to open.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8340354: Open source AWT desktop properties and print related tests (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21197/head:pull/21197
$ git checkout pull/21197

Update a local copy of the PR:
$ git checkout pull/21197
$ git pull https://git.openjdk.org/jdk.git pull/21197/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21197

View PR using the GUI difftool:
$ git pr show -t 21197

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21197.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 26, 2024

👋 Welcome back abhiscxk! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 26, 2024

@kumarabhi006 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8340354: Open source AWT desktop properties and print related tests

Reviewed-by: prr

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 96 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 26, 2024
@openjdk
Copy link

openjdk bot commented Sep 26, 2024

@kumarabhi006 The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Sep 26, 2024
@mlbridge
Copy link

mlbridge bot commented Sep 26, 2024

Webrevs

MenuItem itemBackground =
new MenuItem("Print to Printer in Background");
itemBackground.setActionCommand("none");
MenuItem itemScreen = new MenuItem("Print to Screen...");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MenuItem itemScreen = new MenuItem("Print to Screen...");
MenuItem itemScreen = new MenuItem("Print to Screen...");


PrintJob pj = getToolkit().getPrintJob(
MainFrame.this, "Print test!", jobAttributes, pageAttributes);
if( pj == null ) return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if( pj == null ) return;
if (pj == null) return;


class ActionPrintToScreen implements ActionListener {
public void actionPerformed(ActionEvent ev) {
PrintFrame printFrame = new PrintFrame( MainFrame.this );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PrintFrame printFrame = new PrintFrame( MainFrame.this );
PrintFrame printFrame = new PrintFrame( MainFrame.this );

Comment on lines +349 to +350
int width = 100;
int height = 30;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int width = 100;
int height = 30;
int width = 100;
int height = 30;


public Dimension getPreferredSize()
{
return new Dimension(width,height);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return new Dimension(width,height);
return new Dimension(width, height);


public Dimension getPreferredSize()
{
return new Dimension(width,height);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return new Dimension(width,height);
return new Dimension(width, height);

// now make things really interesting with a lightweight
// component at the top of the z-order, that should print
// _below_ the native guys to match the screen...
add(new LWButton("LWButton"),0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
add(new LWButton("LWButton"),0);
add(new LWButton("LWButton"), 0);

menu3.setFont(new Font("Monospaced", Font.ITALIC, 18));
menu3.setEnabled(false);
menu4.setEnabled(false);
MenuItem itemPrinter = new MenuItem("Print to Printer...");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MenuItem itemPrinter = new MenuItem("Print to Printer...");
MenuItem itemPrinter = new MenuItem("Print to Printer...");

menu3.setEnabled(false);
menu4.setEnabled(false);
MenuItem itemPrinter = new MenuItem("Print to Printer...");
MenuItem itemScreen = new MenuItem("Print to Screen...");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MenuItem itemScreen = new MenuItem("Print to Screen...");
MenuItem itemScreen = new MenuItem("Print to Screen...");

static void printProps(Properties props)
{
Enumeration propNames = props.propertyNames();
while(propNames.hasMoreElements()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
while(propNames.hasMoreElements()) {
while (propNames.hasMoreElements()) {

printProps(props);
PrintJob pj = getToolkit().getPrintJob(
MainFrame.this, "Print test!", props);
if( pj == null ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if( pj == null ) {
if (pj == null) {


class ActionPrintToScreen implements ActionListener {
public void actionPerformed(ActionEvent ev) {
PrintFrame printFrame = new PrintFrame( MainFrame.this );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PrintFrame printFrame = new PrintFrame( MainFrame.this );
PrintFrame printFrame = new PrintFrame( MainFrame.this );

Comment on lines +311 to +312
int width = 100;
int height = 30;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int width = 100;
int height = 30;
int width = 100;
int height = 30;


public Dimension getPreferredSize()
{
return new Dimension(width,height);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return new Dimension(width,height);
return new Dimension(width, height);


public Dimension getPreferredSize()
{
return new Dimension(width,height);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return new Dimension(width,height);
return new Dimension(width, height);

// now make things really interesting with a lightweight
// component at the top of the z-order, that should print
// _below_ the native guys to match the screen...
add(new LWButton("LWButton"),0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
add(new LWButton("LWButton"),0);
add(new LWButton("LWButton"), 0);

*/

import java.awt.Color;
import java.awt.Frame;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seem to have some extra spaces here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 29, 2024
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Sep 30, 2024
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 30, 2024
@kumarabhi006
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 1, 2024

Going to push as commit 988f13a.
Since your change was applied there have been 99 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 1, 2024
@openjdk openjdk bot closed this Oct 1, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 1, 2024
@openjdk
Copy link

openjdk bot commented Oct 1, 2024

@kumarabhi006 Pushed as commit 988f13a.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client client-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants