void () { PrintSettings printSettings = PrintSettings.getInstance(); myRbSelectedText.setEnabled(isSelectedTextEnabled); myRbSelectedText.setSelected(isSelectedTextEnabled); myRbCurrentFile.setEnabled(myFileName != null || mySelectedFileCount > 1); myRbCurrentFile.setSelected(myFileName != null && !isSelectedTextEnabled || mySelectedFileCount > 1); myRbCurrentPackage.setEnabled(myDirectoryName != null); myRbCurrentPackage.setSelected(myDirectoryName != null && !isSelectedTextEnabled && myFileName == null); myCbIncludeSubpackages.setSelected(printSettings.isIncludeSubdirectories()); updateDependentComponents(); Object selectedPageSize = PageSizes.getItem(printSettings.PAPER_SIZE); if(selectedPageSize != null) { myPaperSizeCombo.setSelectedItem(selectedPageSize); } myCbColorPrinting.setSelected(printSettings.COLOR_PRINTING); myCbSyntaxPrinting.setSelected(printSettings.SYNTAX_PRINTING); myCbPrintAsGraphics.setSelected(printSettings.PRINT_AS_GRAPHICS); if(printSettings.PORTRAIT_LAYOUT) { myRbPortrait.setSelected(true); } else { myRbLandscape.setSelected(true); } myFontNameCombo.setFontName(printSettings.FONT_NAME); myFontSizeCombo.setSelectedItem(Integer.valueOf(printSettings.FONT_SIZE)); myCbLineNumbers.setSelected(printSettings.PRINT_LINE_NUMBERS); if(printSettings.WRAP) { myRbWrapAtWordBreaks.setSelected(true); } else { myRbNoWrap.setSelected(true); } myTopMarginField.setText(String.valueOf(printSettings.TOP_MARGIN)); myBottomMarginField.setText(String.valueOf(printSettings.BOTTOM_MARGIN)); myLeftMarginField.setText(String.valueOf(printSettings.LEFT_MARGIN)); myRightMarginField.setText(String.valueOf(printSettings.RIGHT_MARGIN)); myCbDrawBorder.setSelected(printSettings.DRAW_BORDER); myCbEvenNumberOfPages.setSelected(printSettings.EVEN_NUMBER_OF_PAGES); myLineTextField1.setText(printSettings.FOOTER_HEADER_TEXT1); myLinePlacementCombo1.setSelectedItem(printSettings.FOOTER_HEADER_PLACEMENT1); myLineAlignmentCombo1.setSelectedItem(printSettings.FOOTER_HEADER_ALIGNMENT1); myLineTextField2.setText(printSettings.FOOTER_HEADER_TEXT2); myLinePlacementCombo2.setSelectedItem(printSettings.FOOTER_HEADER_PLACEMENT2); myLineAlignmentCombo2.setSelectedItem(printSettings.FOOTER_HEADER_ALIGNMENT2); myFooterFontSizeCombo.setSelectedItem(Integer.valueOf(printSettings.FOOTER_HEADER_FONT_SIZE)); myFooterFontNameCombo.setFontName(printSettings.FOOTER_HEADER_FONT_NAME); }