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, "suggestion_popup_test.wtkx");
        wtkxSerializer.bind(this);

        textInput.getTextInputCharacterListeners().add(new TextInputCharacterListener() {
            @Override
            public void charactersInserted(TextInput textInput, int index, int count) {
                ArrayList<String> suggestions = new ArrayList<String>("One", "Two", "Three", "Four", "Five");
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

    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        window = (Window)wtkxSerializer.readObject(getClass().getResource("file_browser_test.wtkx"));

        wtkxSerializer.bind(this, FileBrowserTest.class);

        final Comparator<File> filePathComparator = new Comparator<File>() {
            @Override
            public int compare(File file1, File file2) {
                String path1 = file1.getPath();
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, "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

        frame1.setPreferredSize(320, 240);
        frame1.open(display);

        WTKXSerializer wtkxSerializer = new WTKXSerializer();
        frame2 = (Frame)wtkxSerializer.readObject(this, "menu_bar_test.wtkx");
        wtkxSerializer.bind(this, MenuBarTest.class);

        MenuHandler menuHandler = new MenuHandler.Adapter() {
            @Override
            public void configureMenuBar(Component component, MenuBar menuBar) {
                System.out.println("Configure menu bar: " + component);
View Full Code Here

                + "\": " + exception.getMessage());
        }

        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

            throw new RuntimeException(exception);
        }

        fileBrowser.add(content);

        wtkxSerializer.bind(this, TerraFileBrowserSkin.class);

        pathListButton.getListButtonSelectionListeners().add(new ListButtonSelectionListener() {
            @Override
            public void selectedIndexChanged(ListButton listButton, int previousSelectedIndex) {
                File ancestorDirectory = (File)listButton.getSelectedItem();
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.