// _Presets_EOArchive.java
// Generated by EnterpriseObjects palette at Monday, November 28, 2005 1:42:59 PM US/Pacific

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

public class _Presets_EOArchive extends com.webobjects.eoapplication.EOArchive {
    com.webobjects.eointerface.swing.EOFrame _eoFrame0, _eoFrame1;
    com.webobjects.eointerface.swing.EOTable _nsTableView0;
    com.webobjects.eointerface.swing.EOTable._EOTableColumn _eoTableColumn0;
    com.webobjects.eointerface.swing.EOTextField _nsTextField0, _nsTextField1;
    javax.swing.JButton _nsButton0, _nsButton1, _nsButton2, _nsButton3, _nsButton4, _nsButton5;
    javax.swing.JPanel _nsView0, _nsView1;

    public _Presets_EOArchive(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();

        _nsTextField1 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
        _nsButton5 = (javax.swing.JButton)_registered(new javax.swing.JButton("OK"), "NSButton");
        _nsButton4 = (javax.swing.JButton)_registered(new javax.swing.JButton("Delete"), "NSButton2");
        _nsButton3 = (javax.swing.JButton)_registered(new javax.swing.JButton("Rename"), "NSButton1");
        _nsButton2 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton3");
        _nsButton1 = (javax.swing.JButton)_registered(new javax.swing.JButton("OK"), "NSButton4");
        _eoTableColumn0 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "NSTableColumn");

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

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

        _nsView1 = (JPanel)_eoFrame1.getContentPane();

        if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "fCreateNameField.nextFocusableComponent")) != 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("Cancel"), "NSButton1");
        }

        if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "fCreateNameField")) != 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(), "NSTextField");
        }

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

        _nsView0 = (JPanel)_eoFrame0.getContentPane();
    }

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

        if (_replacedObjects.objectForKey("_eoFrame0") == null) {
            _connect(_eoFrame0, _owner(), "delegate");
        }

        _nsButton5.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "createOK", _nsButton5), ""));

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

        if (_replacedObjects.objectForKey("_eoFrame1") == null) {
            _connect(_eoFrame1, _owner(), "delegate");
        }

        _nsButton4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "editDelete", _nsButton4), ""));
        _nsButton3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "editRename", _nsButton3), ""));

        if (_replacedObjects.objectForKey("_nsTableView0") == null) {
            _connect(_owner(), _nsTableView0, "fEditTableView");
        }

        _nsButton2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "editCancel", _nsButton2), ""));
        _nsButton1.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "editOK", _nsButton1), ""));

        if (_replacedObjects.objectForKey("_nsTableView0") == null) {
            _connect(_nsTableView0, _owner(), "delegate");
        }

        if (_replacedObjects.objectForKey("_eoFrame1") == null) {
            _connect(_owner(), _eoFrame1, "fEditPresetsWindow");
        }

        if (_replacedObjects.objectForKey("_eoFrame0") == null) {
            _connect(_owner(), _eoFrame0, "fCreatePresetWindow");
        }

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

    protected void _init() {
        super._init();
        _setFontForComponent(_nsTextField1, "Lucida Grande", 13, Font.PLAIN);
        _nsTextField1.setEditable(false);
        _nsTextField1.setOpaque(false);
        _nsTextField1.setText("Name:");
        _nsTextField1.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        _nsTextField1.setSelectable(false);
        _nsTextField1.setEnabled(true);
        _nsTextField1.setBorder(null);

        if (_replacedObjects.objectForKey("_nsButton0") == null) {
            _connect(_nsButton0, _nsButton5, "nextFocusableComponent");
        }

        _connect(_nsButton5, _nsTextField0, "nextFocusableComponent");
        _setFontForComponent(_nsButton5, "Lucida Grande", 13, Font.PLAIN);
        _nsButton5.setMargin(new Insets(0, 2, 0, 2));
        _setFontForComponent(_nsButton4, "Lucida Grande", 13, Font.PLAIN);
        _nsButton4.setMargin(new Insets(0, 2, 0, 2));
        _connect(_nsButton3, _nsButton4, "nextFocusableComponent");
        _setFontForComponent(_nsButton3, "Lucida Grande", 13, Font.PLAIN);
        _nsButton3.setMargin(new Insets(0, 2, 0, 2));
        _setFontForComponent(_nsButton2, "Lucida Grande", 13, Font.PLAIN);
        _nsButton2.setMargin(new Insets(0, 2, 0, 2));
        _connect(_nsButton2, _nsButton1, "nextFocusableComponent");
        _setFontForComponent(_nsButton1, "Lucida Grande", 13, Font.PLAIN);
        _nsButton1.setMargin(new Insets(0, 2, 0, 2));
        _connect(_nsButton1, _nsTableView0, "nextFocusableComponent");
        _eoTableColumn0.setMinWidth(40);
        _eoTableColumn0.setMaxWidth(1000);
        _eoTableColumn0.setPreferredWidth(317);
        _eoTableColumn0.setWidth(317);
        _eoTableColumn0.setResizable(true);
        _eoTableColumn0.setHeaderValue("");
        if ((_eoTableColumn0.getHeaderRenderer() != null)) {
        	((DefaultTableCellRenderer)(_eoTableColumn0.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
        }

        if (_replacedObjects.objectForKey("_nsTableView0") == null) {
            _nsTableView0.table().addColumn(_eoTableColumn0);
            _setFontForComponent(_nsTableView0.table().getTableHeader(), "Lucida Grande", 11, Font.PLAIN);
            _nsTableView0.table().setRowHeight(20);
        }

        if (!(_nsView1.getLayout() instanceof EOViewLayout)) { _nsView1.setLayout(new EOViewLayout()); }
        _nsTableView0.setSize(337, 236);
        _nsTableView0.setLocation(13, 14);
        ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTableView0, EOViewLayout.MinYMargin);
        _nsView1.add(_nsTableView0);
        _nsButton3.setSize(93, 26);
        _nsButton3.setLocation(364, 12);
        ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton3, EOViewLayout.MinYMargin);
        _nsView1.add(_nsButton3);
        _nsButton4.setSize(93, 26);
        _nsButton4.setLocation(364, 44);
        ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton4, EOViewLayout.MinYMargin);
        _nsView1.add(_nsButton4);
        _nsButton2.setSize(93, 26);
        _nsButton2.setLocation(261, 268);
        ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton2, EOViewLayout.MinYMargin);
        _nsView1.add(_nsButton2);
        _nsButton1.setSize(93, 26);
        _nsButton1.setLocation(364, 268);
        ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton1, EOViewLayout.MinYMargin);
        _nsView1.add(_nsButton1);

        if (_replacedObjects.objectForKey("_eoFrame1") == null) {
            _nsView1.setSize(466, 304);
            _eoFrame1.setTitle("Edit Presets");
            _eoFrame1.setLocation(117, 534);
            _eoFrame1.setSize(466, 304);
        }

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

        if (_replacedObjects.objectForKey("_nsTextField0") == null) {
            _connect(_nsTextField0, _nsButton0, "nextFocusableComponent");
        }

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

        if (!(_nsView0.getLayout() instanceof EOViewLayout)) { _nsView0.setLayout(new EOViewLayout()); }
        _nsTextField0.setSize(303, 22);
        _nsTextField0.setLocation(60, 8);
        ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField0, EOViewLayout.MinYMargin);
        _nsView0.add(_nsTextField0);
        _nsButton5.setSize(75, 26);
        _nsButton5.setLocation(291, 36);
        ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton5, EOViewLayout.MinYMargin);
        _nsView0.add(_nsButton5);
        _nsButton0.setSize(75, 26);
        _nsButton0.setLocation(209, 36);
        ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton0, EOViewLayout.MinYMargin);
        _nsView0.add(_nsButton0);
        _nsTextField1.setSize(45, 17);
        _nsTextField1.setLocation(10, 11);
        ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField1, EOViewLayout.MinYMargin);
        _nsView0.add(_nsTextField1);

        if (_replacedObjects.objectForKey("_eoFrame0") == null) {
            _nsView0.setSize(375, 72);
            _eoFrame0.setTitle("Create Preset");
            _eoFrame0.setLocation(377, 900);
            _eoFrame0.setSize(375, 72);
        }
    }
}
