Package com.nexirius.framework.datamodel

Examples of com.nexirius.framework.datamodel.DataModel$MethodPropertyChangeListener


     */
    public void translate(HTMLSessionVariable sessionVariable, HTMLParser parser)
            throws Exception {
        String childName = getChildName();
        String flag = getFlag();
        DataModel childModel = null;

        DataModel model = parser.getModel();

        if (childName == null) {
            childModel = model;
        } else if (model != null) {
            childModel = model.getChild(childName);
        }

        boolean on = childModel.getFlag(new ModelFlag(flag));
        String result = getText(on);

View Full Code Here


    }

    public void translate(HTMLSessionVariable sessionVariable, HTMLParser parser)
            throws Exception {
        String childName = getFieldName();
        DataModel child = parser.getModel().getChild(childName);

        if (!(child instanceof ArrayModel)) {

            if (childName == null) {
                throw new Exception(parser.getModel().getFieldName() + " is not an ArrayModel");
            }

            throw new Exception("Child " + childName + " of " + parser.getModel().getFieldName() + " is not an ArrayModel");
        }

        ArrayModel array = (ArrayModel) child;
        DataModelEnumeration e = array.getEnumeration();
        VariableStore variableStore = parser.getResolver().getVariableStore();
        int index = 0;
        String oldIndex = variableStore.getValueOf(VariableStore.INDEX);
        String oldCount = variableStore.getValueOf(VariableStore.COUNT);
        String template = getTemplate();
        boolean childIsEditor = parser.isEditor();
        Boolean type = getIsEditor();

        if (type != null) {
            childIsEditor = type.booleanValue();
        }

        variableStore.setVariable(VariableStore.COUNT, Integer.toString(array.getSize()));

        while (e.hasMore()) {
            DataModel item = e.next();

            variableStore.setVariable(VariableStore.INDEX, Integer.toString(index + 1));

            byte result[] = parser.getResolver().resolve(sessionVariable, item, template, childIsEditor);
View Full Code Here

     * The tab which displays the child which transmitted the grab focus event is beeing
     * selected (assotiated tab appears)
     */
    public void dataModelGrabFocus(DataModelEvent event) {
        if (isCreated() && event.fromChild()) {
            DataModel child = null;
            DataModelVector transmitter = event.getTransmitterVector();

            if (transmitter.size() != 2) {

                return;
            }

            child = transmitter.lastItem();

            if (child != null) {
                child = transmitter.previousItem();
            }

            if (child == null) {

                return;
            }

            int index = getJTabbedPane().indexOfTab(child.getFieldName());

            if (index >= 0) {
                getJTabbedPane().setSelectedIndex(index);
            }
        }
View Full Code Here

    public static int MAX_NUMBER_OF_BACKWARD_STATES = 64;
    private Map defaultTransitionMap = new HashMap();

    public HTMLSessionVariable init() throws Exception {
        HTMLState firstState = null;
        DataModel homeModel = createHomeModel();
        HTMLTransition[] htmlTransistions = getHTMLTransistions(homeModel);

        for (int i = 0; i < htmlTransistions.length; i++) {
            HTMLTransition htmlTransistion = htmlTransistions[i];
            HTMLState state = htmlTransistion.getState();
View Full Code Here

                if (getLayout() != null) {
                    FWLog.log("Unsupported layout for " + getClass().getName() + " have " + getLayout().getClass().getName() + " need instanceof StructureLayoutItem");
                }

                // take the first two children and create associated editors/viewers
                DataModel dm = getModel().getChildren().firstItem();

                if (dm != null) {
                    try {
                        getJSplitPane().setLeftComponent(factory.createViewer(dm, isEditor()).getJComponent());
                    } catch (Exception ex) {
View Full Code Here

        }

        TreePath path = getSelectedPath();

        if (path != null) {
            DataModel m = ((TreeHook) path.getLastPathComponent()).getDataModel();

            if (m != null) {
                m.grabFocus();

                return m;
            }
        }
View Full Code Here

    public String getChildName() {
        return getArgument(0);
    }

    public void translate(HTMLSessionVariable sessionVariable, HTMLParser parser) throws Exception {
        DataModel model = parser.getModel();

        if (model != null) {
            String childName = getChildName();
            String childText = model.getChildText(childName);
            if (childText != null) {
                parser.getOut().write(childText.getBytes());
            } else {
                throw new Exception("No such child " + childName + " in model " + model.getClass() + " " + model.getFieldName());
            }
        }
    }
View Full Code Here

            throws Exception {
        String childName = getChildName();
        String template = getTemplate();
        Boolean type = getIsEditor();
        boolean childIsEditor = parser.isEditor();
        DataModel childModel = null;

        if (type != null) {
            childIsEditor = type.booleanValue();
        }

        DataModel model = parser.getModel();

        if (childName == null || childName.equals("this")) {
            childModel = model;
        } else if (model != null) {
            childModel = model.getChild(childName);
        }

        byte result[] = parser.getResolver().resolve(sessionVariable, childModel, template, childIsEditor);

        parser.getOut().write(result);
View Full Code Here

    }

    public abstract void translate(HTMLSessionVariable sessionVariable, HTMLParser parser) throws Exception;

    public String getFullChildName(HTMLParser parser, String childName) throws Exception {
        DataModel model = parser.getModel();
        DataModel rootModel = parser.getRootModel();
        DataModel childModel = null;

        if (childName == null || childName.equals("this")) {
            childModel = model;
        } else if (rootModel != null) {
            childModel = model.getChild(childName);
View Full Code Here

     * The tab which displays the child which transmitted the grab focus event is beeing
     * selected (assotiated tab appears)
     */
    public void dataModelGrabFocus(DataModelEvent event) {
        if (isCreated() && event.fromChild()) {
            DataModel child = null;
            DataModelVector transmitter = event.getTransmitterVector();

            if (transmitter.size() > 1) {
                child = transmitter.getItem(1);
            } else {

                return;
            }

            getCardLayout().show(getJPanel(), child.getFieldName());
        }
    }
View Full Code Here

TOP

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

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.