Package com.jgoodies.binding.beans

Examples of com.jgoodies.binding.beans.PropertyAdapter


     * @return combo-box.
     */
    private JComboBox createColorComboBox(String property, ValueModel trigger)
    {
        JComboBox box = new JComboBox(new ColorAdapter(new BufferedValueModel(
                        new PropertyAdapter(config, property), trigger)));
        box.setRenderer(colorListCellRenderer);
        return box;
    }
View Full Code Here


        {
            super(Dialog.this, Strings.message("whatshot.dialog.title") + " - " + Strings.message("whatshot.setup"));

            taIgnorePatterns = new JTextArea();
            taIgnorePatterns.setLineWrap(false);
            taIgnorePatterns.setDocument(new DocumentAdapter(new BufferedValueModel(new PropertyAdapter(
                prefs, UserPreferences.PROP_WH_IGNORE), getTriggerChannel())));

            chDontCountSelfLinks = ComponentsFactory.createCheckBox(
                Strings.message("whatshot.setup.no.self.links"),
                prefs, UserPreferences.PROP_WH_NOSELFLINKS, getTriggerChannel());
            chSuppressSameSource = ComponentsFactory.createCheckBox(
                Strings.message("whatshot.setup.no.same.source"),
                prefs, UserPreferences.PROP_WH_SUPPRESS_SAME_SOURCE_LINKS, getTriggerChannel());

            // Guide selector
            final Map<String, FGuide> guidesMap = new HashMap<String, FGuide>();
            Vector<FGuide> guides = new Vector<FGuide>();
            FGuide allGuides = new FGuide("", Strings.message("whatshot.setup.all.guides"));
            guides.add(allGuides);
            guidesMap.put(allGuides.key, allGuides);
            int cnt = guidesSet.getGuidesCount();
            for (int i = 0; i < cnt; i++)
            {
                String t = guidesSet.getGuideAt(i).getTitle();
                FGuide fg = new FGuide(t);

                guides.add(fg);
                guidesMap.put(fg.key, fg);
            }

            ValueModel mdlGuides = new AbstractConverter(
                new PropertyAdapter(prefs, UserPreferences.PROP_WH_TARGET_GUIDE))
            {
                public Object convertFromSubject(Object o)
                {
                    return guidesMap.get(o);
                }
View Full Code Here

            Strings.message("userprefs.tab.twitter.wording"));

        JCheckBox chEnabled = ComponentsFactory.createCheckBox(
            Strings.message("userprefs.tab.twitter.enable"),
            new ToggleButtonAdapter(new BufferedValueModel(
                new PropertyAdapter(prefs, TwitterPreferences.PROP_ENABLED),
                trigger)));

        JCheckBox chProfilePics = ComponentsFactory.createCheckBox(
            Strings.message("userprefs.tab.twitter.profile.pics"),
            new ToggleButtonAdapter(new BufferedValueModel(
                new PropertyAdapter(prefs, TwitterPreferences.PROP_PROFILE_PICS),
                trigger)));

        JCheckBox chPasteLink = ComponentsFactory.createCheckBox(
            Strings.message("userprefs.tab.twitter.paste.link"),
            new ToggleButtonAdapter(new BufferedValueModel(
                new PropertyAdapter(prefs, TwitterPreferences.PROP_PASTE_LINK),
                trigger)));

        JLabel lbScreenName = new JLabel(Strings.message("userprefs.tab.twitter.screenname"));
        JLabel lbPassword   = new JLabel(Strings.message("userprefs.tab.twitter.password"));
View Full Code Here

        RenderingManager.addPropertyChangeListener(htmlConfig.getRenderingManagerListener());
        RenderingManager.addPropertyChangeListener(imageConfig.getRenderingManagerListener());

        // Get page size user preferences and subscribe to updates
        UserPreferences preferences = GlobalModel.SINGLETON.getUserPreferences();
        PropertyAdapter paPageSize = new PropertyAdapter(preferences, UserPreferences.PROP_PAGE_SIZE, true);
        paPageSize.addPropertyChangeListener(new PageSizeListener());

        feedDisplay = new CompositeFeedDisplay(htmlConfig, imageConfig, pageModel, pageCountModel);
        feedDisplay.setPageSize(preferences.getPageSize());

        // Setup data-adapter
View Full Code Here

        res.setMinimum(0);
        res.setPaintTicks(true);
        res.setMajorTickSpacing(1);
        res.setSnapToTicks(true);

        res.setModel(new BoundedRangeAdapter(new BufferedValueModel(new PropertyAdapter(
            preferences, propertyName), triggerChannel), 0, 0, 4));

        return res;
    }
View Full Code Here

     */
    public CriteriaBuilder(Collection aAvailableProperties, ICriteria aCriteria)
    {
        availableProperties = aAvailableProperties;

        PropertyAdapter model = new PropertyAdapter(aCriteria, ICriteria.PROP_VALUE, true);
        valueEditor = new CompositePropertyVE(model);

        initGUI();

        setCriteria(aCriteria);
View Full Code Here

        cbCategories = new JComboBox();
        categories = new ArrayListModel();
        category = targetBlog.getDefaultCategory();

        initCategories(targetBlog, targetBlog.getDefaultCategory());
        PropertyAdapter adapter = new PropertyAdapter(this, "category", true);
        cbCategories = new JComboBox(new ComboBoxAdapter((ListModel)categories, adapter));
        setDraft(targetBlog.isDraft());

        updateTitle(new TargetBlog[] { targetBlog });
    }
View Full Code Here

            categoryProperties[i] = new SyntheticCategoryProperty(i);

            TargetBlog blog = targetBlogs[i];
            initCategories(blog, i, new TargetBlog.Category[] { blog.getDefaultCategory() });

            PropertyAdapter adapter = new PropertyAdapter(categoryProperties[i], SyntheticCategoryProperty.PROP, true);
            pcCategories[i] = new CategoriesLabel(categories[i], adapter);

            chTargetBlog[i] = new JCheckBox(blog.getTitle());

            if (selBlogs.contains(blog))
View Full Code Here

public class TestCompositePropertyVEScenarios extends TestCase
{
    public void testIntializing()
    {
        ICriteria criteria = new Query().addCriteria();
        PropertyAdapter model = new PropertyAdapter(criteria, ICriteria.PROP_VALUE, true);
        CompositePropertyVE compositeEditor = new CompositePropertyVE(model);

        // When type of the property becomes obvious we are setting type to editor
        compositeEditor.setType(PropertyType.STATUS);
    }
View Full Code Here

     */
    private JComponent createSubtoolbar()
    {
        UserPreferences uPrefs = GlobalModel.SINGLETON.getUserPreferences();
        String propName = UserPreferences.PROP_GOOD_CHANNEL_STARZ;
        PropertyAdapter propertyAdapter = new PropertyAdapter(uPrefs, propName, true);
        BoundedRangeAdapter model = new BoundedRangeAdapter(propertyAdapter, 0, 1, 5);

        StarsSelectionComponent starsSelector = new StarsSelectionComponent(model);
        starsSelector.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

View Full Code Here

TOP

Related Classes of com.jgoodies.binding.beans.PropertyAdapter

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.