Java 类javax.print.MultiDocPrintService 实例源码

项目:javify    文件:CupsPrintServiceLookup.java   
/**
* All printers and printer classes of the CUPS server are checked.
* If flavors or attributes are null the constraint is not used.
*
* @param flavors the document flavors which have to be supported.
* @param attributes the attributes which have to be supported.
*
* @return The multidoc print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
    AttributeSet attributes)
{
  ArrayList result = new ArrayList();
  PrintService[] services = getPrintServices();

  for (int i=0; i < services.length; i++)
    {
      if (checkMultiDocPrintService(flavors, attributes, services[i]))
        result.add(services[i]);
    }

  return (MultiDocPrintService[]) result.toArray(
    new MultiDocPrintService[result.size()]);
}
项目:jvm-stm    文件:CupsPrintServiceLookup.java   
/**
* All printers and printer classes of the CUPS server are checked.
* If flavors or attributes are null the constraint is not used.
* 
* @param flavors the document flavors which have to be supported.
* @param attributes the attributes which have to be supported.
* 
* @return The multidoc print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
    AttributeSet attributes)
{
  ArrayList result = new ArrayList();
  PrintService[] services = getPrintServices();   

  for (int i=0; i < services.length; i++)
    {
      if (checkMultiDocPrintService(flavors, attributes, services[i]))
        result.add(services[i]);  
    }

  return (MultiDocPrintService[]) result.toArray(
    new MultiDocPrintService[result.size()]);
}
项目:JamVM-PH    文件:CupsPrintServiceLookup.java   
/**
* All printers and printer classes of the CUPS server are checked.
* If flavors or attributes are null the constraint is not used.
* 
* @param flavors the document flavors which have to be supported.
* @param attributes the attributes which have to be supported.
* 
* @return The multidoc print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
    AttributeSet attributes)
{
  ArrayList result = new ArrayList();
  PrintService[] services = getPrintServices();   

  for (int i=0; i < services.length; i++)
    {
      if (checkMultiDocPrintService(flavors, attributes, services[i]))
        result.add(services[i]);  
    }

  return (MultiDocPrintService[]) result.toArray(
    new MultiDocPrintService[result.size()]);
}
项目:classpath    文件:CupsPrintServiceLookup.java   
/**
* All printers and printer classes of the CUPS server are checked.
* If flavors or attributes are null the constraint is not used.
*
* @param flavors the document flavors which have to be supported.
* @param attributes the attributes which have to be supported.
*
* @return The multidoc print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
    AttributeSet attributes)
{
  ArrayList result = new ArrayList();
  PrintService[] services = getPrintServices();

  for (int i=0; i < services.length; i++)
    {
      if (checkMultiDocPrintService(flavors, attributes, services[i]))
        result.add(services[i]);
    }

  return (MultiDocPrintService[]) result.toArray(
    new MultiDocPrintService[result.size()]);
}
项目:OpenJSharp    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:OpenJSharp    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:OpenJSharp    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:jdk8u-jdk    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:jdk8u-jdk    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk-jdk10    文件:PrintServiceLookupProvider.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk-jdk10    文件:PrintServiceLookupProvider.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk9    文件:PrintServiceLookupProvider.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk9    文件:PrintServiceLookupProvider.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:jdk8u_jdk    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:jdk8u_jdk    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:lookaside_java-1.8.0-openjdk    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:lookaside_java-1.8.0-openjdk    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:infobip-open-jdk-8    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:infobip-open-jdk-8    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:jdk8u-dev-jdk    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:jdk8u-dev-jdk    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:jdk7-jdk    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:jdk7-jdk    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk-source-code-learn    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk-source-code-learn    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:OLD-OpenJDK8    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:OLD-OpenJDK8    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk-jdk7u-jdk    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk-jdk7u-jdk    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk-icedtea7    文件:Win32PrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:openjdk-icedtea7    文件:UnixPrintServiceLookup.java   
public MultiDocPrintService[]
    getMultiDocPrintServices(DocFlavor[] flavors,
                             AttributeSet attributes) {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      security.checkPrintJobAccess();
    }
    return new MultiDocPrintService[0];
}
项目:javify    文件:CupsPrintServiceLookup.java   
/**
 * Checks the given print service - own method so it can be used also
 * to check application registered print services from PrintServiceLookup.
 *
 * @param flavors the document flavors which have to be supported.
 * @param attributes the attributes which have to be supported.
 * @param service the service to check
 *
 * @return <code>true</code> if all constraints match, <code>false</code>
 * otherwise.
 */
public boolean checkMultiDocPrintService(DocFlavor[] flavors,
  AttributeSet attributes, PrintService service)
{
  if (service instanceof MultiDocPrintService)
    {
      boolean allFlavorsSupported = true;
      boolean allAttributesSupported = true;

      if (flavors == null || flavors.length != 0)
        allFlavorsSupported = true;
      else
        {
          for (int k = 0; k < flavors.length; k++)
            {
              if (! service.isDocFlavorSupported(flavors[k]))
                {
                  allFlavorsSupported = false;
                  break;
                }
            }
        }

      if (attributes == null || attributes.size() == 0)
        allAttributesSupported = true;
      else
        {
          Attribute[] atts = attributes.toArray();
          for (int j = 0; j < atts.length; j++)
            {
              if (! service.isAttributeCategorySupported(
                  atts[j].getCategory()))
                {
                  allAttributesSupported = false;
                  break;
                }
            }
        }

      if (allAttributesSupported && allFlavorsSupported)
        return true;
    }

  return false;
}
项目:jvm-stm    文件:CupsPrintServiceLookup.java   
/**
 * Checks the given print service - own method so it can be used also
 * to check application registered print services from PrintServiceLookup.
 * 
 * @param flavors the document flavors which have to be supported.
 * @param attributes the attributes which have to be supported.
 * @param service the service to check
 * 
 * @return <code>true</code> if all constraints match, <code>false</code> 
 * otherwise.
 */
public boolean checkMultiDocPrintService(DocFlavor[] flavors, 
  AttributeSet attributes, PrintService service)
{    
  if (service instanceof MultiDocPrintService)
    { 
      boolean allFlavorsSupported = true;
      boolean allAttributesSupported = true;

      if (flavors == null || flavors.length != 0)
        allFlavorsSupported = true;
      else
        {
          for (int k = 0; k < flavors.length; k++)
            {
              if (! service.isDocFlavorSupported(flavors[k]))
                {
                  allFlavorsSupported = false;
                  break;
                }
            }
        }

      if (attributes == null || attributes.size() == 0)
        allAttributesSupported = true;
      else
        {
          Attribute[] atts = attributes.toArray();
          for (int j = 0; j < atts.length; j++)
            {
              if (! service.isAttributeCategorySupported(
                  atts[j].getCategory()))
                {
                  allAttributesSupported = false;
                  break;
                }
            }
        }

      if (allAttributesSupported && allFlavorsSupported)
        return true;
    }     

  return false;
}
项目:cn1    文件:WinPrintServiceLookup.java   
@Override
public MultiDocPrintService[] getMultiDocPrintServices(
                final DocFlavor[] flavors, final AttributeSet attributes) {
    return new MultiDocPrintService[0];
}
项目:cn1    文件:Win32PrintServiceProvider.java   
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
        AttributeSet attributes) {
    // No multidoc print services available.
    return new MultiDocPrintService[0];
}
项目:cn1    文件:CUPSPrintServiceProvider.java   
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
        AttributeSet attributes) {
    // No multidoc print services available, yet.
    return new MultiDocPrintService[0];
}
项目:JamVM-PH    文件:CupsPrintServiceLookup.java   
/**
 * Checks the given print service - own method so it can be used also
 * to check application registered print services from PrintServiceLookup.
 * 
 * @param flavors the document flavors which have to be supported.
 * @param attributes the attributes which have to be supported.
 * @param service the service to check
 * 
 * @return <code>true</code> if all constraints match, <code>false</code> 
 * otherwise.
 */
public boolean checkMultiDocPrintService(DocFlavor[] flavors, 
  AttributeSet attributes, PrintService service)
{    
  if (service instanceof MultiDocPrintService)
    { 
      boolean allFlavorsSupported = true;
      boolean allAttributesSupported = true;

      if (flavors == null || flavors.length != 0)
        allFlavorsSupported = true;
      else
        {
          for (int k = 0; k < flavors.length; k++)
            {
              if (! service.isDocFlavorSupported(flavors[k]))
                {
                  allFlavorsSupported = false;
                  break;
                }
            }
        }

      if (attributes == null || attributes.size() == 0)
        allAttributesSupported = true;
      else
        {
          Attribute[] atts = attributes.toArray();
          for (int j = 0; j < atts.length; j++)
            {
              if (! service.isAttributeCategorySupported(
                  atts[j].getCategory()))
                {
                  allAttributesSupported = false;
                  break;
                }
            }
        }

      if (allAttributesSupported && allFlavorsSupported)
        return true;
    }     

  return false;
}
项目:classpath    文件:CupsPrintServiceLookup.java   
/**
 * Checks the given print service - own method so it can be used also
 * to check application registered print services from PrintServiceLookup.
 *
 * @param flavors the document flavors which have to be supported.
 * @param attributes the attributes which have to be supported.
 * @param service the service to check
 *
 * @return <code>true</code> if all constraints match, <code>false</code>
 * otherwise.
 */
public boolean checkMultiDocPrintService(DocFlavor[] flavors,
  AttributeSet attributes, PrintService service)
{
  if (service instanceof MultiDocPrintService)
    {
      boolean allFlavorsSupported = true;
      boolean allAttributesSupported = true;

      if (flavors == null || flavors.length != 0)
        allFlavorsSupported = true;
      else
        {
          for (int k = 0; k < flavors.length; k++)
            {
              if (! service.isDocFlavorSupported(flavors[k]))
                {
                  allFlavorsSupported = false;
                  break;
                }
            }
        }

      if (attributes == null || attributes.size() == 0)
        allAttributesSupported = true;
      else
        {
          Attribute[] atts = attributes.toArray();
          for (int j = 0; j < atts.length; j++)
            {
              if (! service.isAttributeCategorySupported(
                  atts[j].getCategory()))
                {
                  allAttributesSupported = false;
                  break;
                }
            }
        }

      if (allAttributesSupported && allFlavorsSupported)
        return true;
    }

  return false;
}
项目:freeVM    文件:Win32PrintServiceProvider.java   
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
        AttributeSet attributes) {
    // No multidoc print services available.
    return new MultiDocPrintService[0];
}
项目:freeVM    文件:CUPSPrintServiceProvider.java   
public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
        AttributeSet attributes) {
    // No multidoc print services available, yet.
    return new MultiDocPrintService[0];
}