/**
* Displays this panel in a modal resizable dialog box.
*/
public void displayView(View parentView)
{
String dialogTitle = preferences.getLocalizedString(PrintPreviewPanel.class, "printPreview.title");
JOptionPane optionPane = new JOptionPane(this, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION);
if (parentView != null)
{
optionPane.setComponentOrientation(((JComponent) parentView).getComponentOrientation());
}
JDialog dialog = optionPane.createDialog(SwingUtilities.getRootPane((JComponent) parentView), dialogTitle);
dialog.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
dialog.setResizable(true);
// Pack again because resize decorations may have changed dialog preferred size
dialog.pack();
dialog.setMinimumSize(dialog.getPreferredSize());
dialog.setVisible(true);
dialog.dispose();
}
PrintPreviewPanel.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:SweetHome3D
作者:
评论列表
文章目录