Package org.apache.pivot.wtkx

Examples of org.apache.pivot.wtkx.WTKXSerializer$AttributeInvocationHandler


        frame.getStyles().put("padding", 0);
        frame.setTitle("Component Pane Test");
        frame.setPreferredSize(800, 600);
        frame.setLocation(20, 20);

        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        sheet = (Sheet)wtkxSerializer.readObject(this, "card_pane_test.wtkx");
        cardPane = (CardPane)wtkxSerializer.get("cardPane");
        sizeGroup = (ButtonGroup)wtkxSerializer.get("sizeGroup");

        sizeGroup.getButtonGroupListeners().add(new ButtonGroupListener.Adapter() {
            @Override
            public void selectionChanged(ButtonGroup buttonGroup, Button previousSelection) {
                final Button selection = buttonGroup.getSelection();
View Full Code Here


    @WTKX private Calendar calendar = null;
    @WTKX private CalendarButton calendarButton = null;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();

        window = (Window)wtkxSerializer.readObject(this, "calendar_test.wtkx");
        wtkxSerializer.bind(this, CalendarTest.class);

        Filter<CalendarDate> disabledDateFilter = new Filter<CalendarDate>() {
            @Override
            public boolean include(CalendarDate date) {
                CalendarDate today = new CalendarDate();
View Full Code Here

        Prompt prompt = (Prompt)component;
        prompt.getPromptListeners().add(this);

        // Load the prompt content
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        Component content = null;

        try {
            content = (Component)wtkxSerializer.readObject(this, "terra_prompt_skin.wtkx");
        } catch(Exception exception) {
            throw new RuntimeException(exception);
        }

        prompt.setContent(content);

        // Set the type image
        TerraTheme theme = (TerraTheme)Theme.getTheme();

        ImageView typeImageView = (ImageView)wtkxSerializer.get("typeImageView");
        typeImageView.setImage(theme.getMessageIcon(prompt.getMessageType()));

        // Set the message
        Label messageLabel = (Label)wtkxSerializer.get("messageLabel");
        String message = prompt.getMessage();
        messageLabel.setText(message);

        // Set the body
        BoxPane messageBoxPane = (BoxPane)wtkxSerializer.get("messageBoxPane");
        Component body = prompt.getBody();
        if (body != null) {
            messageBoxPane.add(body);
        }

        // Add the option buttons
        BoxPane buttonBoxPane = (BoxPane)wtkxSerializer.get("buttonBoxPane");

        for (int i = 0, n = prompt.getOptionCount(); i < n; i++) {
            Object option = prompt.getOption(i);

            PushButton optionButton = new PushButton(option);
View Full Code Here

        new IMAccount("juser1234", "AIM"));

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = (Window)wtkxSerializer.readObject(this, "data_binding.wtkx");
        form = (Form)wtkxSerializer.get("form");
        loadJavaButton = (PushButton)wtkxSerializer.get("loadJavaButton");
        loadJSONButton = (PushButton)wtkxSerializer.get("loadJSONButton");
        clearButton = (PushButton)wtkxSerializer.get("clearButton");
        sourceLabel = (Label)wtkxSerializer.get("sourceLabel");

        loadJavaButton.getButtonPressListeners().add(new ButtonPressListener() {
            @Override
            public void buttonPressed(Button button) {
                form.load(CONTACT);
View Full Code Here

        Alert alert = (Alert)component;
        alert.getAlertListeners().add(this);

        // Load the alert content
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        Component content = null;

        try {
            content = (Component)wtkxSerializer.readObject(this, "terra_alert_skin.wtkx");
        } catch(Exception exception) {
            throw new RuntimeException(exception);
        }

        alert.setContent(content);

        // Set the type image
        TerraTheme theme = (TerraTheme)Theme.getTheme();

        ImageView typeImageView = (ImageView)wtkxSerializer.get("typeImageView");
        typeImageView.setImage(theme.getMessageIcon(alert.getMessageType()));

        // Set the message
        Label messageLabel = (Label)wtkxSerializer.get("messageLabel");
        String message = alert.getMessage();
        messageLabel.setText(message);

        // Set the body
        BoxPane messageBoxPane = (BoxPane)wtkxSerializer.get("messageBoxPane");
        Component body = alert.getBody();
        if (body != null) {
            messageBoxPane.add(body);
        }

        // Add the option buttons
        BoxPane buttonBoxPane = (BoxPane)wtkxSerializer.get("buttonBoxPane");

        for (int i = 0, n = alert.getOptionCount(); i < n; i++) {
            Object option = alert.getOption(i);

            PushButton optionButton = new PushButton(option);
View Full Code Here

    private Label statusLabel = null;

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = (Window)wtkxSerializer.readObject(this, "rss_feed_demo.wtkx");
        feedListView = (ListView)wtkxSerializer.get("feedListView");
        cardPane = (CardPane)wtkxSerializer.get("cardPane");
        statusLabel = (Label)wtkxSerializer.get("statusLabel");

        feedListView.getComponentMouseButtonListeners().add(new ComponentMouseButtonListener.Adapter() {
            private int index = -1;

            @Override
View Full Code Here

    private TableView tableView = null;

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = (Window)wtkxSerializer.readObject(this, "demo.wtkx");
        tableView = (TableView)wtkxSerializer.get("tableView");

        TableViewRowEditor tableViewRowEditor = new TableViewRowEditor();
        tableViewRowEditor.setEditEffect(CardPaneSkin.SelectionChangeEffect.HORIZONTAL_SLIDE);
        tableView.setRowEditor(tableViewRowEditor);
View Full Code Here

        border.getStyles().put("backgroundColor", 3);
        mainWindow = new Window(border);
        mainWindow.setMaximized(true);
        mainWindow.open(display);

        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        reflectionWindow = (Window)wtkxSerializer.readObject(this, "reflection.wtkx");
        wtkxSerializer.reset();

        translucentFrame = (Frame)wtkxSerializer.readObject(this, "translucent.wtkx");

        final FadeDecorator fadeDecorator = new FadeDecorator();
        translucentFrame.getDecorators().insert(fadeDecorator, 0);

        translucentFrame.getComponentMouseListeners().add(new ComponentMouseListener.Adapter() {
View Full Code Here

            throw new RuntimeException(exception);
        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
        }

        WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);
        try {
            content = (Component)wtkxSerializer.readObject(this, "terra_file_browser_skin.wtkx");
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
        }

        fileBrowser.add(content);

        wtkxSerializer.bind(this, TerraFileBrowserSkin.class);

        driveListButton.getListButtonSelectionListeners().add(new ListButtonSelectionListener() {
            @Override
            public void selectedIndexChanged(ListButton listButton, int previousSelectedIndex) {
                if (previousSelectedIndex != -1) {
View Full Code Here

public class BindableTest implements Application {
    private BindableWindow window = null;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = (BindableWindow)wtkxSerializer.readObject(this, "bindable_test.wtkx");
        window.open(display);
    }
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtkx.WTKXSerializer$AttributeInvocationHandler

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.