Skip to content

Commit

Permalink
Rename printElement to debugPrint
Browse files Browse the repository at this point in the history
  • Loading branch information
aivanov-jdk committed Feb 4, 2021
1 parent b50d650 commit f9e9977
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -120,14 +120,14 @@ private static boolean toDebugPrint(final List<String> argsList) {

private static void checkFontSize(JEditorPane htmlPane,
boolean w3cUnits,
boolean printElement) {
boolean debugPrint) {
final View rootView = htmlPane.getUI().getRootView(htmlPane);
final View boxView = rootView.getView(0);
final View bodyView = boxView.getView(1);

int fontSizeInherited = getViewFontSize(bodyView.getView(0), printElement);
int fontSizeExplicit = getViewFontSize(bodyView.getView(1), printElement);
if (printElement) {
int fontSizeInherited = getViewFontSize(bodyView.getView(0), debugPrint);
int fontSizeExplicit = getViewFontSize(bodyView.getView(1), debugPrint);
if (debugPrint) {
System.out.println("w3cUnits: " + w3cUnits + "\n"
+ "Inherited: " + fontSizeInherited + "\n"
+ "Explicit: " + fontSizeExplicit + "\n");
Expand All @@ -140,10 +140,10 @@ private static void checkFontSize(JEditorPane htmlPane,
}
}

private static int getViewFontSize(View paragraphView, boolean printElement) {
private static int getViewFontSize(View paragraphView, boolean debugPrint) {
View inlineView = paragraphView.getView(0).getView(0);
int fontSize = StyleConstants.getFontSize(inlineView.getAttributes());
if (printElement) {
if (debugPrint) {
((AbstractElement) inlineView.getElement()).dump(System.out, 1);
}
return fontSize;
Expand Down

0 comments on commit f9e9977

Please sign in to comment.