ServiceDialog.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:jdk8u-jdk 作者:
/**
 * Initialize "page setup" dialog
 */
void initPageDialog(int x, int y,
                     PrintService ps,
                     DocFlavor flavor,
                     PrintRequestAttributeSet attributes)
{
    this.psCurrent = ps;
    this.docFlavor = flavor;
    this.asOriginal = attributes;
    this.asCurrent = new HashPrintRequestAttributeSet(attributes);

    Container c = getContentPane();
    c.setLayout(new BorderLayout());

    pnlPageSetup = new PageSetupPanel();
    c.add(pnlPageSetup, BorderLayout.CENTER);

    pnlPageSetup.updateInfo();

    JPanel pnlSouth = new JPanel(new FlowLayout(FlowLayout.TRAILING));
    btnApprove = createExitButton("button.ok", this);
    pnlSouth.add(btnApprove);
    getRootPane().setDefaultButton(btnApprove);
    btnCancel = createExitButton("button.cancel", this);
    handleEscKey(btnCancel);
    pnlSouth.add(btnCancel);
    c.add(pnlSouth, BorderLayout.SOUTH);

    addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent event) {
            dispose(CANCEL);
        }
    });

    getAccessibleContext().setAccessibleDescription(getMsg("dialog.pstitle"));
    setResizable(false);
    setLocation(x, y);
    pack();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号