Package org.apache.pivot.wtkx

Examples of org.apache.pivot.wtkx.WTKXSerializer


    private Window window = null;

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


    private Frame frame = null;

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        frame = new Frame((Component)wtkxSerializer.readObject(getClass().getResource("form_test.wtkx")));
        frame.setTitle("Form Test");
        frame.setPreferredSize(480, 360);
        frame.open(display);
    }
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(new Resources(BindableWindow.class.getName()));
        window = (BindableWindow)wtkxSerializer.readObject(this, "bindable_test.wtkx");
        window.open(display);
    }
View Full Code Here

    private Window window = null;

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

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

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = new Window((Component)wtkxSerializer.readObject(getClass().getResource("baseline_test.wtkx")));
        window.setTitle("Baseline Test");
        window.setMaximized(true);
        window.open(display);
    }
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, "table_view_test2.wtkx");
        tableView = (TableView)wtkxSerializer.get("tableView");

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

    private ListButton listButton = null;

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        BoxPane boxPane = (BoxPane) wtkxSerializer.readObject(this, "color_list_button_test.wtkx");
        listButton = (ListButton)wtkxSerializer.get("listButton");
        // test the getListPopup() method
        listButton.getListPopup().getDecorators().add(new ReflectionDecorator());

        frame = new Frame(boxPane);
        frame.setTitle("Color List Button Test");
View Full Code Here

    private TextInput textinputDateRegex = null;
    private TextInput textinputCustomBoolean = null;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = new Window((Component)wtkxSerializer.readObject(
            getClass().getResource("textInputValidator_test.wtkx")));
        textinputFloatRange = (TextInput)wtkxSerializer.get("textinputFloatRange");
        textinputIntRange = (TextInput)wtkxSerializer.get("textinputIntRange");
        textinputDateRegex = (TextInput)wtkxSerializer.get("textinputDateRegex");
        textinputCustomBoolean = (TextInput)wtkxSerializer.get("textinputCustomBoolean");

        // standard float range model
        textinputFloatRange.setText("0.5");
        textinputFloatRange.setValidator(new FloatRangeValidator(0.3f, 2000f));

        // test the listener by updating a label
        textinputFloatRange.getTextInputListeners().add(new TextInputListener.Adapter() {
            @Override
            public void textValidChanged(TextInput textInput) {
                invalidLabel.setText(textInput.isTextValid() ? "valid" : "invalid");
            }
        });

        invalidLabel = (Label)wtkxSerializer.get("invalidLabel");

        // standard int range model
        textinputIntRange.setText("0");
        textinputIntRange.setValidator(new IntRangeValidator(0, 100));
View Full Code Here

    private Frame frame = null;

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

    public static int TRANSITION_RATE = 30;

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = (Window)wtkxSerializer.readObject(this, "transitions.wtkx");
        button1 = (PushButton)wtkxSerializer.get("button1");
        button2 = (PushButton)wtkxSerializer.get("button2");
        button3 = (PushButton)wtkxSerializer.get("button3");
        button4 = (PushButton)wtkxSerializer.get("button4");

        ButtonPressListener buttonPressListener = new ButtonPressListener() {
            @Override
            public void buttonPressed(final Button button) {
                if (collapseTransition == null) {
View Full Code Here

TOP

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

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.