本文整理汇总了Java中sun.print.SunPageSelection.RANGE属性的典型用法代码示例。如果您正苦于以下问题:Java SunPageSelection.RANGE属性的具体用法?Java SunPageSelection.RANGE怎么用?Java SunPageSelection.RANGE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类sun.print.SunPageSelection
的用法示例。
在下文中一共展示了SunPageSelection.RANGE属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
SunPageSelection select = SunPageSelection.ALL;
setupRangeWidgets();
if (source == rbAll) {
asCurrent.add(prAll);
} else if (source == rbSelect) {
select = SunPageSelection.SELECTION;
} else if (source == rbPages ||
source == tfRangeFrom ||
source == tfRangeTo) {
updateRangeAttribute();
select = SunPageSelection.RANGE;
}
if (isAWT) {
asCurrent.add(select);
}
}
示例2: getSelectAttrib
protected final int getSelectAttrib() {
if (attributes != null) {
SunPageSelection pages =
(SunPageSelection)attributes.get(SunPageSelection.class);
if (pages == SunPageSelection.RANGE) {
return PD_PAGENUMS;
} else if (pages == SunPageSelection.SELECTION) {
return PD_SELECTION;
} else if (pages == SunPageSelection.ALL) {
return PD_ALLPAGES;
}
}
return PD_NOSELECTION;
}
示例3: setValues
final public void setValues() {
this.bolGprintRangeSupported = this.objGprintJDialog.getPrintService().isAttributeCategorySupported(PageRanges.class);
SunPageSelection objLsunPageSelection = SunPageSelection.ALL;
int intLmin = 1;
int intLmax = 1;
final PageRanges objLpageRanges = (PageRanges) this.objGprintJDialog.getAttributes().get(PageRanges.class);
if (objLpageRanges != null) {
if (!objLpageRanges.equals(this.objGallPageRanges)) {
objLsunPageSelection = SunPageSelection.RANGE;
final int[][] intLmemberAA = objLpageRanges.getMembers();
if (intLmemberAA.length > 0 && intLmemberAA[0].length > 1) {
intLmin = intLmemberAA[0][0];
intLmax = intLmemberAA[0][1];
}
}
}
if (objLsunPageSelection == SunPageSelection.ALL) {
this.objGallJRadioButton.setSelected(true);
} else if (objLsunPageSelection == SunPageSelection.SELECTION) {
// Comment this for now - objGselectJRadioButton is not initialized
// because Selection button is not added.
// See PrintRangeSubJPanel above.
// objGselectJRadioButton.setSelected(true);
} else { // RANGE
this.objGpagesJRadioButton.setSelected(true);
}
this.objGrangeFromJFormattedTextField.setValue(new Integer(intLmin));
this.objGrangeToJFormattedTextField.setValue(new Integer(intLmax));
this.objGallJRadioButton.setEnabled(this.bolGprintRangeSupported);
this.objGpagesJRadioButton.setEnabled(this.bolGprintRangeSupported);
this.setupRangeWidgets();
}
示例4: getSelectAttrib
private final int getSelectAttrib() {
if (attributes != null) {
SunPageSelection pages =
(SunPageSelection)attributes.get(SunPageSelection.class);
if (pages == SunPageSelection.RANGE) {
return PD_PAGENUMS;
} else if (pages == SunPageSelection.SELECTION) {
return PD_SELECTION;
} else if (pages == SunPageSelection.ALL) {
return PD_ALLPAGES;
}
}
return PD_NOSELECTION;
}