private void paintTextBounds(Graphics g) {
        Page currentPage = pageViewComponent.getPageLock(this);
        // get page transformation
        AffineTransform pageTransform = currentPage.getPageTransform(
                documentViewModel.getPageBoundary(),
                documentViewModel.getViewRotation(),
                documentViewModel.getViewZoom());
        Graphics2D gg = (Graphics2D) g;
        Color oldColor = g.getColor();
        g.setColor(Color.red);

        PageText pageText = currentPage.getViewText();
        ArrayList<LineText> pageLines = pageText.getPageLines();
        for (LineText lineText : pageLines) {

            for (WordText wordText : lineText.getWords()) {
                for (GlyphText glyph : wordText.getGlyphs()) {
                    g.setColor(Color.black);
                    GeneralPath glyphSpritePath =
                            new GeneralPath(glyph.getBounds());
                    glyphSpritePath.transform(pageTransform);
                    gg.draw(glyphSpritePath);
                }

//                if (!wordText.isWhiteSpace()) {
//                    g.setColor(Color.blue);
//                    GeneralPath glyphSpritePath =
//                            new GeneralPath(wordText.getBounds());
//                    glyphSpritePath.transform(pageTransform);
//                    gg.draw(glyphSpritePath);
//                }
            }
            g.setColor(Color.red);
            GeneralPath glyphSpritePath =
                    new GeneralPath(lineText.getBounds());
            glyphSpritePath.transform(pageTransform);
            gg.draw(glyphSpritePath);
        }
        g.setColor(oldColor);
        pageViewComponent.releasePageLock(currentPage, this);
    }