Package org.apache.pivot.wtkx

Examples of org.apache.pivot.wtkx.WTKXSerializer.bind()


    @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


            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

        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        wtkxSerializer.put(APPLICATION_KEY, this);

        window = (Window)wtkxSerializer.readObject(this, "json_viewer.wtkx");
        wtkxSerializer.bind(this);

        Label prompt = new Label("Drag or paste JSON here");
        prompt.getStyles().put("horizontalAlignment", HorizontalAlignment.CENTER);
        prompt.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
        promptDecorator.setOverlay(prompt);
View Full Code Here

        // Load and bind to the WTKX source
        Resources resources = new Resources(getClass().getName(), "UTF-8");
        WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);
        window = (Window)wtkxSerializer.readObject(this, "stocktracker.wtkx");
        wtkxSerializer.bind(this, StockTracker.class);

        // Wire up event handlers
        stocksTableView.getTableViewRowListeners().add(new TableViewRowListener.Adapter() {
            @Override
            public void rowsSorted(TableView tableView) {
View Full Code Here

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

        buttonsRollup = (Rollup)wtkxSerializer.get("buttonsRollup");
        buttonsRollup.getRollupStateListeners().add(new ButtonsRollupStateHandler());

        listsRollup = (Rollup)wtkxSerializer.get("listsRollup");
View Full Code Here

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

        window = (Window)wtkxSerializer.readObject(getClass().getResource("file_browsing.wtkx"));
        wtkxSerializer.bind(this, FileBrowsing.class);

        openSheetButton.getButtonPressListeners().add(new ButtonPressListener() {
            @Override
            public void buttonPressed(Button button) {
                Button selection = fileBrowserSheetModeGroup.getSelection();
View Full Code Here

            throw new RuntimeException(exception);
        }

        fileBrowserSheet.setContent(content);

        wtkxSerializer.bind(this, TerraFileBrowserSheetSkin.class);

        saveAsTextInput.getTextInputTextListeners().add(new TextInputTextListener() {
            @Override
            public void textChanged(TextInput textInput) {
                updateOKButtonState();
View Full Code Here

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

        buttonsRollup = (Rollup)wtkxSerializer.get("buttonsRollup");
        buttonsRollup.getRollupStateListeners().add(new ButtonsRollupStateHandler());

        listsRollup = (Rollup)wtkxSerializer.get("listsRollup");
View Full Code Here

            throw new RuntimeException(exception);
        }

        fileBrowserSheet.setContent(content);

        wtkxSerializer.bind(this, TerraFileBrowserSheetSkin.class);

        saveAsTextInput.getTextInputTextListeners().add(new TextInputTextListener() {
            @Override
            public void textChanged(TextInput textInput) {
                updateOKButtonState();
View Full Code Here

    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = (Window)wtkxSerializer.readObject(this, "file_drop_target_demo.wtkx");
        wtkxSerializer.bind(this, FileDropTargetDemo.class);

        fileList = new FileList();
        fileTableView.setTableData(fileList);

        fileList.getListListeners().add(new ListListener.Adapter<File>() {
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.