/*
 * Copyright (c) 2010 Stiftung Deutsches Elektronen-Synchrotron, Member of the Helmholtz
 * Association, (DESY), HAMBURG, GERMANY.
 *
 * THIS SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "../AS IS" BASIS. WITHOUT WARRANTY OF ANY
 * KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, THE USER ASSUMES
 * THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY
 * CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SOFTWARE IS AUTHORIZED HEREUNDER
 * EXCEPT UNDER THIS DISCLAIMER. DESY HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
 * ENHANCEMENTS, OR MODIFICATIONS. THE FULL LICENSE SPECIFYING FOR THE SOFTWARE THE REDISTRIBUTION,
 * MODIFICATION, USAGE AND OTHER RIGHTS AND OBLIGATIONS IS INCLUDED WITH THE DISTRIBUTION OF THIS
 * PROJECT IN THE FILE LICENSE.HTML. IF THE LICENSE IS NOT INCLUDED YOU MAY FIND A COPY AT
 * HTTP://WWW.DESY.DE/LEGAL/LICENSE.HTM
 */
package org.csstudio.sds.behavior.desy;

import org.csstudio.sds.components.model.TextInputModel;
import org.epics.css.dal.simple.AnyData;
import org.epics.css.dal.simple.MetaData;

/**
 *
 * Default DESY-Behavior for the {@link TextInputModel} widget with Connection state
 *
 * @author hrickens
 * @author $Author$
 * @version $Revision$
 * @since 20.04.2010
 */
public class TextinputConnectionBehavior extends AbstractDesyConnectionBehavior<TextInputModel> {

    /**
     * Constructor.
     */
    public TextinputConnectionBehavior() {
        addInvisiblePropertyId(TextInputModel.PROP_INPUT_TEXT);
        addInvisiblePropertyId(TextInputModel.PROP_ACTIONDATA);
        addInvisiblePropertyId(TextInputModel.PROP_PERMISSSION_ID);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void doProcessValueChange(final TextInputModel model, final AnyData anyData) {
        super.doProcessValueChange(model, anyData);
        // .. fill level (influenced by current value)
        model.setPropertyValue(TextInputModel.PROP_INPUT_TEXT, anyData.stringValue());
    }


    @Override
    protected void doProcessMetaDataChange(final TextInputModel widget, final MetaData metaData) {
        // do noting
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected String[] doGetSettablePropertyIds() {
        return new String[] {TextInputModel.PROP_INPUT_TEXT};
    }
}

@@ -1430,16 +1430,63 @@
 tModel;%0A
+import org.csstudio.sds.model.BorderStyleEnum;%0A
 import o
@@ -2118,16 +2118,474 @@
 ON_ID);%0A
+        addInvisiblePropertyId(TextInputModel.PROP_BORDER_WIDTH);%0A        addInvisiblePropertyId(TextInputModel.PROP_BORDER_STYLE);%0A        addInvisiblePropertyId(TextInputModel.PROP_BORDER_COLOR);%0A    %7D%0A%0A    /**%0A     * %7B@inheritDoc%7D%0A     */%0A    @Override%0A    protected void doInitialize(final TextInputModel widget) %7B%0A        super.doInitialize(widget);%0A        widget.setPropertyValue(TextInputModel.PROP_BORDER_STYLE, BorderStyleEnum.LOWERED.getIndex());%0A
     %7D%0A%0A 

Set Border to lowered Style