Package pivot.wtk

Examples of pivot.wtk.Window$ActionDictionary


     *
     * @author gbrown
     */
    protected class MinimizeImage extends ButtonImage {
        public void paint(Graphics2D graphics) {
            Window window = (Window)getComponent();
            graphics.setPaint(window.isActive() ? titleBarColor : inactiveTitleBarColor);
            graphics.fill(new Rectangle2D.Double(0, 6, 8, 2));
        }
View Full Code Here


     *
     * @author gbrown
     */
    protected class MaximizeImage extends ButtonImage {
        public void paint(Graphics2D graphics) {
            Window window = (Window)getComponent();
            graphics.setPaint(window.isActive() ? titleBarColor : inactiveTitleBarColor);
            graphics.fill(new Rectangle2D.Double(0, 0, 8, 8));

            graphics.setPaint(window.isActive() ? titleBarBackgroundColor : inactiveTitleBarBackgroundColor);
            graphics.fill(new Rectangle2D.Double(2, 2, 4, 4));
        }
View Full Code Here

     *
     * @author gbrown
     */
    protected class RestoreImage extends ButtonImage {
        public void paint(Graphics2D graphics) {
            Window window = (Window)getComponent();
            graphics.setPaint(window.isActive() ?
                titleBarColor : inactiveTitleBarColor);
            graphics.fill(new Rectangle2D.Double(1, 1, 6, 6));

            graphics.setPaint(window.isActive() ?
                titleBarBackgroundColor : inactiveTitleBarBackgroundColor);
            graphics.fill(new Rectangle2D.Double(3, 3, 2, 2));
        }
View Full Code Here

     *
     * @author gbrown
     */
    protected class CloseImage extends ButtonImage {
        public void paint(Graphics2D graphics) {
            Window window = (Window)getComponent();
            graphics.setPaint(window.isActive() ?
                titleBarColor : inactiveTitleBarColor);
            graphics.setStroke(new BasicStroke(2));

            graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
View Full Code Here

    @Override
    public void windowOpened(final Window window) {
        super.windowOpened(window);

        Window owner = window.getOwner();
        owner.getComponentMouseButtonListeners().add(ownerMouseButtonListener);

        ApplicationContext.queueCallback(new Runnable() {
            public void run() {
                openTransition = new SlideTransition(window, 0, 0,
                    -window.getHeight(), 0, false, SLIDE_DURATION, SLIDE_RATE);
View Full Code Here

            closeTransition = null;
        }
    }

    public void sheetClosed(Sheet sheet) {
        Window owner = sheet.getOwner();
        owner.getComponentMouseButtonListeners().remove(ownerMouseButtonListener);
    }
View Full Code Here

    protected boolean pressed = false;

    public ListButtonSkin() {
        listView = new ListView();

        listViewPopup = new Window(true);
        listViewPopup.getComponentMouseButtonListeners().add(listViewPopupMouseButtonListener);
        listViewPopup.getComponentKeyListeners().add(listViewPopupKeyListener);
        listViewPopup.getWindowStateListeners().add(listViewPopupWindowStateListener);
    }
View Full Code Here

    };

    public CalendarButtonSkin() {
        calendar = new Calendar();

        calendarPopup = new Window(true);
        calendarPopup.getComponentMouseButtonListeners().add(calendarPopupMouseButtonListener);
        calendarPopup.getComponentKeyListeners().add(calendarPopupKeyListener);
        calendarPopup.getWindowStateListeners().add(calendarPopupWindowStateListener);
    }
View Full Code Here

    @Override
    public boolean mouseMove(Component component, int x, int y) {
        boolean consumed = super.mouseMove(component, x, y);

        if (Mouse.getCapturer() == component) {
            Window window = (Window)getComponent();
            Display display = window.getDisplay();

            Point location = window.mapPointToAncestor(display, x, y);

            // Pretend that the mouse can't move off screen (off the display)
            location.x = Math.min(Math.max(location.x, 0), display.getWidth() - 1);
            location.y = Math.min(Math.max(location.y, 0), display.getHeight() - 1);

            if (dragOffset != null) {
                // Move the window
                window.setLocation(location.x - dragOffset.x, location.y - dragOffset.y);
            }
        }

        return consumed;
    }
View Full Code Here

    @Override
    public boolean mouseDown(Component component, Mouse.Button button, int x, int y) {
        boolean consumed = super.mouseDown(component, button, x, y);

        Window window = (Window)getComponent();
        boolean maximized = window.isMaximized();

        if (button == Mouse.Button.LEFT
            && !maximized) {
            Bounds titleBarBounds = titleBarFlowPane.getBounds();
View Full Code Here

TOP

Related Classes of pivot.wtk.Window$ActionDictionary

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.