// _ImageParameter_EOArchive_English.java
// Generated by EnterpriseObjects palette at Monday, November 14, 2005 11:33:20 AM US/Pacific

import com.webobjects.eoapplication.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eointerface.*;
import com.webobjects.eointerface.swing.*;
import com.webobjects.foundation.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.table.*;
import javax.swing.text.*;

public class _ImageParameter_EOArchive_English extends com.webobjects.eoapplication.EOArchive {
    com.webobjects.eointerface.swing.EOImageView _nsImageView0;
    com.webobjects.eointerface.swing.EOTextField _nsTextField0;
    com.webobjects.eointerface.swing.EOView _nsCustomView0;
    javax.swing.JButton _nsButton0;

    public _ImageParameter_EOArchive_English(Object owner, NSDisposableRegistry registry) {
        super(owner, registry);
    }

    protected void _construct() {
        Object owner = _owner();
        EOArchive._ObjectInstantiationDelegate delegate = (owner instanceof EOArchive._ObjectInstantiationDelegate) ? (EOArchive._ObjectInstantiationDelegate)owner : null;
        Object replacement;

        super._construct();


        if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "fParameterView")) != null)) {
            _nsCustomView0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOView)replacement;
            _replacedObjects.setObjectForKey(replacement, "_nsCustomView0");
        } else {
            _nsCustomView0 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "View");
        }

        if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "fChooseButton")) != null)) {
            _nsButton0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JButton)replacement;
            _replacedObjects.setObjectForKey(replacement, "_nsButton0");
        } else {
            _nsButton0 = (javax.swing.JButton)_registered(new javax.swing.JButton("Choose..."), "NSButton");
        }

        if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "fImageView")) != null)) {
            _nsImageView0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOImageView)replacement;
            _replacedObjects.setObjectForKey(replacement, "_nsImageView0");
        } else {
            _nsImageView0 = (com.webobjects.eointerface.swing.EOImageView)_registered(new com.webobjects.eointerface.swing.EOImageView(), "");
        }

        if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "fLabelView")) != null)) {
            _nsTextField0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
            _replacedObjects.setObjectForKey(replacement, "_nsTextField0");
        } else {
            _nsTextField0 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField111111");
        }
    }

    protected void _awaken() {
        super._awaken();

        if (_replacedObjects.objectForKey("_nsCustomView0") == null) {
            _connect(_owner(), _nsCustomView0, "fParameterView");
        }

        _nsButton0.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "chooseImage", _nsButton0), ""));

        if (_replacedObjects.objectForKey("_nsButton0") == null) {
            _connect(_owner(), _nsButton0, "fChooseButton");
        }

        if (_replacedObjects.objectForKey("_nsImageView0") == null) {
            _connect(_nsImageView0, _owner(), "fDelegate");
        }

        _nsImageView0.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "imageChanged", _nsImageView0), ""));

        if (_replacedObjects.objectForKey("_nsImageView0") == null) {
            _connect(_owner(), _nsImageView0, "fImageView");
        }

        if (_replacedObjects.objectForKey("_nsTextField0") == null) {
            _connect(_owner(), _nsTextField0, "fLabelView");
        }
    }

    protected void _init() {
        super._init();

        if (_replacedObjects.objectForKey("_nsCustomView0") == null) {
            if (!(_nsCustomView0.getLayout() instanceof EOViewLayout)) { _nsCustomView0.setLayout(new EOViewLayout()); }
            _nsImageView0.setSize(54, 54);
            _nsImageView0.setLocation(186, 0);
            ((EOViewLayout)_nsCustomView0.getLayout()).setAutosizingMask(_nsImageView0, EOViewLayout.MinXMargin | EOViewLayout.MaxYMargin);
            _nsCustomView0.add(_nsImageView0);
            _nsTextField0.setSize(100, 13);
            _nsTextField0.setLocation(12, 21);
            ((EOViewLayout)_nsCustomView0.getLayout()).setAutosizingMask(_nsTextField0, EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
            _nsCustomView0.add(_nsTextField0);
            _nsButton0.setSize(59, 16);
            _nsButton0.setLocation(122, 20);
            ((EOViewLayout)_nsCustomView0.getLayout()).setAutosizingMask(_nsButton0, EOViewLayout.MinXMargin | EOViewLayout.MaxYMargin);
            _nsCustomView0.add(_nsButton0);
        }

        if (_replacedObjects.objectForKey("_nsButton0") == null) {
            _setFontForComponent(_nsButton0, "Lucida Grande", 9, Font.PLAIN);
            _nsButton0.setMargin(new Insets(0, 2, 0, 2));
        }

        if (_replacedObjects.objectForKey("_nsTextField0") == null) {
            _setFontForComponent(_nsTextField0, "Lucida Grande", 10, Font.PLAIN);
            _nsTextField0.setEditable(false);
            _nsTextField0.setOpaque(false);
            _nsTextField0.setText("Parameter\n\n");
            _nsTextField0.setHorizontalAlignment(javax.swing.JTextField.LEFT);
            _nsTextField0.setSelectable(false);
            _nsTextField0.setEnabled(true);
            _nsTextField0.setBorder(null);
        }
    }
}
