Package com.jgoodies.binding.value

Examples of com.jgoodies.binding.value.ValueHolder


     * Tests dynamic changes to the bean parameter holding the list of extensions.
     */
    public void testDynamicChange()
    {
        URL url = url("test.avi?test=parameter");
        ValueHolder extensions = new ValueHolder(null);
        DynamicExtensionURLFilter f = new DynamicExtensionURLFilter(extensions, "value");

        // We start with empty list of extensions
        assertFalse("No extensions in the filter", f.matches(url));

        // We set some extensions, but it should be still false
        extensions.setValue("mpg");
        assertFalse("Wrong extensions in the filter", f.matches(url));

        // We add right extension
        extensions.setValue("mpg, aVi");
        assertTrue("Right extensions in the filter", f.matches(url));

        // We remove that right extension
        extensions.setValue(" mov ");
        assertFalse("Wrong extensions in the filter", f.matches(url));

        // We clear the filter extensions
        extensions.setValue(null);
        assertFalse("No extensions in the filter", f.matches(url));
    }
View Full Code Here


     *
     * @return installation settings or <code>null</code> if user cancelled.
     */
    private InstallationSettings getInstallationSettings()
    {
        final ValueHolder settingsHolder = new ValueHolder();

        UifUtilities.invokeAndWait(new Runnable()
        {
            public void run()
            {
                InstallationWizard wizard = new InstallationWizard();
                InstallationSettings settings = wizard.openDialog();
                settingsHolder.setValue(settings);
            }
        }, "Failed to get installation settings.", Level.SEVERE);

        return (InstallationSettings)settingsHolder.getValue();
    }
View Full Code Here

    private JTextField routeGroupName;
    private JSpinner routeNumberOffset;
    private JSpinner routeNumberAmount;

    public RouteGroupConfigPanel() {
        presentationModel = new PresentationModel<RouteGroup>(new ValueHolder(
                null, true));
        buildPanel();
    }
View Full Code Here

    private JSpinner turnoutNumberOffset;
    private JSpinner turnoutNumberAmount;

    public TurnoutGroupConfigPanel() {
        presentationModel = new PresentationModel<TurnoutGroup>(
                new ValueHolder(null, true));
        buildPanel();
        setTurnoutGroup(null);
    }
View Full Code Here

            this.pinned = pinned;
            this.unread = unread;
            this.all = all;

            postMode = new ValueHolder(Post.ALL);
        }
View Full Code Here

        PropertyChangeListener articleViewChangeHandler = new ArticleViewChangeHandler();
        GlobalModel.SINGLETON.getGlobalRenderingSettings().addPropertyChangeListener(
            "articleViewMode", articleViewChangeHandler);

        // Set the sub-toolbar (right justified in the CoolInternalFrame)
        pageModel = new ValueHolder(0);
        pageModel.addValueChangeListener(new PageModelListener());
        ValueModel pageCountModel = new ValueHolder(0);
        subToolBar = createSubtoolbar();
        setHeaderControl(subToolBar);

        // Create the list that will contain the channels. Uses a custom
        // renderer.
View Full Code Here

    /**
     * Creates model w/o highlights advisor.
     */
    public FeedDisplayModel()
    {
        this(new ValueHolder(0));
    }
View Full Code Here

        if (guide == null || guide instanceof StandardGuide)
        {
            if (url == null || forceQuery)
            {
                ValueHolder urlHolder = new ValueHolder(url);

                AddDirectFeedDialog dialog = new AddDirectFeedDialog(getMainFrame(), urlHolder);
                dialog.open();

                url = dialog.hasBeenCanceled() ? null : (String)urlHolder.getValue();
            }

            Set<String> urls = parseMultiURL(url);
            DirectFeed[] feeds = createDirectFeeds(urls, (StandardGuide)guide);
View Full Code Here

     *
     * @return dialog.
     */
    private InvalidDiscoveryDialog createDialog()
    {
        final ValueHolder vh = new ValueHolder();
        Runnable task = new Runnable()
        {
            public void run()
            {
                InvalidDiscoveryDialog dialog = new InvalidDiscoveryDialog(getMainFrame());
                synchronized (vh)
                {
                    vh.setValue(dialog);
                }
            }
        };

        UifUtilities.invokeAndWait(task, "Failed to create invalid discovery dialog.", Level.SEVERE);

        return (InvalidDiscoveryDialog)vh.getValue();
    }
View Full Code Here

        tfPublishingTags = new JTextField();
        lbPublishingTags.setLabelFor(tfPublishingTags);

        chMobile = ComponentsFactory.createCheckBox(Strings.message("guide.dialog.mobile"));

        vhPublishingRating = new ValueHolder(1);
        sscPublishingRating = new StarsSelectionComponent(new BoundedRangeAdapter(vhPublishingRating, 0, 1, 5));
        lbPublishingRating = new JLabel(Strings.message("guide.dialog.rating"));

        btnCopyToClipboard = new JButton(Strings.message("guide.dialog.copy"));
        btnCopyToClipboard.addActionListener(new ActionListener()
View Full Code Here

TOP

Related Classes of com.jgoodies.binding.value.ValueHolder

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.