Package pivot.wtk

Examples of pivot.wtk.Component$ComponentMouseWheelListenerList


        }

        @Override
        public void start(TransitionListener transitionListener) {
          Expander expander = (Expander)getComponent();
          Component content = expander.getContent();
          content.getDecorators().add(clipDecorator);

          getComponent().setEnabled(false);

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


        }

        @Override
        public void stop() {
          Expander expander = (Expander)getComponent();
          Component content = expander.getContent();
          content.getDecorators().remove(clipDecorator);

          getComponent().setEnabled(true);

          super.stop();
        }
View Full Code Here

            if (display != null) {
                int width = getWidth();
                int height = getHeight();

                Component content = calendarPopup.getContent();

                // Ensure that the popup remains within the bounds of the display
                Point buttonLocation = calendarButton.mapPointToAncestor(display, 0, 0);

                Dimensions displaySize = display.getSize();
                Dimensions popupSize = content.getPreferredSize();

                int x = buttonLocation.x;
                if (popupSize.width > width
                    && x + popupSize.width > displaySize.width) {
                    x = buttonLocation.x + width - popupSize.width;
View Full Code Here

    public int getPreferredWidth(int height) {
        int preferredWidth = 0;

        Palette palette = (Palette)getComponent();
        Component content = palette.getContent();

        Dimensions preferredTitleBarSize = titleBarFlowPane.getPreferredSize();
        preferredWidth = preferredTitleBarSize.width;

        if (content != null
            && content.isDisplayable()) {
            if (height != -1) {
                height = Math.max(height - preferredTitleBarSize.height - 4 -
                    padding.top - padding.bottom, 0);
            }

            preferredWidth = Math.max(preferredWidth,
                content.getPreferredWidth(height));
        }

        preferredWidth += (padding.left + padding.right) + 2;

        return preferredWidth;
View Full Code Here

    public int getPreferredHeight(int width) {
        int preferredHeight = 0;

        Palette palette = (Palette)getComponent();
        Component content = palette.getContent();

        if (width != -1) {
            width = Math.max(width - 2, 0);
        }

        preferredHeight = titleBarFlowPane.getPreferredHeight(width);

        if (content != null
            && content.isDisplayable()) {
            if (width != -1) {
                width = Math.max(width - padding.left - padding.right, 0);
            }

            preferredHeight += content.getPreferredHeight(width);
        }

        preferredHeight += (padding.top + padding.bottom) + 4;

        return preferredHeight;
View Full Code Here

    public Dimensions getPreferredSize() {
        int preferredWidth = 0;
        int preferredHeight = 0;

        Palette palette = (Palette)getComponent();
        Component content = palette.getContent();

        Dimensions preferredTitleBarSize = titleBarFlowPane.getPreferredSize();

        preferredWidth = preferredTitleBarSize.width;
        preferredHeight = preferredTitleBarSize.height;

        if (content != null
            && content.isDisplayable()) {
            Dimensions preferredContentSize = content.getPreferredSize();

            preferredWidth = Math.max(preferredWidth, preferredContentSize.width);
            preferredHeight += preferredContentSize.height;
        }
View Full Code Here

        titleBarFlowPane.setLocation(1, 1);
        titleBarFlowPane.setSize(Math.max(width - 2, 0),
            Math.max(titleBarFlowPane.getPreferredHeight(width - 2), 0));

        // Size/position content
        Component content = palette.getContent();

        if (content != null) {
            if (content.isDisplayable()) {
                content.setVisible(true);

                content.setLocation(padding.left + 1,
                    titleBarFlowPane.getHeight() + padding.top + 3);

                int contentWidth = Math.max(width - (padding.left + padding.right + 2), 0);
                int contentHeight = Math.max(height - (titleBarFlowPane.getHeight()
                    + padding.top + padding.bottom + 4), 0);

                content.setSize(contentWidth, contentHeight);
            } else {
                content.setVisible(false);
            }
        }
    }
View Full Code Here

        CardPane cardPane = (CardPane)getComponent();

        if (selectionChangeTransition == null) {
            if (matchSelectedCardSize) {
                Component selectedCard = cardPane.getSelectedCard();
                if (selectedCard != null) {
                    preferredWidth = selectedCard.getPreferredWidth(height);
                }
            } else {
                int selectedIndex = cardPane.getSelectedIndex();
                Orientation orientation = cardPane.getOrientation();

                if (selectedIndex != -1
                    || orientation == Orientation.HORIZONTAL) {
                    for (Component card : cardPane) {
                        preferredWidth = Math.max(preferredWidth, card.getPreferredWidth(height));
                    }
                }
            }
        } else {
            float percentComplete = selectionChangeTransition.getPercentComplete();

            Component previousSelectedCard = selectionChangeTransition.getPreviousSelectedCard();
            int previousWidth = (previousSelectedCard == null) ? 0 : previousSelectedCard.getWidth();

            Component selectedCard = selectionChangeTransition.getSelectedCard();
            int width = (selectedCard == null) ? 0 : selectedCard.getWidth();

            Orientation orientation = cardPane.getOrientation();

            if (!matchSelectedCardSize
                && orientation == Orientation.HORIZONTAL) {
View Full Code Here

        CardPane cardPane = (CardPane)getComponent();

        if (selectionChangeTransition == null) {
            if (matchSelectedCardSize) {
                Component selectedCard = cardPane.getSelectedCard();
                if (selectedCard != null) {
                    preferredHeight = selectedCard.getPreferredHeight(width);
                }
            } else {
                int selectedIndex = cardPane.getSelectedIndex();
                Orientation orientation = cardPane.getOrientation();

                if (selectedIndex != -1
                    || orientation == Orientation.VERTICAL) {
                    for (Component card : cardPane) {
                        preferredHeight = Math.max(preferredHeight, card.getPreferredHeight(width));
                    }
                }
            }
        } else {
            float percentComplete = selectionChangeTransition.getPercentComplete();

            Component previousSelectedCard = selectionChangeTransition.getPreviousSelectedCard();
            int previousHeight = (previousSelectedCard == null) ? 0 : previousSelectedCard.getHeight();

            Component selectedCard = selectionChangeTransition.getSelectedCard();
            int height = (selectedCard == null) ? 0 : selectedCard.getHeight();

            Orientation orientation = cardPane.getOrientation();

            if (!matchSelectedCardSize
                && orientation == Orientation.VERTICAL) {
View Full Code Here

        CardPane cardPane = (CardPane)getComponent();

        if (selectionChangeTransition == null) {
            if (matchSelectedCardSize) {
                Component selectedCard = cardPane.getSelectedCard();
                if (selectedCard == null) {
                    preferredSize = new Dimensions(0, 0);
                } else {
                    preferredSize = selectedCard.getPreferredSize();
                }
            } else {
                preferredSize = new Dimensions(0, 0);
                Orientation orientation = cardPane.getOrientation();

                int selectedIndex = cardPane.getSelectedIndex();
                for (Component card : cardPane) {
                    Dimensions cardSize = card.getPreferredSize();

                    if (selectedIndex != -1
                        || orientation == Orientation.HORIZONTAL) {
                        preferredSize.width = Math.max(cardSize.width, preferredSize.width);
                    }

                    if (selectedIndex != -1
                        || orientation == Orientation.VERTICAL) {
                        preferredSize.height = Math.max(cardSize.height, preferredSize.height);
                    }
                }
            }
        } else {
            float percentComplete = selectionChangeTransition.getPercentComplete();

            int previousWidth;
            int previousHeight;
            Component previousSelectedCard = selectionChangeTransition.getPreviousSelectedCard();

            if (previousSelectedCard == null) {
                previousWidth = 0;
                previousHeight = 0;
            } else {
                previousWidth = previousSelectedCard.getWidth();
                previousHeight = previousSelectedCard.getHeight();
            }

            int width;
            int height;
            Component selectedCard = selectionChangeTransition.getSelectedCard();

            if (selectedCard == null) {
                width = 0;
                height = 0;
            } else {
                width = selectedCard.getWidth();
                height = selectedCard.getHeight();
            }

            int preferredWidth = 0;
            int preferredHeight = 0;
View Full Code Here

TOP

Related Classes of pivot.wtk.Component$ComponentMouseWheelListenerList

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.