pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Kononenko <deniskonone...@yahoo.com>
Subject Layout managers
Date Mon, 14 Sep 2009 11:18:24 GMT
Hi,

i create example application

mainframe.java
--------------
package ru.kononenko.pivot1;

import java.io.IOException;

import org.apache.pivot.collections.Dictionary;
import org.apache.pivot.collections.Map;
import org.apache.pivot.serialization.SerializationException;
import org.apache.pivot.wtk.Application;
import org.apache.pivot.wtk.DesktopApplicationContext;
import org.apache.pivot.wtk.Display;
import org.apache.pivot.wtk.Window;
import org.apache.pivot.wtkx.WTKXSerializer;

public class MainFrame implements Application {
    private Window wnd = null;
    
    @Override
    public void startup(Display display, Map<String, String> map) throws IOException,
                                                        SerializationException {
        WTKXSerializer serializer = new WTKXSerializer();
        wnd = (Window)serializer.readObject(this, "gui.wtkx");
        wnd.open(display);
    }

    @Override
    public boolean shutdown(boolean b) {
        if (wnd != null) {
            wnd.close();
        }        
        return false;
    }

    @Override
    public void suspend() {
    }

    @Override
    public void resume() {
    }
    
    public static void main(String[] args) {
        DesktopApplicationContext.main(MainFrame.class, args);
    }
}

gui.wtkx
--------
<?xml version="1.0" encoding="UTF-8"?>

<Window title="Menus" maximized="true" xmlns:wtkx="http://pivot.apache.org/wtkx"
        xmlns:content="org.apache.pivot.wtk.content" xmlns="org.apache.pivot.wtk">

    <content>
        <BoxPane orientation="vertical" styles="{verticalAlignment:'center', backgroundColor:
'#FFFF00'}">
            <PushButton buttonData="Press me"/>
        </BoxPane>
    </content>
</Window>



How maximize button on full window.
how to stretch the button vertically?

TablePane: how to stretch the row 100% with table


Thanks.



      


Mime
View raw message