Examples of SwingGUI


Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

      changeTo(null, decode_pdf.getlastPageDecoded()-1, null, null,true);
    }else if(name == PdfDictionary.FirstPage){
      changeTo(null, 1, null, null,true);
    }else if(name == PdfDictionary.GoBack){
      //<start-adobe><start-thin>
            SwingGUI swingGUI=((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));

            if(swingGUI!=null)
              swingGUI.currentCommands.executeCommand(Commands.BACK,null);
            //<end-thin><end-adobe>
    }else if(name == PdfDictionary.LastPage){
      changeTo(null, decode_pdf.getPageCount(), null, null,true);
    }else if(name == PdfDictionary.ZoomTo){
      //create scaling values list, taken from SimpleViewer.init(resourceBundle)
      JComboBox scaling = new JComboBox(new String[]{Messages.getMessage("PdfViewerScaleWindow.text"),Messages.getMessage("PdfViewerScaleHeight.text"),
          Messages.getMessage("PdfViewerScaleWidth.text"),
          "25","50","75","100","125","150","200","250","500","750","1000"});
      int option = JOptionPane.showConfirmDialog(null, scaling, Messages.getMessage("PdfViewerToolbarScaling.text")+ ':', JOptionPane.DEFAULT_OPTION);
     
             //<start-adobe><start-thin>
      if(option!=-1){
        int selection = scaling.getSelectedIndex();
        if(selection!=-1){
          SwingGUI swing = ((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));
                    if(swing!=null){
              swing.setSelectedComboIndex(Commands.SCALING, selection);
              swing.zoom(false);
                    }
        }
      }
      //<end-thin><end-adobe>
    }else if(name == PdfDictionary.FullScreen){
            //<start-adobe><start-thin>
            SwingGUI swingGUI=((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));

            if(swingGUI!=null)
      swingGUI.currentCommands.executeCommand(Commands.FULLSCREEN,null);
            //<end-thin><end-adobe>
    }else if(name == PdfDictionary.AcroForm_FormsJSGuide) {//AcroForm:FormsJSGuide
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

 
  private void additionalAction_SaveAs() {
    //- we should call it directly - I have put code below from Commands
   
    //<start-adobe><start-thin>
    SwingGUI swingGUI=((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));

    if(swingGUI!=null)
             swingGUI.currentCommands.executeCommand(Commands.SAVEFORM, null);
    //<end-thin><end-adobe>
  }
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

            location = new Rectangle((int)x, (int)y, (int)decode_pdf.getVisibleRect().getWidth(), (int)decode_pdf.getVisibleRect().getHeight());

            decode_pdf.scrollRectToVisible((Rectangle) location);
        }
       
    SwingGUI swingGUI=((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));
    if(swingGUI!=null){
      ((org.jpedal.examples.simpleviewer.gui.SwingGUI)swingGUI).zoom(true);
 
      if(storeView)
        swingGUI.currentCommands.executeCommand(Commands.ADDVIEW,new Object[]{page,location,type});
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

  }
 
  //<start-adobe><start-thin>
  public int getPageNum(){
   
        SwingGUI swingGUI=((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));
        if(swingGUI!=null)
            return swingGUI.getCurrentPage();
        else
            return 1;
  }
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

  }
 
  //<start-adobe><start-thin>
  /*JS used to see if the forms need to be saved or not */
  public boolean getDirty(){
        SwingGUI swingGUI=((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));
        if(swingGUI!=null)
            return swingGUI.getFormsDirtyFlag();
        else
            return false;
  }
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

            return false;
  }
 
  /*JS sets the flag that defines if the forms should be saved or not*/
  public void setDirty(boolean dirty){
    SwingGUI swingGUI=((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));
        if(swingGUI!=null)
        swingGUI.setFormsDirtyFlag(dirty);
  }
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

            // <start-adobe><start-thin><start-ulc>
            case org.jpedal.external.OffsetOptions.INTERNAL_DRAG_BLANK:
                facingCursorX = 0;
                facingCursorY = pdfDecoder.getHeight();
                SwingGUI gui1 = (SwingGUI)externalHandlers.getExternalHandler(Options.SwingContainer);
                if (gui1 != null)
                    gui1.setDragCorner(mode);
                pdfDecoder.repaint();
                break;


            case org.jpedal.external.OffsetOptions.INTERNAL_DRAG_CURSOR_BOTTOM_LEFT:
                facingCursorX=x;
                facingCursorY=y;
                SwingGUI gui2 = (SwingGUI)externalHandlers.getExternalHandler(Options.SwingContainer);
                if (gui2 != null)
                    gui2.setDragCorner(mode);
                pdfDecoder.repaint();
                break;

            case org.jpedal.external.OffsetOptions.INTERNAL_DRAG_CURSOR_BOTTOM_RIGHT:
                facingCursorX=x;
                facingCursorY=y;
                SwingGUI gui3 = (SwingGUI)externalHandlers.getExternalHandler(Options.SwingContainer);
                if (gui3 != null)
                    gui3.setDragCorner(mode);
                pdfDecoder.repaint();
                break;

            case org.jpedal.external.OffsetOptions.INTERNAL_DRAG_CURSOR_TOP_LEFT:
                facingCursorX=x;
                facingCursorY=y;
                SwingGUI gui4 = (SwingGUI)externalHandlers.getExternalHandler(Options.SwingContainer);
                if (gui4 != null)
                    gui4.setDragCorner(mode);
                pdfDecoder.repaint();
                break;

            case org.jpedal.external.OffsetOptions.INTERNAL_DRAG_CURSOR_TOP_RIGHT:
                facingCursorX=x;
                facingCursorY=y;
                SwingGUI gui5 = (SwingGUI)externalHandlers.getExternalHandler(Options.SwingContainer);
                if (gui5 != null)
                    gui5.setDragCorner(mode);
                pdfDecoder.repaint();
                break;
            // <end-ulc><end-thin><end-adobe>

            default:
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

    /**
     * track and display screen co-ordinates and support links
     */

        //set cursor
        SwingGUI gui = ((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));
        gui.setCursor(gui.GRAB_CURSOR);
  }
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

        if (arg0.getButton()==MouseEvent.BUTTON1) {
            currentPoint = arg0.getPoint();
            currentView = decode_pdf.getVisibleRect();

            //set cursor
            SwingGUI gui = ((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));
            gui.setCursor(gui.GRABBING_CURSOR);
        }
  }
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.SwingGUI

        }
  }

  public void mouseReleased(MouseEvent arg0) {
        //reset cursor
        SwingGUI gui = ((SwingGUI)decode_pdf.getExternalHandler(Options.SwingContainer));
        gui.setCursor(gui.GRAB_CURSOR);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.