当前位置: 首页>>代码示例>>Java>>正文


Java SunPageSelection.SELECTION属性代码示例

本文整理汇总了Java中sun.print.SunPageSelection.SELECTION属性的典型用法代码示例。如果您正苦于以下问题:Java SunPageSelection.SELECTION属性的具体用法?Java SunPageSelection.SELECTION怎么用?Java SunPageSelection.SELECTION使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在sun.print.SunPageSelection的用法示例。


在下文中一共展示了SunPageSelection.SELECTION属性的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);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:ServiceDialog.java

示例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;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:RasterPrinterJob.java

示例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();
	}
 
开发者ID:jugglemaster,项目名称:JuggleMasterPro,代码行数:38,代码来源:PrintRangeSubJPanel.java

示例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;
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:14,代码来源:WPrinterJob.java


注:本文中的sun.print.SunPageSelection.SELECTION属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。