Package org.apache.pivot.beans

Examples of org.apache.pivot.beans.BXMLSerializer.readObject()


            serializer = new BXMLSerializer();
        }

        // return (Window)bxmlSerializer.readObject(JavascriptConsoleTest.class, fileName); // ok
        // better, to allow usage of resources (without having to call setLocation or setResources in the serializer) ...
        return (Window)serializer.readObject(JavascriptConsoleTest.class, fileName, true);
    }

    /**
     * Load (and returns) a Window, given its URL and serializer to use
     * <p>
 
View Full Code Here


public class Pivot835 extends Application.Adapter
{
    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        Window window = (Window) bxmlSerializer.readObject(getClass().getResource("pivot_835.bxml"));
        window.open(display);
    }

    @Override
    public boolean shutdown(boolean b) throws Exception {
View Full Code Here

            URL url = new URL(urlString);

            // force the location, so it will be possible to decode resources like labels ...
            serializer.setLocation(url);

            loadedWindow = (Window)serializer.readObject(url);
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (SerializationException e) {
View Full Code Here

    }

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        this.window = (Window)bxmlSerializer.readObject(KitchenSink.class, "kitchen_sink.bxml");
        bxmlSerializer.bind(this, KitchenSink.class);

        this.infoRollup = (Rollup)bxmlSerializer.getNamespace().get("infoRollup");
        this.infoRollup.getRollupStateListeners().add(new InfoRollupStateHandler());
View Full Code Here

        String forceFocusParameter = properties.get(FORCE_FOCUS_KEY);
        boolean forceFocus = false;
        forceFocus = Boolean.parseBoolean(forceFocusParameter);

        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window)bxmlSerializer.readObject(this.getClass(), "pivot_686.bxml");
        initializeFields(bxmlSerializer);
        window.open(display);

        if (forceFocus == true) {
            System.out.println("force focus on textInput now");
View Full Code Here

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window)bxmlSerializer.readObject(NamespaceTest.class, "namespace_test.bxml");
        System.out.println(JSON.get(bxmlSerializer.getNamespace(), "content.text"));
        System.out.println(JSON.get(bxmlSerializer.getNamespace(), "content['text']"));
        window.open(display);
    }
View Full Code Here

    private Window window = null;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window) bxmlSerializer.readObject(Pivot734.class, "pivot_738.bxml");
        window.setMaximized(true);
        window.setWidth(400);
        window.setHeight(250);
        window.open(display);
    }
View Full Code Here

                int columnIndex = tablePane.getColumnAt(contextMenuHandler.getX());
                Component component = tablePane.getCellComponent(rowIndex, columnIndex);
                bxmlSerializer.getNamespace().put("component", component);

                try {
                    sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
                        "table_panes_configure_cell.bxml");
                } catch (SerializationException exception) {
                    throw new RuntimeException(exception);
                } catch (IOException exception) {
                    throw new RuntimeException(exception);
View Full Code Here

                int rowIndex = tablePane.getRowAt(contextMenuHandler.getY());
                TablePane.Row row = tablePane.getRows().get(rowIndex);
                bxmlSerializer.getNamespace().put("row", row);

                try {
                    sheet = (Sheet)bxmlSerializer.readObject(TablePanes.class,
                        "table_panes_configure_row.bxml");
                } catch (SerializationException exception) {
                    throw new RuntimeException(exception);
                } catch (IOException exception) {
                    throw new RuntimeException(exception);
View Full Code Here

        // Formatter formatter = new Formatter(sb, locale);
        // String customDecimalFormat = "%,.3f";
        //

        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = new Window((Component)bxmlSerializer.readObject(
            getClass().getResource("text_input_validator_test.bxml")));

        textinputLocale = (TextInput)bxmlSerializer.getNamespace().get("textinputLocale");

        textinputComparableBigDecimal = (TextInput)bxmlSerializer.getNamespace().get("textinputComparableBigDecimal");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.