Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Window


        // when the transition is complete
        Vote vote = Vote.APPROVE;

        // Don't start the transition if the sheet is being closed as a result
        // of the owner closing
        Window owner = sheet.getOwner();
        if (!(owner.isClosing()
            || owner.isClosed())) {
            TransitionListener transitionListener = new TransitionListener() {
                @Override
                public void transitionCompleted(Transition transition) {
                    sheet.close(result);
                    openTransition = null;
View Full Code Here


    }

    public void alignToOwner() {
        Sheet sheet = (Sheet)getComponent();

        Window owner = sheet.getOwner();
        if (owner != null) {
            Bounds clientArea = owner.getClientArea();

            Point location = owner.mapPointToAncestor(owner.getDisplay(), clientArea.x,
                clientArea.y);
            int x = location.x;
            int y = location.y;

            switch (slideSource) {
View Full Code Here

    @Override
    public void focusedChanged(Component component, Component obverseComponent) {
        super.focusedChanged(component, obverseComponent);

        TextInput textInput = (TextInput)component;
        Window window = textInput.getWindow();

        if (component.isFocused()) {
            // If focus was permanently transferred within this window,
            // select all
            if (obverseComponent == null
View Full Code Here

    private Window window = null;

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        window = new Window();
        BoxPane boxPane = new BoxPane();
        boxPane.getStyles().put("horizontalAlignment", HorizontalAlignment.RIGHT);

        PushButton uploadButton = new PushButton("Upload");
        uploadButton.getStyles().put("minimumAspectRatio", 3.0f);
View Full Code Here

    private TextInput textinputCustomBoolean = null;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = new Window((Component)bxmlSerializer.readObject(
            getClass().getResource("text_input_validator_test.bxml")));
        textinputFloatRange = (TextInput)bxmlSerializer.getNamespace().get("textinputFloatRange");
        textinputIntRange = (TextInput)bxmlSerializer.getNamespace().get("textinputIntRange");
        textinputDateRegex = (TextInput)bxmlSerializer.getNamespace().get("textinputDateRegex");
        textinputCustomBoolean = (TextInput)bxmlSerializer.getNamespace().get("textinputCustomBoolean");
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 = titleBarTablePane.getBounds();
View Full Code Here

        });

        Border border = new Border(boxPane);
        border.getStyles().put("color", 7);
        border.getStyles().put("padding", 5);
        window = new Window(border);
        window.setMaximized(true);
        window.open(display);
    }
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

        // when the transition is complete
        Vote vote = Vote.APPROVE;

        // Don't start the transition if the sheet is being closed as a result
        // of the owner closing
        Window owner = sheet.getOwner();
        if (!(owner.isClosing()
            || owner.isClosed())) {
            TransitionListener transitionListener = new TransitionListener() {
                @Override
                public void transitionCompleted(Transition transition) {
                    sheet.close(result);
                    openTransition = null;
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.