Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Bounds.translate()


            characterBounds = null;
        } else {
            characterBounds = documentView.getCharacterBounds(offset);

            if (characterBounds != null) {
                characterBounds = characterBounds.translate(margin.left, margin.top);
            }
        }

        return characterBounds;
    }
View Full Code Here


                if (offset >= nodeViewOffset
                    && offset < nodeViewOffset + characterCount) {
                    characterBounds = nodeView.getCharacterBounds(offset - nodeViewOffset);

                    if (characterBounds != null) {
                        characterBounds = characterBounds.translate(nodeView.getX(), nodeView.getY());
                    }

                    break;
                }
            }
View Full Code Here

            characterBounds = null;
        } else {
            characterBounds = documentView.getCharacterBounds(offset);

            if (characterBounds != null) {
                characterBounds = characterBounds.translate(margin.left, margin.top);
            }
        }

        return characterBounds;
    }
View Full Code Here

            if (shape.isVisible()) {
                Bounds transformedBounds = shape.getTransformedBounds();

                // Translate bounds to group coordinates
                Point origin = shape.getOrigin();
                transformedBounds = transformedBounds.translate(origin.x, origin.y);

                if (transformedBounds.contains(x, y)) {
                    // Transform location into shape coordinates
                    AffineTransform affineTransform = shape.getTransforms().getAffineTransform();
                    java.awt.Point location = new java.awt.Point(x - origin.x, y - origin.y);
View Full Code Here

            if (shape.isVisible()) {
                int x = shape.getX();
                int y = shape.getY();

                Bounds transformedBounds = shape.getTransformedBounds();
                transformedBounds = transformedBounds.translate(x, y);

                if (transformedBounds.intersects(clipBounds)) {
                    Graphics2D shapeGraphics = (Graphics2D)graphics.create();
                    shapeGraphics.translate(x, y);
                    shapeGraphics.transform(shape.getTransforms().getAffineTransform());
View Full Code Here

            characterBounds = null;
        } else {
            characterBounds = documentView.getCharacterBounds(offset);

            if (characterBounds != null) {
                characterBounds = characterBounds.translate(margin.left, margin.top);
            }
        }

        return characterBounds;
    }
View Full Code Here

                if (offset >= nodeViewOffset
                    && offset < nodeViewOffset + characterCount) {
                    characterBounds = nodeView.getCharacterBounds(offset - nodeViewOffset);

                    if (characterBounds != null) {
                        characterBounds = characterBounds.translate(nodeView.getX(), nodeView.getY());
                    }

                    break;
                }
            }
View Full Code Here

            if (i < nodeViews.getLength()) {
                NodeView nodeView = nodeViews.get(i);

                offset -= nodeView.getOffset();
                bounds = nodeView.getCharacterBounds(offset);
                bounds = bounds.translate(nodeView.getX(), nodeView.getY());
            }

            return bounds;
        }
View Full Code Here

            if (shape.isVisible()) {
                int x = shape.getX();
                int y = shape.getY();

                Bounds transformedBounds = shape.getTransformedBounds();
                transformedBounds = transformedBounds.translate(x, y);

                if (transformedBounds.intersects(clipBounds)) {
                    Graphics2D shapeGraphics = (Graphics2D)graphics.create();
                    shapeGraphics.translate(x, y);
                    shapeGraphics.transform(shape.getTransforms().getAffineTransform());
View Full Code Here

                        if (offset >= nodeViewOffset
                            && offset < nodeViewOffset + characterCount) {
                            characterBounds = segment.nodeView.getCharacterBounds(offset - nodeViewOffset);

                            if (characterBounds != null) {
                                characterBounds = characterBounds.translate(segment.nodeView.getX(), segment.nodeView.getY());
                            }

                            break;
                        }
                    }
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.