Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Window


            }

            // Load the Pivot UI
            private void loadBXML(final Display display, final double weight) {
                try {
                    Window window = (Window) new BXMLSerializer().readObject(this.getClass().getResource(
                        "splash.bxml"));
                    window.open(display);
                    progressOverlay.increment(weight);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
View Full Code Here


        BoxPane windowContent = new BoxPane();
        PushButton button = new PushButton("Open Sheet");
        button.getButtonPressListeners().add(new ButtonPressListener() {
            @Override
            public void buttonPressed(Button button) {
                final Window window = FileBrowserWithCharsetTest.getActiveWindow();
                final FileBrowserSheet fileBrowserSheet = new FileBrowserWithCharsetTest(FileBrowserSheet.Mode.OPEN);

                fileBrowserSheet.open(window, new SheetCloseListener() {
                    @Override
                    public void sheetClosed(Sheet sheet) {
View Full Code Here

            consumed = true;
        } else if (keyCode == Keyboard.KeyCode.LEFT) {
            // Close the window if this is not a top-level menu
            if (menu.getItem() != null) {
                Window window = menu.getWindow();
                window.close();
                consumed = true;
            }
        } else if (keyCode == Keyboard.KeyCode.RIGHT) {
            Menu.Item activeItem = menu.getActiveItem();
View Full Code Here

    @Override
    public boolean mouseDown(Container container, Mouse.Button button, int x, int y) {
        Dialog dialog = (Dialog)container;
        if (!dialog.isTopMost()) {
            Window rootOwner = dialog.getRootOwner();
            rootOwner.moveToFront();
        }

        return super.mouseDown(container, button, x, y);
    }
View Full Code Here

        // Add the display to the display list
        displays.add(displayHost.getDisplay());

        // Load the Pivot window
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        Window window;
        try {
            window = (Window)bxmlSerializer.readObject(SwingDemo.class.getResource("pivot_window.bxml"));
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
        }

        // Open the Pivot window on the display
        window.open(displayHost.getDisplay());

        // Open and select the internal frame
        internalFrame.setLocation(240, 100);
        internalFrame.setSize(480, 360);
        internalFrame.setVisible(true);
View Full Code Here

        } else {
            MenuButton menuButton = (MenuButton)getComponent();

            // Determine the popup's location and preferred size, relative
            // to the button
            Window window = menuButton.getWindow();

            if (window != null) {
                int width = getWidth();
                int height = getHeight();
View Full Code Here

public class HelloJava implements Application {
    private Window window = null;

    @Override
    public void startup(Display display, Map<String, String> properties) {
        window = new Window();

        Label label = new Label();
        label.setText("Hello World!");
        label.getStyles().put("font", new Font("Arial", Font.BOLD, 24));
        label.getStyles().put("color", Color.RED);
View Full Code Here

    }

    @Override
    public boolean shutdown(boolean optional) {
        for (int i = display.getLength() - 1; i >= 0; i--) {
            Window window = (Window)display.get(i);
            window.close();
        }

        return false;
    }
View Full Code Here

    @Override
    public boolean mouseDown(Container container, Mouse.Button button, int x, int y) {
        Sheet sheet = (Sheet)container;
        if (!sheet.isTopMost()) {
            Window owner = sheet.getOwner();
            owner.moveToFront();
        }

        boolean consumed = super.mouseDown(container, button, x, y);

        if (resizable && button == Mouse.Button.LEFT) {
View Full Code Here

        dropShadowDecorator.setShadowOpacity(DropShadowDecorator.DEFAULT_SHADOW_OPACITY);

        alignToOwner();

        Window owner = window.getOwner();
        owner.getComponentListeners().add(ownerListener);

        openTransition = new OpenTransition(false);
        openTransition.start(new TransitionListener() {
            @Override
            public void transitionCompleted(Transition transition) {
View Full Code Here

TOP

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

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.