Package org.apache.pivot.beans

Examples of org.apache.pivot.beans.BXMLSerializer$AttributeInvocationHandler


            @Override
            public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
                try {
                    if (count == 2) {
                        TrackData trackData = (TrackData) tracksTableView.getSelectedRow();
                        BXMLSerializer wtkxSerializer = new BXMLSerializer();
                        EditTrackWindow window = (EditTrackWindow) wtkxSerializer.readObject(getClass().getResource("EditTrackWindow.bxml"),new Resources(resources, EditTrackWindow.class.getName()));
                        window.open(getDisplay(), getWindow(), trackData.track);
                        return true;
                    }
                } catch (IOException e) {
                    throw new RuntimeException(e);
View Full Code Here


            @Override
            public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
                try {
                    if (count == 2) {
                        Release release = (Release) releaseResultsTableView.getSelectedRow();
                        BXMLSerializer wtkxSerializer = new BXMLSerializer();
                        EditReleaseWindow window = (EditReleaseWindow) wtkxSerializer.readObject(getClass().getResource("EditReleaseWindow.bxml"),new Resources(resources,EditReleaseWindow.class.getName()));
                        window.open(getDisplay(), getWindow(), release);
                        return true;
                    }
                } catch (IOException e) {
                    throw new RuntimeException(e);
View Full Code Here

        crudSearchButton.getButtonPressListeners().add(new ButtonPressListener() {
             @Override
             public void buttonPressed(Button button) {
                 try {
                     BXMLSerializer wtkxSerializer = new BXMLSerializer();
                     SMDCRUDSearchWindow window = (SMDCRUDSearchWindow) wtkxSerializer.readObject(getClass().getResource("SMDCRUDSearchWindow.bxml"),new Resources(resources,SMDCRUDSearchWindow.class.getName()));
                     window.open(getDisplay(), getWindow());
                 } catch (IOException e) {
                     throw new RuntimeException(e);
                 } catch (SerializationException e) {
                     throw new RuntimeException(e);
                 }
             }
         });

        listViewButton.getButtonPressListeners().add(new ButtonPressListener() {
             @Override
             public void buttonPressed(Button button) {
                 try {
                     BXMLSerializer wtkxSerializer = new BXMLSerializer();
                     SMDListViewWindow window = (SMDListViewWindow) wtkxSerializer.readObject(getClass().getResource("SMDListViewWindow.bxml"),new Resources(resources,SMDListViewWindow.class.getName()));
                     window.open(getDisplay(), getWindow());
                 } catch (IOException e) {
                     throw new RuntimeException(e);
                 } catch (SerializationException e) {
                     throw new RuntimeException(e);
                 }
             }
         });

        preferencesButton.getButtonPressListeners().add(new ButtonPressListener() {
             @Override
             public void buttonPressed(Button button) {
                 try {
                     BXMLSerializer wtkxSerializer = new BXMLSerializer();
                     SMDPreferencesWindow window = (SMDPreferencesWindow) wtkxSerializer.readObject(getClass().getResource("SMDPreferencesWindow.bxml"),new Resources(resources,SMDPreferencesWindow.class.getName()));
                     window.open(getDisplay(), getWindow());
                 } catch (IOException e) {
                     throw new RuntimeException(e);
                 } catch (SerializationException e) {
                     throw new RuntimeException(e);
View Full Code Here

        if (language != null) {
            Locale.setDefault(new Locale(language));
        }
        PropertiesModule.init(properties);
        Resources resources = new Resources(SMDApplicationWindow.class.getName());
        BXMLSerializer wtkxSerializer = new BXMLSerializer();
        window = (SMDApplicationWindow) wtkxSerializer.readObject(getClass().getResource("SMDApplicationWindow.bxml"), resources);
        window.open(display);
    }
View Full Code Here

    public void install(Component component) {
        super.install(component);

        final FileBrowser fileBrowser = (FileBrowser)component;

        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        try {
            content = (Component)bxmlSerializer.readObject(TerraFileBrowserSkin.class,
                "terra_file_browser_skin.bxml", true);
        } catch (IOException exception) {
            throw new RuntimeException(exception);
        } catch (SerializationException exception) {
            throw new RuntimeException(exception);
        }

        fileBrowser.add(content);

        bxmlSerializer.bind(this, TerraFileBrowserSkin.class);

        driveListButton.getListButtonSelectionListeners().add(new ListButtonSelectionListener.Adapter() {
            @Override
            public void selectedItemChanged(ListButton listButton, Object previousSelectedItem) {
                if (previousSelectedItem != null) {
View Full Code Here

    implements Application.UnprocessedKeyHandler {
    private Window window = null;

    @Override
    public void startup(Display display, Map<String, String> properties) throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window)bxmlSerializer.readObject(ApplicationHandlerTest.class,
            "application_handler_test.bxml");
        window.open(display);
    }
View Full Code Here

        alert.setMinimumWidth(160);

        alert.getAlertListeners().add(this);

        // Load the alert content
        BXMLSerializer bxmlSerializer = new BXMLSerializer();

        Component content;
        try {
            content = (Component)bxmlSerializer.readObject(TerraAlertSkin.class,
                "terra_alert_skin.bxml");
        } catch(Exception exception) {
            throw new RuntimeException(exception);
        }

        alert.setContent(content);

        typeImageView = (ImageView)bxmlSerializer.getNamespace().get("typeImageView");
        messageLabel = (Label)bxmlSerializer.getNamespace().get("messageLabel");
        messageBoxPane = (BoxPane)bxmlSerializer.getNamespace().get("messageBoxPane");
        optionButtonBoxPane = (BoxPane)bxmlSerializer.getNamespace().get("optionButtonBoxPane");

        for (Object option : alert.getOptions()) {
            PushButton optionButton = new PushButton(option);
            optionButton.setStyleName(TerraAlertSkin.class.getPackage().getName()
                + "." + TerraTheme.COMMAND_BUTTON_STYLE);
View Full Code Here

        prompt.setMinimumWidth(160);

        prompt.getPromptListeners().add(this);

        // Load the prompt content
        BXMLSerializer bxmlSerializer = new BXMLSerializer();

        Component content;
        try {
            content = (Component)bxmlSerializer.readObject(TerraPromptSkin.class,
                "terra_prompt_skin.bxml");
        } catch(Exception exception) {
            throw new RuntimeException(exception);
        }

        prompt.setContent(content);

        typeImageView = (ImageView)bxmlSerializer.getNamespace().get("typeImageView");
        messageLabel = (Label)bxmlSerializer.getNamespace().get("messageLabel");
        messageBoxPane = (BoxPane)bxmlSerializer.getNamespace().get("messageBoxPane");
        optionButtonBoxPane = (BoxPane)bxmlSerializer.getNamespace().get("optionButtonBoxPane");

        for (Object option : prompt.getOptions()) {
            PushButton optionButton = new PushButton(option);
            optionButton.setStyleName(TerraPromptSkin.class.getPackage().getName()
                + "." + TerraTheme.COMMAND_BUTTON_STYLE);
View Full Code Here

    public void startup(Display display, Map<String, String> properties) throws Exception {
        String language = properties.get(LANGUAGE_KEY);
        Locale locale = (language == null) ? Locale.getDefault() : new Locale(language);
        Resources resources = new Resources(StockTrackerWindow.class.getName(), locale);

        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (StockTrackerWindow)bxmlSerializer.readObject(getClass().getResource("stock_tracker_window.bxml"),
            resources);
        window.open(display);
    }
View Full Code Here

        prompt.setMinimumWidth(160);

        prompt.getPromptListeners().add(this);

        // Load the prompt content
        BXMLSerializer bxmlSerializer = new BXMLSerializer();

        Component content;
        try {
            content = (Component)bxmlSerializer.readObject(TerraPromptSkin.class,
                "terra_prompt_skin.bxml");
        } catch(Exception exception) {
            throw new RuntimeException(exception);
        }

        prompt.setContent(content);

        typeImageView = (ImageView)bxmlSerializer.getNamespace().get("typeImageView");
        messageLabel = (Label)bxmlSerializer.getNamespace().get("messageLabel");
        messageBoxPane = (BoxPane)bxmlSerializer.getNamespace().get("messageBoxPane");
        optionButtonBoxPane = (BoxPane)bxmlSerializer.getNamespace().get("optionButtonBoxPane");

        for (Object option : prompt.getOptions()) {
            PushButton optionButton = new PushButton(option);
            optionButton.setStyleName(TerraPromptSkin.class.getPackage().getName()
                + "." + TerraTheme.COMMAND_BUTTON_STYLE);
View Full Code Here

TOP

Related Classes of org.apache.pivot.beans.BXMLSerializer$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.