Java 类javax.print.attribute.standard.PrinterMakeAndModel 实例源码

项目:jdk8u-jdk    文件:PrintServiceStub.java   
public PrintServiceStub(String name) {
    _name = name;
    _flavors = new HashSet<DocFlavor>();
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
    _attributes = new HashMap<>();
    _attributes.put(PrinterName.class, new PrinterName(name, null));
    _attributes.put(PrinterState.class, PrinterState.IDLE);
    _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
            null));
    _attributes.put(PrinterIsAcceptingJobs.class,
            PrinterIsAcceptingJobs.ACCEPTING_JOBS);
    _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
            "Custom printer", null));
    _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
}
项目:openjdk-jdk10    文件:PrintServiceStub.java   
public PrintServiceStub(String name) {
    _name = name;
    _flavors = new HashSet<DocFlavor>();
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
    _attributes = new HashMap<>();
    _attributes.put(PrinterName.class, new PrinterName(name, null));
    _attributes.put(PrinterState.class, PrinterState.IDLE);
    _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
            null));
    _attributes.put(PrinterIsAcceptingJobs.class,
            PrinterIsAcceptingJobs.ACCEPTING_JOBS);
    _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
            "Custom printer", null));
    _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
}
项目:openjdk9    文件:PrintServiceStub.java   
public PrintServiceStub(String name) {
    _name = name;
    _flavors = new HashSet<DocFlavor>();
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
    _attributes = new HashMap<>();
    _attributes.put(PrinterName.class, new PrinterName(name, null));
    _attributes.put(PrinterState.class, PrinterState.IDLE);
    _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
            null));
    _attributes.put(PrinterIsAcceptingJobs.class,
            PrinterIsAcceptingJobs.ACCEPTING_JOBS);
    _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
            "Custom printer", null));
    _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
}
项目:jdk8u_jdk    文件:PrintServiceStub.java   
public PrintServiceStub(String name) {
    _name = name;
    _flavors = new HashSet<DocFlavor>();
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
    _attributes = new HashMap<>();
    _attributes.put(PrinterName.class, new PrinterName(name, null));
    _attributes.put(PrinterState.class, PrinterState.IDLE);
    _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
            null));
    _attributes.put(PrinterIsAcceptingJobs.class,
            PrinterIsAcceptingJobs.ACCEPTING_JOBS);
    _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
            "Custom printer", null));
    _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
}
项目:lookaside_java-1.8.0-openjdk    文件:PrintServiceStub.java   
public PrintServiceStub(String name) {
    _name = name;
    _flavors = new HashSet<DocFlavor>();
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
    _attributes = new HashMap<>();
    _attributes.put(PrinterName.class, new PrinterName(name, null));
    _attributes.put(PrinterState.class, PrinterState.IDLE);
    _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
            null));
    _attributes.put(PrinterIsAcceptingJobs.class,
            PrinterIsAcceptingJobs.ACCEPTING_JOBS);
    _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
            "Custom printer", null));
    _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
}
项目:infobip-open-jdk-8    文件:PrintServiceStub.java   
public PrintServiceStub(String name) {
    _name = name;
    _flavors = new HashSet<DocFlavor>();
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
    _attributes = new HashMap<>();
    _attributes.put(PrinterName.class, new PrinterName(name, null));
    _attributes.put(PrinterState.class, PrinterState.IDLE);
    _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
            null));
    _attributes.put(PrinterIsAcceptingJobs.class,
            PrinterIsAcceptingJobs.ACCEPTING_JOBS);
    _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
            "Custom printer", null));
    _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
}
项目:jdk8u-dev-jdk    文件:PrintServiceStub.java   
public PrintServiceStub(String name) {
    _name = name;
    _flavors = new HashSet<DocFlavor>();
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
    _attributes = new HashMap<>();
    _attributes.put(PrinterName.class, new PrinterName(name, null));
    _attributes.put(PrinterState.class, PrinterState.IDLE);
    _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
            null));
    _attributes.put(PrinterIsAcceptingJobs.class,
            PrinterIsAcceptingJobs.ACCEPTING_JOBS);
    _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
            "Custom printer", null));
    _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
}
项目:OLD-OpenJDK8    文件:PrintServiceStub.java   
public PrintServiceStub(String name) {
    _name = name;
    _flavors = new HashSet<DocFlavor>();
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
    _flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
    _attributes = new HashMap<>();
    _attributes.put(PrinterName.class, new PrinterName(name, null));
    _attributes.put(PrinterState.class, PrinterState.IDLE);
    _attributes.put(PrinterInfo.class, new PrinterInfo("Custom location",
            null));
    _attributes.put(PrinterIsAcceptingJobs.class,
            PrinterIsAcceptingJobs.ACCEPTING_JOBS);
    _attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel(
            "Custom printer", null));
    _attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 });
}
项目:JuggleMasterPro    文件:PrintServiceSubJPanel.java   
final public void setValues() {

        final Attribute objLtypeAttribute = this.objGprintJDialog.getPrintService().getAttribute(PrinterMakeAndModel.class);
        this.objGtypeJLabel.setText(objLtypeAttribute != null ? objLtypeAttribute.toString() : null);

        final Attribute objLstatusAttribute = this.objGprintJDialog.getPrintService().getAttribute(PrinterIsAcceptingJobs.class);
        this.objGstatusJLabel.setText(objLstatusAttribute != null ? Tools.getLocaleString(objLstatusAttribute.toString()) : null);

        final Attribute objLinfoAttribute = this.objGprintJDialog.getPrintService().getAttribute(PrinterInfo.class);
        this.objGinfoJLabel.setText(objLinfoAttribute != null ? objLinfoAttribute.toString() : null);
        this.objGpropertiesJButton.setEnabled(this.objGserviceUIFactory != null);
    }
项目:javify    文件:PrinterDialog.java   
/**
 * Called to update for new selected
 * print service. Tests if currently
 * selected attributes are supported.
 */
void updateForSelectedService()
{
  PrinterMakeAndModel att1 =
    getSelectedPrintService().getAttribute(PrinterMakeAndModel.class);
  typValue.setText(att1 == null ? "" : att1.getValue());

  PrinterInfo att2 =
    getSelectedPrintService().getAttribute(PrinterInfo.class);
  infoValue.setText(att2 == null ? "" : att2.getValue());

  PrinterIsAcceptingJobs att3 =
    getSelectedPrintService().getAttribute(PrinterIsAcceptingJobs.class);
  PrinterState att4 =
    getSelectedPrintService().getAttribute(PrinterState.class);

  String status = att4.toString();
  if (att3 == PrinterIsAcceptingJobs.ACCEPTING_JOBS)
    status += " - " + getLocalizedString("lb.acceptingjobs");
  else if (att3 == PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS)
    status += " - " + getLocalizedString("lb.notacceptingjobs");

  statusValue.setText(status);

  if (categorySupported(Destination.class))
    {
      fileRedirection_cb.setEnabled(false);
    }
}
项目:jvm-stm    文件:PrinterDialog.java   
/**
 * Called to update for new selected
 * print service. Tests if currently
 * selected attributes are supported.
 */
void updateForSelectedService()
{
  PrinterMakeAndModel att1 =
    getSelectedPrintService().getAttribute(PrinterMakeAndModel.class);
  typValue.setText(att1 == null ? "" : att1.getValue());

  PrinterInfo att2 = 
    getSelectedPrintService().getAttribute(PrinterInfo.class);
  infoValue.setText(att2 == null ? "" : att2.getValue());

  PrinterIsAcceptingJobs att3 =
    getSelectedPrintService().getAttribute(PrinterIsAcceptingJobs.class);
  PrinterState att4 =
    getSelectedPrintService().getAttribute(PrinterState.class);

  String status = att4.toString();  
  if (att3 == PrinterIsAcceptingJobs.ACCEPTING_JOBS)
    status += " - " + getLocalizedString("lb.acceptingjobs");
  else if (att3 == PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS)
    status += " - " + getLocalizedString("lb.notacceptingjobs");

  statusValue.setText(status);

  if (categorySupported(Destination.class))
    {
      fileRedirection_cb.setEnabled(false);
    }
}
项目:JamVM-PH    文件:PrinterDialog.java   
/**
 * Called to update for new selected
 * print service. Tests if currently
 * selected attributes are supported.
 */
void updateForSelectedService()
{
  PrinterMakeAndModel att1 =
    getSelectedPrintService().getAttribute(PrinterMakeAndModel.class);
  typValue.setText(att1 == null ? "" : att1.getValue());

  PrinterInfo att2 = 
    getSelectedPrintService().getAttribute(PrinterInfo.class);
  infoValue.setText(att2 == null ? "" : att2.getValue());

  PrinterIsAcceptingJobs att3 =
    getSelectedPrintService().getAttribute(PrinterIsAcceptingJobs.class);
  PrinterState att4 =
    getSelectedPrintService().getAttribute(PrinterState.class);

  String status = att4.toString();  
  if (att3 == PrinterIsAcceptingJobs.ACCEPTING_JOBS)
    status += " - " + getLocalizedString("lb.acceptingjobs");
  else if (att3 == PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS)
    status += " - " + getLocalizedString("lb.notacceptingjobs");

  statusValue.setText(status);

  if (categorySupported(Destination.class))
    {
      fileRedirection_cb.setEnabled(false);
    }
}
项目:classpath    文件:PrinterDialog.java   
/**
 * Called to update for new selected
 * print service. Tests if currently
 * selected attributes are supported.
 */
void updateForSelectedService()
{
  PrinterMakeAndModel att1 =
    getSelectedPrintService().getAttribute(PrinterMakeAndModel.class);
  typValue.setText(att1 == null ? "" : att1.getValue());

  PrinterInfo att2 =
    getSelectedPrintService().getAttribute(PrinterInfo.class);
  infoValue.setText(att2 == null ? "" : att2.getValue());

  PrinterIsAcceptingJobs att3 =
    getSelectedPrintService().getAttribute(PrinterIsAcceptingJobs.class);
  PrinterState att4 =
    getSelectedPrintService().getAttribute(PrinterState.class);

  String status = att4.toString();
  if (att3 == PrinterIsAcceptingJobs.ACCEPTING_JOBS)
    status += " - " + getLocalizedString("lb.acceptingjobs");
  else if (att3 == PrinterIsAcceptingJobs.NOT_ACCEPTING_JOBS)
    status += " - " + getLocalizedString("lb.notacceptingjobs");

  statusValue.setText(status);

  if (categorySupported(Destination.class))
    {
      fileRedirection_cb.setEnabled(false);
    }
}
项目:cn1    文件:ServiceUIDialog.java   
void fillTypeField() {
    PrinterMakeAndModel type = (PrinterMakeAndModel)
            myService.getAttribute(PrinterMakeAndModel.class);
    typeText.setText(type == null ? "" : type.getValue());
}
项目:freeVM    文件:ServiceUIDialog.java   
void fillTypeField() {
    PrinterMakeAndModel type = (PrinterMakeAndModel)
            myService.getAttribute(PrinterMakeAndModel.class);
    typeText.setText(type == null ? "" : type.getValue());
}
项目:freeVM    文件:ServiceUIDialog.java   
void fillTypeField() {
    PrinterMakeAndModel type = (PrinterMakeAndModel)
            myService.getAttribute(PrinterMakeAndModel.class);
    typeText.setText(type == null ? "" : type.getValue());
}