Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Container


            // TODO Don't queue the validate callback until layout()? Then we
            // wouldn't have to abort it in multiple locations...

            if (!isValid()) {
                TextArea textArea = (TextArea)getComponent();
                Container parent = textArea.getParent();

                int breakWidth = getBreakWidth();

                int width = 0;
                int y = 0;

                int top = -textArea.getY();
                int bottom = top + parent.getHeight();

                int i = 0;
                int j = 0;
                int n = getLength();
                int start = -1;
View Full Code Here


    @Override
    public void install(Component component) {
        super.install(component);

        Container container = (Container)component;

        // Add this as a container listener
        container.getContainerListeners().add(this);

        // Set the focus traversal policy
        container.setFocusTraversalPolicy(DEFAULT_FOCUS_TRAVERSAL_POLICY);
    }
View Full Code Here

        container.setFocusTraversalPolicy(DEFAULT_FOCUS_TRAVERSAL_POLICY);
    }

    @Override
    public void uninstall() {
        Container container = (Container)getComponent();

        // Remove this as a container listener
        container.getContainerListeners().remove(this);

        // Clear the focus traversal policy
        container.setFocusTraversalPolicy(null);

        super.uninstall();
    }
View Full Code Here

        private static final float GOLDEN_SECTION = 0.382f;

        @Override
        public void run() {
            Dialog dialog = (Dialog)getComponent();
            Container ancestor = dialog.getOwner();

            if (ancestor == null) {
                ancestor = dialog.getDisplay();
            }

            int deltaWidth = ancestor.getWidth() - getWidth();
            int deltaHeight = ancestor.getHeight() - getHeight();

            int x = Math.max(0, Math.round(ancestor.getX() + 0.5f * deltaWidth));
            int y = Math.max(0, Math.round(ancestor.getY() + GOLDEN_SECTION * deltaHeight));

            dialog.setLocation(x, y);
        }
View Full Code Here

        this.tableView = tableView;
        this.rowIndex = rowIndex;
        this.columnIndex = columnIndex;

        Container tableViewParent = tableView.getParent();
        if (tableViewParent instanceof ScrollPane) {
            tableViewScrollPane = (ScrollPane)tableViewParent;
        }

        // Get the row data, represented as a Dictionary
View Full Code Here

    public void update() {
        // No-op
    }

    public void repaint(Component component, int x, int y, int width, int height) {
        Container parent = component.getParent();

        if (parent != null) {
            int tx = getTranslatedX(component);
            int ty = getTranslatedY(component);

            x = (int)((x * scaleX) + component.getX() + tx);
            y = (int)((y * scaleY) + component.getY() + ty);
            width = (int)Math.ceil(width * scaleX);
            height = (int)Math.ceil(height * scaleY);

            parent.repaint(x, y, width, height);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.Container

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.