Examples of BeanAdapter


Examples of com.jgoodies.binding.beans.BeanAdapter

            Set<Head> headings = orderLineAttributes.keySet();
            Set<OrderLineAttribute> attributes;
            components = new LinkedHashMap<Head, Map<String, JComponent>>();
            Map<String, JComponent> comps;

            BeanAdapter beanAdapterAtt;
            for (Head head : headings) {
                attributes = orderLineAttributes.get(head);
                allAttributes.addAll(attributes);
                JComponent component;
                if (attributes != null && attributes.size() != 0) {
                    comps = new LinkedHashMap<String, JComponent>();

                    if (!head.getNameString().equalsIgnoreCase("Garasjetype")) {
                        beanAdapterAtt = new BeanAdapter(new IArticleAttributeModel(attributes.iterator()
                                .next()));

                        component = BasicComponentFactory.createFormattedTextField(beanAdapterAtt
                                .getValueModel(IArticleAttributeModel.PROPERTY_NUMBER_OF_ITEMS_LONG),
                                decimalFormat);
                        component.setName("TextFieldAntall");
                        comps.put("Antall", component);
                    }

                    AttributeChangeListener attributeChangeListener = new AttributeChangeListener();
                    for (IArticleAttribute att : attributes) {
                        beanAdapterAtt = new BeanAdapter(new IArticleAttributeModel(att));
                        beanAdapterAtt.addBeanPropertyChangeListener(attributeChangeListener);

                        if (att.isYesNo()) {
                            component = BasicComponentFactory.createCheckBox(beanAdapterAtt
                                    .getValueModel(IArticleAttributeModel.PROPERTY_ATTRIBUTE_VALUE_BOOL), "");
                            component.setName("CheckBox" + att.getAttributeName());
                            comps.put(att.getAttributeName(), component);
                        } else if (att.getChoices() != null && att.getChoices().size() != 0) {
                            component = new JComboBox(new ComboBoxAdapter(att.getChoices(), beanAdapterAtt
                                    .getValueModel(IArticleAttributeModel.PROPERTY_ATTRIBUTE_VALUE)));
                            component.setName("ComboBox" + att.getAttributeName());
                            comps.put(att.getAttributeName(), component);
                        } else {
                            component = createTextField(att, beanAdapterAtt);
View Full Code Here

Examples of com.jgoodies.binding.beans.BeanAdapter

      textFieldRed.setHorizontalAlignment(JTextField.CENTER);
      textFieldRed.setBackground(ColorEnum.RED.getColor());
        panelAssembliesMain = new JPanel(new BorderLayout());
        panelTeamsMain = new JPanel(new BorderLayout());
        yearWeek = new YearWeek();
        BeanAdapter yearWeekAdapter = new BeanAdapter(yearWeek, true);
        yearChooser = new JYearChooser();
        yearWeekAdapter.addPropertyChangeListener(viewHandler
                .getWeekChangeListener(yearWeek, window));
       
        orderPanelView=viewHandler.getOrderPanelView().buildPanel(window, "150",viewHandler.getRightClickListener(), "130", true);

        SelectionInList weekSelectionList = viewHandler
View Full Code Here

Examples of com.jgoodies.binding.beans.BeanAdapter

   */
  public JComboBox getComboBoxWeeks(WindowInterface window) {
    JComboBox comboBoxWeeks = BasicComponentFactory
        .createComboBox(weekSelectionList);
    comboBoxWeeks.setSelectedItem(Util.getCurrentWeek());
    BeanAdapter routeDateAdapter = new BeanAdapter(yearWeek, true);
    weekSelectionList.setSelectionHolder(routeDateAdapter
        .getValueModel(YearWeek.PROPERTY_WEEK));
    weekSelectionList
        .addValueChangeListener(new WeekChangeListener(window));
    comboBoxWeeks.setName("ComboBoxWeeks");
    return comboBoxWeeks;
View Full Code Here

Examples of com.jgoodies.binding.beans.BeanAdapter

    {
        FeedRenderingSettings feedRenderingSettings =
            GlobalModel.SINGLETON.getGlobalRenderingSettings();

        // Factory for valueModels corresponding to bean properties of GlobalRenderingSettings
        BeanAdapter globChannelRenderingAdapter = new BeanAdapter(feedRenderingSettings, true);

        ValueModel articleFilterModelHolder = globChannelRenderingAdapter.getValueModel("articleFilter");
        ValueModel articleViewModeHolder = GlobalModel.SINGLETON.getViewModeValueModel();

        ActionManager.register(CMD_ARTICLE_WHATIS,
            new ShowTipAction(TipOfTheDay.TIP_WHAT_IS_ARTICLE));
        ActionManager.register(CMD_ARTICLE_BROWSE, BrowseArticleAction.getInstance());
View Full Code Here

Examples of net.helipilot50.stocktrade.displayproject.binding.beans.BeanAdapter

     */
    public PresentationModel(
        ValueModel beanChannel,
        ValueModel triggerChannel) {
        this.beanChannel = beanChannel;
        this.beanAdapter = new BeanAdapter(beanChannel, true);
        this.triggerChannel = triggerChannel;
        this.wrappedBuffers = new HashMap<String, WrappedBuffer>();
        this.bufferingUpdateHandler = new BufferingStateHandler();
        this.changed = false;
        this.changedUpdateHandler = new UpdateHandler();
View Full Code Here

Examples of org.apache.pivot.beans.BeanAdapter

        if (this.skin != null) {
            throw new IllegalStateException("Skin is already installed.");
        }

        this.skin = skin;
        styles = new BeanAdapter(skin);
        skin.install(this);

        // Apply any defined type styles
        LinkedList<Class<?>> styleTypes = new LinkedList<Class<?>>();
View Full Code Here

Examples of org.apache.pivot.beans.BeanAdapter

        if (this.skin != null) {
            throw new IllegalStateException("Skin is already installed.");
        }

        this.skin = skin;
        styles = new BeanAdapter(skin);
        skin.install(this);

        // Apply any defined type styles
        LinkedList<Class<?>> styleTypes = new LinkedList<Class<?>>();
View Full Code Here

Examples of org.apache.pivot.beans.BeanAdapter

            }
        } else {
            stockQuote = new StockQuote();
        }

        detailPane.load(new BeanAdapter(stockQuote));
    }
View Full Code Here

Examples of org.apache.pivot.beans.BeanAdapter

            // Instantiate the dictionary or bean type
            if (valueType == null) {
                Class<?> beanType = (Class<?>)typeArgument;

                try {
                    dictionary = new BeanAdapter(beanType.newInstance());
                } catch (InstantiationException exception) {
                    throw new RuntimeException(exception);
                } catch (IllegalAccessException exception) {
                    throw new RuntimeException(exception);
                }
View Full Code Here

Examples of org.apache.pivot.beans.BeanAdapter

        } else {
            Map<String, Object> map;
            if (object instanceof Map<?, ?>) {
                map = (Map<String, Object>)object;
            } else {
                map = new BeanAdapter(object, true);
            }

            writer.append("{");

            int i = 0;
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.