mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix for focus traversal.
This commit is contained in:
@@ -160,23 +160,24 @@ public class SheetController {
|
||||
|
||||
sheetPanel.add(headerLabel);
|
||||
|
||||
JEditorPane textArea = new JEditorPane();
|
||||
JEditorPane messageTextPane = new JEditorPane();
|
||||
|
||||
textArea.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);
|
||||
textArea.setFont(regularFont);
|
||||
textArea.setEditable(false);
|
||||
messageTextPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);
|
||||
messageTextPane.setFont(regularFont);
|
||||
messageTextPane.setEditable(false);
|
||||
|
||||
textArea.setContentType("text/html");
|
||||
textArea.setSize(250, Short.MAX_VALUE);
|
||||
textArea.setText(message);
|
||||
messageArea.setSize(250, textArea.getPreferredSize().height);
|
||||
textArea.setSize(messageArea);
|
||||
messageTextPane.setContentType("text/html");
|
||||
messageTextPane.setSize(250, Short.MAX_VALUE);
|
||||
messageTextPane.setText(message);
|
||||
messageArea.setSize(250, messageTextPane.getPreferredSize().height);
|
||||
messageTextPane.setSize(messageArea);
|
||||
|
||||
textArea.setOpaque(false);
|
||||
messageTextPane.setOpaque(false);
|
||||
messageTextPane.setFocusable(false);
|
||||
|
||||
sheetPanel.add(textArea);
|
||||
sheetPanel.add(messageTextPane);
|
||||
|
||||
textArea.repaint();
|
||||
messageTextPane.repaint();
|
||||
|
||||
|
||||
SHEET_HEIGHT = 20 + headerLabel.getPreferredSize().height + 10 + messageArea.height + 10 + 70;
|
||||
@@ -187,9 +188,11 @@ public class SheetController {
|
||||
ico.setLocation(20, 20);
|
||||
sheetPanel.add(ico);
|
||||
headerLabel.setLocation(120, 20);
|
||||
textArea.setLocation(120, 20 + headerLabel.getPreferredSize().height + 10);
|
||||
messageTextPane.setLocation(120, 20 + headerLabel.getPreferredSize().height + 10);
|
||||
layoutWithAbsoluteLayout(buttons, sheetPanel);
|
||||
|
||||
sheetPanel.setFocusCycleRoot(true);
|
||||
|
||||
return sheetPanel;
|
||||
}
|
||||
|
||||
@@ -267,8 +270,6 @@ public class SheetController {
|
||||
|
||||
final BufferedImage image = UIUtil.createImage(SHEET_WIDTH, SHEET_HEIGHT, BufferedImage.TYPE_INT_ARGB);
|
||||
|
||||
|
||||
|
||||
mySheetPanel.paint(image.createGraphics());
|
||||
myOffScreenFrame.dispose();
|
||||
return image;
|
||||
|
||||
Reference in New Issue
Block a user