Package org.apache.pivot.wtk.text

Examples of org.apache.pivot.wtk.text.ImageNode


        @Override
        protected void attach() {
            super.attach();

            ImageNode imageNode = (ImageNode)getNode();
            imageNode.getImageNodeListeners().add(this);

            Image image = imageNode.getImage();
            if (image != null) {
                image.getImageListeners().add(this);
            }
        }
View Full Code Here


        @Override
        protected void detach() {
            super.detach();

            ImageNode imageNode = (ImageNode)getNode();
            imageNode.getImageNodeListeners().remove(this);
        }
View Full Code Here

        }

        @Override
        public void validate() {
            if (!isValid()) {
                ImageNode imageNode = (ImageNode)getNode();
                Image image = imageNode.getImage();

                if (image == null) {
                    setSize(0, 0);
                } else {
                    setSize(image.getWidth(), image.getHeight());
View Full Code Here

            }
        }

        @Override
        public void paint(Graphics2D graphics) {
            ImageNode imageNode = (ImageNode)getNode();
            Image image = imageNode.getImage();

            if (image != null) {
                image.paint(graphics);
            }
        }
View Full Code Here

    @Override
    protected void attach() {
        super.attach();

        ImageNode imageNode = (ImageNode)getNode();
        imageNode.getImageNodeListeners().add(this);

        Image image = imageNode.getImage();
        if (image != null) {
            image.getImageListeners().add(this);
        }
    }
View Full Code Here

    @Override
    protected void detach() {
        super.detach();

        ImageNode imageNode = (ImageNode)getNode();
        imageNode.getImageNodeListeners().remove(this);
    }
View Full Code Here

        imageNode.getImageNodeListeners().remove(this);
    }

    @Override
    protected void childLayout(int breakWidth) {
        ImageNode imageNode = (ImageNode)getNode();
        Image image = imageNode.getImage();

        if (image == null) {
            setSize(0, 0);
        } else {
            setSize(image.getWidth(), image.getHeight());
View Full Code Here

        }
    }

    @Override
    public Dimensions getPreferredSize(int breakWidth) {
        ImageNode imageNode = (ImageNode)getNode();
        Image image = imageNode.getImage();

        if (image == null) {
            return new Dimensions(0, 0);
        }
        return new Dimensions(image.getWidth(), image.getHeight());
View Full Code Here

        // empty block
    }

    @Override
    public int getBaseline() {
        ImageNode imageNode = (ImageNode)getNode();
        Image image = imageNode.getImage();

        int baseline = -1;

        if (image != null) {
            baseline = image.getBaseline();
View Full Code Here

        return baseline;
    }

    @Override
    public void paint(Graphics2D graphics) {
        ImageNode imageNode = (ImageNode)getNode();
        Image image = imageNode.getImage();

        if (image != null) {
            image.paint(graphics);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.text.ImageNode

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.