Examples of Rollup


Examples of pivot.wtk.Rollup

    }

    // ButtonPressListener methods

    public void buttonPressed(Button button) {
        Rollup rollup = (Rollup)getComponent();
        rollup.setExpanded(!rollup.isExpanded());
    }
View Full Code Here

Examples of pivot.wtk.Rollup

            return height;
        }

        @Override
        public void start(TransitionListener transitionListener) {
            Rollup rollup = (Rollup)getComponent();
            originalPreferredHeight = rollup.isPreferredHeightSet() ?
                rollup.getPreferredHeight() : -1;

            super.start(transitionListener);
        }
View Full Code Here

Examples of pivot.wtk.Rollup

            super.start(transitionListener);
        }

        @Override
        public void stop() {
            Rollup rollup = (Rollup)getComponent();
            rollup.setPreferredHeight(originalPreferredHeight);

            super.stop();
        }
View Full Code Here

Examples of pivot.wtk.Rollup

                    height = (int)easing.easeIn(elapsedTime, height1, height2 - height1, duration);
                } else {
                    height = (int)easing.easeOut(elapsedTime, height1, height2 - height1, duration);
                }

                Rollup rollup = (Rollup)getComponent();
                rollup.setPreferredHeight(height);
            }
        }
View Full Code Here

Examples of pivot.wtk.Rollup

        public boolean mouseUp(Component component, Mouse.Button button, int x, int y) {
            return false;
        }

        public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
            Rollup rollup = (Rollup)getComponent();
            rollup.setExpanded(!rollup.isExpanded());
            return true;
        }
View Full Code Here

Examples of pivot.wtk.Rollup

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

        Rollup rollup = (Rollup)component;

        // Add the rollup button
        rollupButton = new RollupButton();
        rollup.add(rollupButton);

        // Initialize state
        headingChanged(rollup, null);
        contentChanged(rollup, null);
    }
View Full Code Here

Examples of pivot.wtk.Rollup

        contentChanged(rollup, null);
    }

    @Override
    public void uninstall() {
        Rollup rollup = (Rollup)getComponent();

        // Uninitialize state
        Component heading = rollup.getHeading();
        if (heading != null) {
            heading.getComponentMouseButtonListeners().remove(headingMouseButtonHandler);
        }

        // Remove the rollup button
        rollup.remove(rollupButton);
        rollupButton = null;

        super.uninstall();
    }
View Full Code Here

Examples of pivot.wtk.Rollup

        super.uninstall();
    }

    @Override
    public int getPreferredWidth(int height) {
        Rollup rollup = (Rollup)getComponent();

        Component heading = rollup.getHeading();
        Component content = rollup.getContent();

        int preferredWidth = 0;

        if (heading != null) {
            preferredWidth = heading.getPreferredWidth(-1);
        }

        if (rollup.isExpanded() && content != null) {
            preferredWidth = Math.max(preferredWidth, content.getPreferredWidth(-1));
        }

        preferredWidth += rollupButton.getPreferredWidth(-1) + buffer;
View Full Code Here

Examples of pivot.wtk.Rollup

        return preferredWidth;
    }

    @Override
    public int getPreferredHeight(int width) {
        Rollup rollup = (Rollup)getComponent();
        return getPreferredHeight(width, rollup.isExpanded());
    }
View Full Code Here

Examples of pivot.wtk.Rollup

     *
     * @param expanded
     * The supposed expansion state.
     */
    private int getPreferredHeight(int width, boolean expanded) {
        Rollup rollup = (Rollup)getComponent();

        Component heading = rollup.getHeading();
        Component content = rollup.getContent();

        int preferredHeight = 0;

        // Calculate our internal width constraint
        if (justify && width >= 0) {
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.