6735296: Regression: Common print dialog does not show the correct page orientation

Reviewed-by: tdv, prr
This commit is contained in:
Jennifer Godinez 2009-03-05 10:56:06 -08:00
parent be8bd14e3c
commit c9de141417

View File

@ -2149,6 +2149,8 @@ public class ServiceDialog extends JDialog implements ActionListener {
}
}
}
}
rbPortrait.setEnabled(pSupported);
rbLandscape.setEnabled(lSupported);
@ -2161,9 +2163,10 @@ public class ServiceDialog extends JDialog implements ActionListener {
or = (OrientationRequested)psCurrent.getDefaultAttributeValue(orCategory);
// need to validate if default is not supported
if (!psCurrent.isAttributeValueSupported(or, docFlavor, asCurrent)) {
if ((or != null) &&
!psCurrent.isAttributeValueSupported(or, docFlavor, asCurrent)) {
or = null;
values =
Object values =
psCurrent.getSupportedAttributeValues(orCategory,
docFlavor,
asCurrent);
@ -2192,13 +2195,6 @@ public class ServiceDialog extends JDialog implements ActionListener {
} else { // if (or == OrientationRequested.REVERSE_LANDSCAPE)
rbRevLandscape.setSelected(true);
}
} else {
rbPortrait.setEnabled(pSupported);
rbLandscape.setEnabled(lSupported);
rbRevPortrait.setEnabled(rpSupported);
rbRevLandscape.setEnabled(rlSupported);
}
}
}