Package com.nexirius.framework.datamodel

Examples of com.nexirius.framework.datamodel.DataModel


    public JComponent createJComponent(ViewerFactory factory) {
        JPanel panel = new JPanel(new BorderLayout());

        try {
            DataModel array = mainModel.getChild(MediaArrayModel.FIELD_NAME);
            JComponent table = factory.createDefaultEditor(array).getJComponent();

            table.setBorder(new BevelBorder(BevelBorder.LOWERED));
            panel.add(table, BorderLayout.CENTER);
View Full Code Here


        ulcDialogViewerFactory.setUlcViewerCreatorMap(ulcFactory.getUlcViewerCreatorMap());
        ulcDialogViewerFactory.startDialog();

        try {
            ULCDialog dialog = createDialog();
            DataModel copy = null;

            String fieldName = model.getFieldName();

            if (fieldName != null) {
                dialog.setTitle(ulcFactory.getClientResource().getLabel(fieldName));
View Full Code Here

        return false;
    }

    public void setMainAddress() {
        DataModel highlighted = getHighlightedItem();

        if (highlighted != null) {
            DataModelEnumeration en = getList().getEnumeration();

            while (en.hasMore()) {
View Full Code Here

            JComponent personEditor = factory.createDefaultEditor(memberModel.getPerson()).getJComponent();
            personPanel.add(personEditor);
            personPanel.add(createFieldEditor(MemberModel.FIELD_TYPE, factory));
            tabbedPane.addTab(PersonModel.FIELD_PERSON, createTabComponent(personPanel));
            DataModel addressList = memberModel.getChild(AddressListModel.FIELD_ADDRESS_LIST);
            tabbedPane.addTab(AddressListModel.FIELD_ADDRESS_LIST, createTabComponent(factory.createDefaultEditor(addressList).getJComponent()));
            DataModel phoneList = memberModel.getChild(PhoneListModel.FIELD_PHONE_LIST);
            tabbedPane.addTab(PhoneListModel.FIELD_PHONE_LIST, createTabComponent(factory.createDefaultEditor(phoneList).getJComponent()));
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

     * a buffer. The size of the buffer is limited by BUFFERED_COMPONENTS.
     */
    public void setActivePath(TreePath path) {
        this.treeViewer.setSelectedPath(path);

        DataModel viewer_model = null;
        DataModel active_model = null;

        if (path == null) {
            active_model = model;
            viewer_model = model;
        } else {
            Object c = path.getLastPathComponent();

            Assert.assertion(c instanceof TreeHook, "Navigator node is instance of TreeHook");

            // Apply the mode to the command set according to the node selected
            active_model = ((TreeHook) c).getDataModel();
            viewer_model = active_model;

            DataModel parent_model = active_model.getParentDataModel();

            while (parent_model != getDataModel() && parent_model.isChildEditor()) {
                viewer_model = parent_model;
                parent_model = viewer_model.getParentDataModel();
            }
        }

View Full Code Here

                    Object c = path.getLastPathComponent();

                    Assert.assertion(c instanceof TreeHook, "Navigator node is instance of TreeHook");

                    // Apply the mode to the command set according to the node selected
                    DataModel model = ((TreeHook) c).getDataModel();

                    model.grabFocus();
                }
            }
        }
View Full Code Here

                    Object c = path.getLastPathComponent();

                    Assert.assertion(c instanceof TreeHook, "Navigator node is instance of TreeHook");

                    // Apply the mode to the command set according to the node selected
                    DataModel model = ((TreeHook) c).getDataModel();

                    model.grabFocus();
                }
            }
        }
View Full Code Here

        panel.setBorder(tb);
    }

    public void doLayout(DataViewer parent_viewer) {
        try {
            DataModel parent_model = parent_viewer.getDataModel();
            // look for the associated model
            Viewable model = parent_model.getViewableChild(getModelFieldName());
            DataViewer viewer = null;

            if (viewerCreator == null) {
                viewer = parent_viewer.getFactory().createViewer(model, parent_viewer.isEditor());
            } else {
View Full Code Here

        generator.startTag(out, ARRAY_MODEL, model.getFieldName());
        generator.newLine(out);
        generator.incrementIndent();
        while(en.hasMore()) {
            DataModel dataModel = en.next();

            generator.indent(out);
            generator.startTag(out, DATA_MODEL, dataModel.getClass().getName());
            generator.newLine(out);
            generator.incrementIndent();

            generator.indent(out);
            generator.generateXml(out, dataModel);
View Full Code Here

        generator.startTag(out, STRUCT_MODEL, model.getFieldName());
        generator.newLine(out);
        generator.incrementIndent();
        while(en.hasMore()) {
            DataModel dataModel = en.next();
            generator.indent(out);
            generator.generateXml(out, dataModel);
            generator.newLine(out);
        }
        generator.decrementIndent();
View Full Code Here

TOP

Related Classes of com.nexirius.framework.datamodel.DataModel

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.