Package cli.System.Drawing.Printing.PrinterSettings

Examples of cli.System.Drawing.Printing.PrinterSettings.PaperSourceCollection


    private MediaTray[] getMediaTrays(){
      if( mediaTrays  != null ){
        // the print service is a singleton per printer so we only do this once
        return mediaTrays;
      }
      PaperSourceCollection trays = settings.get_PaperSources();
      int count = trays.get_Count();
      List<MediaTray> trayList = new ArrayList<MediaTray>();
      for( int i=0; i < count; i++ ){
        PaperSource tray = trays.get_Item(i);
        MediaTray javaTray = getDefaultTray(tray);
        if( javaTray != null ){
          trayList.add( javaTray );
        } else {
          trayList.add( new NetMediaTray( tray ) );
View Full Code Here


    public PaperSource getPaperSourceForTray( MediaTray tray ){
      if( tray instanceof NetMediaTray ){
      return ((NetMediaTray)tray).getPaperSource( this );
    }
      // try to find the appropriate paper source for the Java-Defined tray
      PaperSourceCollection trays = settings.get_PaperSources();
      int count = trays.get_Count();
      for( int i=0; i < count; i++ ){
        PaperSource paperSource = trays.get_Item(i);
      if( getDefaultTray( paperSource ) == tray ){
          return paperSource;
        }
      }
      return null;
View Full Code Here

      this.netSource = netSource;
    }
     
    public PaperSource getPaperSource( Win32PrintService service ){
      if( netSource == null ){
        PaperSourceCollection sources = service.settings.get_PaperSources();
        int count = sources.get_Count();
        for( int i=0; i < count; i++ ){
          PaperSource source = sources.get_Item(i);
          if( source.get_RawKind() == rawKind ){
            netSource = source;
            break;
          }
        }
View Full Code Here

TOP

Related Classes of cli.System.Drawing.Printing.PrinterSettings.PaperSourceCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.