Repository navigation
Fix Frame.setState(), use java.awt.printerjob, implement canDisplay() - #58
Closed
duncanmcqueen wants to merge 3 commits into
Closed
duncanmcqueen wants to merge 3 commits into
duncanmcqueen wants to merge 3 commits into
Conversation
setState(NORMAL) added ICONIFIED to an iconified frame and setState(ICONIFIED) removed it, the opposite of the request. Remove ICONIFIED for NORMAL and add it for ICONIFIED, and keep the other state bits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: duncanmcqueen <206344294+duncanmcqueen@users.noreply.github.com>
As in the JDK, the system property java.awt.printerjob names the PrinterJob class. A toolkit can set it to supply its own printing. Without the property, or if the class cannot be made, use JavaPrinterJob as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: duncanmcqueen <206344294+duncanmcqueen@users.noreply.github.com>
Both methods threw UnsupportedOperationException, so Font.canDisplay() failed for all OpenType fonts. A character can be displayed when the font maps it to a glyph other than the missing glyph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: duncanmcqueen <206344294+duncanmcqueen@users.noreply.github.com>
duncanmcqueen
force-pushed
the
fix-awt
branch
from
October 14, 2026 13:46
3be773b to
10aa55d
Compare
Contributor
|
Hi @duncanmcqueen, thanks for these too! As with #59, could you split this into separate PRs, one per fix? Steps to reproduce or a small test case for each would be very helpful as well. Thanks! |
This was referenced Oct 14, 2026
Contributor
Author
|
Thank you for the review. I split this pull request into one pull request for each fix:
Each pull request has a small test case and the results before and after the change. I reproduced all three problems on Linux with JamVM and the I close this pull request, because the three new pull requests replace it. 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request has three small AWT fixes.
Frame.setState()sets the opposite of the requested state.setState(ICONIFIED)removesICONIFIED, andsetState(NORMAL)adds it.PrinterJob.getPrinterJob()always returnsJavaPrinterJob. Now the system propertyjava.awt.printerjobcan name the class, as in the JDK. A toolkit can set this property to supply its own printing. Without the property, the result isJavaPrinterJobas before.OpenTypeFontPeer.canDisplay()andcanDisplayUpTo()throwUnsupportedOperationException. Now they use the character map of the font.Tests
On Haiku with Kaffe:
Frame.setState(ICONIFIED)andsetState(NORMAL)minimize and restore a frame.PrinterJob.getPrinterJob()returns the Haiku printer job when the property names it, and the job prints. I did not test on Linux. The changes are in Java code only.AI assistance
An AI model (Claude Code, by Anthropic) wrote these changes and this text. The repository owner directed the work. Please review the changes as you review other contributions.
The commits do not have a
Signed-off-byline. If you need one, the owner will add it.🤖 Generated with Claude Code