Package com.nexirius.framework.datamodel

Examples of com.nexirius.framework.datamodel.SimpleModel


    /**
     * Set the text of the label to the string value which is returned by the getText method from the associated
     * data model.
     */
    public void update() {
        SimpleModel model = getModel();

        if (isCreated()) {
            if (model.isExceptional()) {
                getJLabel().setText(factory.getClientResource().getLabel(model.getStatus().getExceptionalStringId()));
            } else {
                String text = model.getText();

                if (model.getFlag(ModelFlag.TRANSLATE_VALUE)) {
                    text = factory.getClientResource().getLabel(text);
                }

                getJLabel().setText(text);
            }
View Full Code Here


                } else {
                    setIcon(null);
                }

                if (value instanceof SimpleModel) {
                    SimpleModel model = (SimpleModel) value;

                    if (model.getFlag(ModelFlag.TRANSLATE_VALUE)) {

                        setText(factory.getText(model.getText()));
                    } else {
                        setText(value.toString());
                    }
                } else {
                    setText(value.toString());
                }

                prevColumn = column;
                prevIsSelected = isSelected;

                if (!isSelected) {
                    setBackground(SystemColor.text);
                    setForeground(SystemColor.textText);
                }

                if (properties != null) {
                    properties.change(this, factory);
                }

                if (!isSelected) {
                    Color background = null;

                    if (value instanceof DataModel) {
                        DataModel model = (DataModel) value;

                        String c = model.getBackgroundColorId();

                        if (c != null) {
                            background = factory.getClientResource().getColor(c);
                        } else {
                            Object rowModel = table.getModel().getValueAt(row, -1);
View Full Code Here

TOP

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

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.