Package org.jpedal.objects.layers

Examples of org.jpedal.objects.layers.PdfLayerList


      PdfArrayIterator state = aData.getMixedArray(PdfDictionary.State);

      if (state != null && state.getTokenCount() > 0) {

        final PdfLayerList layers = (PdfLayerList)decode_pdf.getJPedalObject(PdfDictionary.Layer);

        int count = state.getTokenCount();

        final int action = state.getNextValueAsConstant(true);
        String ref;
        for (int jj = 1; jj < count; jj++) {
          ref = state.getNextValueAsString(true);

          final String layerName = layers.getNameFromRef(ref);

          // toggle layer status when clicked
          Runnable updateAComponent = new Runnable() {
            public void run() {
              // force refresh
              decode_pdf.invalidate();
              decode_pdf.validate();

              // update settings on display and in PdfDecoder
              boolean newState;
              if (action == PdfDictionary.Toggle)
                newState = !layers.isVisible(layerName);
              else if (action == PdfDictionary.OFF)
                newState = false;
                            else //must be ON
                newState = true;

              layers.setVisiblity(layerName, newState);

              // decode again with new settings
              try {
                decode_pdf.decodePage(-1);
              } catch (Exception e) {
View Full Code Here


        if(OCProperties!=null && (layers==null || pageNumber!=layers.getOCpageNumber() || alwaysCheck)){

            currentPdfFile.checkResolved(OCProperties);

            if(layers==null)
                layers=new PdfLayerList();

            layers.init(OCProperties, PropertiesObj, currentPdfFile,pageNumber);

        }
View Full Code Here

        pageData.setScalingValue(scaling); //ensure aligned

        extractionMode = mode;

        PdfLayerList layers=res.getPdfLayerList();
        if(layers!=null){
            boolean layersChanged=layers.setZoom(scaling);

            if(layersChanged){
                try {
                    decodePage(-1);
                } catch (Exception e) {
View Full Code Here

        if(pages!=null)
            pages.setScaling(scaling);


        PdfLayerList layers=res.getPdfLayerList();
        if(layers!=null){
            boolean layersChanged=layers.setZoom(scalingdpi.removeScaling(scaling));

            if(layersChanged){
                try {
                    decodePage(-1);
                } catch (Exception e) {
View Full Code Here

            resultsFromDecode.resetTimeout();

            try{
                isDecoding = true;

                PdfLayerList layers=res.getPdfLayerList();
                if(layers!=null && layers.getChangesMade()){


                    lastPageDecoded=-1;
                    layers.setChangesMade(false);//set flag to say we have decoded the changes

                    //refresh forms in case any effected by layer change
                    formRenderer.getCompData().setForceRedraw(true);
                    formRenderer.getCompData().setLayerData(layers);
                    formRenderer.getCompData().resetScaledLocation(scaling,displayRotation,(int)swingPainter.getIndent());//indent here does nothing.
View Full Code Here

TOP

Related Classes of org.jpedal.objects.layers.PdfLayerList

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.