/**
 * output package name
 */
package com.kingdee.eas.custom.dormitorysystem.dormitory.client;

import org.apache.log4j.*;

import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.border.*;
import javax.swing.BorderFactory;
import javax.swing.event.*;
import javax.swing.KeyStroke;

import com.kingdee.bos.ctrl.swing.*;
import com.kingdee.bos.ctrl.kdf.table.*;
import com.kingdee.bos.ctrl.kdf.data.event.*;
import com.kingdee.bos.dao.*;
import com.kingdee.bos.dao.query.*;
import com.kingdee.bos.metadata.*;
import com.kingdee.bos.metadata.entity.*;
import com.kingdee.bos.ui.face.*;
import com.kingdee.bos.ui.util.ResourceBundleHelper;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.jdbc.rowset.IRowSet;
import com.kingdee.util.enums.EnumUtils;
import com.kingdee.bos.ui.face.UIRuleUtil;
import com.kingdee.bos.ctrl.swing.event.*;
import com.kingdee.bos.ctrl.kdf.table.event.*;
import com.kingdee.bos.ctrl.extendcontrols.*;
import com.kingdee.bos.ctrl.kdf.util.render.*;
import com.kingdee.bos.ui.face.IItemAction;
import com.kingdee.eas.framework.batchHandler.RequestContext;
import com.kingdee.bos.ui.util.IUIActionPostman;
import com.kingdee.bos.appframework.client.servicebinding.ActionProxyFactory;
import com.kingdee.bos.appframework.uistatemanage.ActionStateConst;
import com.kingdee.bos.appframework.validator.ValidateHelper;
import com.kingdee.bos.appframework.uip.UINavigator;


/**
 * output class name
 */
public abstract class AbstractDormitoryEditUI extends com.kingdee.eas.framework.client.EditUI
{
    private static final Logger logger = CoreUIObject.getLogger(AbstractDormitoryEditUI.class);
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer kDLabelContainer1;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer kDLabelContainer2;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer kDLabelContainer3;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer kDLabelContainer4;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contRoomNumber;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contRoomClassification;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contRoomType;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contDormitoryType;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contOccupantsNumber;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contOccupancyCapacity;
    protected com.kingdee.bos.ctrl.swing.KDCheckBox chkIsFull;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contRemarks;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contstate;
    protected com.kingdee.bos.ctrl.swing.KDCheckBox chkisSealUp;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contwaterprice;
    protected com.kingdee.bos.ctrl.swing.KDLabelContainer contelectricityprice;
    protected com.kingdee.bos.ctrl.extendcontrols.KDBizMultiLangBox txtName;
    protected com.kingdee.bos.ctrl.swing.KDTextField txtNumber;
    protected com.kingdee.bos.ctrl.swing.KDTextField txtSimpleName;
    protected com.kingdee.bos.ctrl.extendcontrols.KDBizMultiLangBox txtDescription;
    protected com.kingdee.bos.ctrl.swing.KDTextField txtRoomNumber;
    protected com.kingdee.bos.ctrl.swing.KDComboBox RoomClassification;
    protected com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox prmtRoomType;
    protected com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox prmtDormitoryType;
    protected com.kingdee.bos.ctrl.swing.KDFormattedTextField txtOccupantsNumber;
    protected com.kingdee.bos.ctrl.swing.KDFormattedTextField txtOccupancyCapacity;
    protected com.kingdee.bos.ctrl.swing.KDScrollPane scrollPaneRemarks;
    protected com.kingdee.bos.ctrl.swing.KDTextArea txtRemarks;
    protected com.kingdee.bos.ctrl.swing.KDComboBox state;
    protected com.kingdee.bos.ctrl.swing.KDFormattedTextField txtwaterprice;
    protected com.kingdee.bos.ctrl.swing.KDFormattedTextField txtelectricityprice;
    protected com.kingdee.eas.custom.dormitorysystem.dormitory.DormitoryInfo editData = null;
    /**
     * output class constructor
     */
    public AbstractDormitoryEditUI() throws Exception
    {
        super();
        this.defaultObjectName = "editData";
        jbInit();
        
        initUIP();
    }

    /**
     * output jbInit method
     */
    private void jbInit() throws Exception
    {
        this.resHelper = new ResourceBundleHelper(AbstractDormitoryEditUI.class.getName());
        this.setUITitle(resHelper.getString("this.title"));
        this.kDLabelContainer1 = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.kDLabelContainer2 = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.kDLabelContainer3 = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.kDLabelContainer4 = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contRoomNumber = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contRoomClassification = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contRoomType = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contDormitoryType = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contOccupantsNumber = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contOccupancyCapacity = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.chkIsFull = new com.kingdee.bos.ctrl.swing.KDCheckBox();
        this.contRemarks = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contstate = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.chkisSealUp = new com.kingdee.bos.ctrl.swing.KDCheckBox();
        this.contwaterprice = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.contelectricityprice = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
        this.txtName = new com.kingdee.bos.ctrl.extendcontrols.KDBizMultiLangBox();
        this.txtNumber = new com.kingdee.bos.ctrl.swing.KDTextField();
        this.txtSimpleName = new com.kingdee.bos.ctrl.swing.KDTextField();
        this.txtDescription = new com.kingdee.bos.ctrl.extendcontrols.KDBizMultiLangBox();
        this.txtRoomNumber = new com.kingdee.bos.ctrl.swing.KDTextField();
        this.RoomClassification = new com.kingdee.bos.ctrl.swing.KDComboBox();
        this.prmtRoomType = new com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox();
        this.prmtDormitoryType = new com.kingdee.bos.ctrl.extendcontrols.KDBizPromptBox();
        this.txtOccupantsNumber = new com.kingdee.bos.ctrl.swing.KDFormattedTextField();
        this.txtOccupancyCapacity = new com.kingdee.bos.ctrl.swing.KDFormattedTextField();
        this.scrollPaneRemarks = new com.kingdee.bos.ctrl.swing.KDScrollPane();
        this.txtRemarks = new com.kingdee.bos.ctrl.swing.KDTextArea();
        this.state = new com.kingdee.bos.ctrl.swing.KDComboBox();
        this.txtwaterprice = new com.kingdee.bos.ctrl.swing.KDFormattedTextField();
        this.txtelectricityprice = new com.kingdee.bos.ctrl.swing.KDFormattedTextField();
        this.kDLabelContainer1.setName("kDLabelContainer1");
        this.kDLabelContainer2.setName("kDLabelContainer2");
        this.kDLabelContainer3.setName("kDLabelContainer3");
        this.kDLabelContainer4.setName("kDLabelContainer4");
        this.contRoomNumber.setName("contRoomNumber");
        this.contRoomClassification.setName("contRoomClassification");
        this.contRoomType.setName("contRoomType");
        this.contDormitoryType.setName("contDormitoryType");
        this.contOccupantsNumber.setName("contOccupantsNumber");
        this.contOccupancyCapacity.setName("contOccupancyCapacity");
        this.chkIsFull.setName("chkIsFull");
        this.contRemarks.setName("contRemarks");
        this.contstate.setName("contstate");
        this.chkisSealUp.setName("chkisSealUp");
        this.contwaterprice.setName("contwaterprice");
        this.contelectricityprice.setName("contelectricityprice");
        this.txtName.setName("txtName");
        this.txtNumber.setName("txtNumber");
        this.txtSimpleName.setName("txtSimpleName");
        this.txtDescription.setName("txtDescription");
        this.txtRoomNumber.setName("txtRoomNumber");
        this.RoomClassification.setName("RoomClassification");
        this.prmtRoomType.setName("prmtRoomType");
        this.prmtDormitoryType.setName("prmtDormitoryType");
        this.txtOccupantsNumber.setName("txtOccupantsNumber");
        this.txtOccupancyCapacity.setName("txtOccupancyCapacity");
        this.scrollPaneRemarks.setName("scrollPaneRemarks");
        this.txtRemarks.setName("txtRemarks");
        this.state.setName("state");
        this.txtwaterprice.setName("txtwaterprice");
        this.txtelectricityprice.setName("txtelectricityprice");
        // CoreUI		
        this.btnPrint.setVisible(false);		
        this.btnPrintPreview.setVisible(false);		
        this.menuItemPrint.setVisible(false);		
        this.menuItemPrintPreview.setVisible(false);
        // kDLabelContainer1		
        this.kDLabelContainer1.setBoundLabelText(resHelper.getString("kDLabelContainer1.boundLabelText"));		
        this.kDLabelContainer1.setBoundLabelLength(100);		
        this.kDLabelContainer1.setBoundLabelUnderline(true);
        // kDLabelContainer2		
        this.kDLabelContainer2.setBoundLabelText(resHelper.getString("kDLabelContainer2.boundLabelText"));		
        this.kDLabelContainer2.setBoundLabelLength(100);		
        this.kDLabelContainer2.setBoundLabelUnderline(true);
        // kDLabelContainer3		
        this.kDLabelContainer3.setBoundLabelText(resHelper.getString("kDLabelContainer3.boundLabelText"));		
        this.kDLabelContainer3.setBoundLabelLength(100);		
        this.kDLabelContainer3.setBoundLabelUnderline(true);
        // kDLabelContainer4		
        this.kDLabelContainer4.setBoundLabelText(resHelper.getString("kDLabelContainer4.boundLabelText"));		
        this.kDLabelContainer4.setBoundLabelLength(100);		
        this.kDLabelContainer4.setBoundLabelUnderline(true);		
        this.kDLabelContainer4.setBoundLabelAlignment(7);		
        this.kDLabelContainer4.setVisible(true);
        // contRoomNumber		
        this.contRoomNumber.setBoundLabelText(resHelper.getString("contRoomNumber.boundLabelText"));		
        this.contRoomNumber.setBoundLabelLength(100);		
        this.contRoomNumber.setBoundLabelUnderline(true);		
        this.contRoomNumber.setVisible(true);
        // contRoomClassification		
        this.contRoomClassification.setBoundLabelText(resHelper.getString("contRoomClassification.boundLabelText"));		
        this.contRoomClassification.setBoundLabelLength(100);		
        this.contRoomClassification.setBoundLabelUnderline(true);		
        this.contRoomClassification.setVisible(true);
        // contRoomType		
        this.contRoomType.setBoundLabelText(resHelper.getString("contRoomType.boundLabelText"));		
        this.contRoomType.setBoundLabelLength(100);		
        this.contRoomType.setBoundLabelUnderline(true);		
        this.contRoomType.setVisible(true);
        // contDormitoryType		
        this.contDormitoryType.setBoundLabelText(resHelper.getString("contDormitoryType.boundLabelText"));		
        this.contDormitoryType.setBoundLabelLength(100);		
        this.contDormitoryType.setBoundLabelUnderline(true);		
        this.contDormitoryType.setVisible(true);
        // contOccupantsNumber		
        this.contOccupantsNumber.setBoundLabelText(resHelper.getString("contOccupantsNumber.boundLabelText"));		
        this.contOccupantsNumber.setBoundLabelLength(100);		
        this.contOccupantsNumber.setBoundLabelUnderline(true);		
        this.contOccupantsNumber.setVisible(true);
        // contOccupancyCapacity		
        this.contOccupancyCapacity.setBoundLabelText(resHelper.getString("contOccupancyCapacity.boundLabelText"));		
        this.contOccupancyCapacity.setBoundLabelLength(100);		
        this.contOccupancyCapacity.setBoundLabelUnderline(true);		
        this.contOccupancyCapacity.setVisible(true);
        // chkIsFull		
        this.chkIsFull.setText(resHelper.getString("chkIsFull.text"));		
        this.chkIsFull.setVisible(true);		
        this.chkIsFull.setHorizontalAlignment(2);
        // contRemarks		
        this.contRemarks.setBoundLabelText(resHelper.getString("contRemarks.boundLabelText"));		
        this.contRemarks.setBoundLabelLength(100);		
        this.contRemarks.setBoundLabelUnderline(true);		
        this.contRemarks.setVisible(true);
        // contstate		
        this.contstate.setBoundLabelText(resHelper.getString("contstate.boundLabelText"));		
        this.contstate.setBoundLabelLength(100);		
        this.contstate.setBoundLabelUnderline(true);		
        this.contstate.setVisible(true);
        // chkisSealUp		
        this.chkisSealUp.setText(resHelper.getString("chkisSealUp.text"));		
        this.chkisSealUp.setVisible(true);		
        this.chkisSealUp.setHorizontalAlignment(2);
        // contwaterprice		
        this.contwaterprice.setBoundLabelText(resHelper.getString("contwaterprice.boundLabelText"));		
        this.contwaterprice.setBoundLabelLength(100);		
        this.contwaterprice.setBoundLabelUnderline(true);		
        this.contwaterprice.setVisible(true);
        // contelectricityprice		
        this.contelectricityprice.setBoundLabelText(resHelper.getString("contelectricityprice.boundLabelText"));		
        this.contelectricityprice.setBoundLabelLength(100);		
        this.contelectricityprice.setBoundLabelUnderline(true);		
        this.contelectricityprice.setVisible(true);
        // txtName
        // txtNumber
        // txtSimpleName
        // txtDescription
        // txtRoomNumber		
        this.txtRoomNumber.setVisible(true);		
        this.txtRoomNumber.setHorizontalAlignment(2);		
        this.txtRoomNumber.setMaxLength(100);		
        this.txtRoomNumber.setRequired(false);
        // RoomClassification		
        this.RoomClassification.setVisible(true);		
        this.RoomClassification.addItems(EnumUtils.getEnumList("com.kingdee.eas.custom.dormitorysystem.enumerationset.DormitoryClassification").toArray());		
        this.RoomClassification.setRequired(false);
        // prmtRoomType		
        this.prmtRoomType.setQueryInfo("com.kingdee.eas.custom.dormitorysystem.otherbasicdata.app.RoomTypeQuery");		
        this.prmtRoomType.setVisible(true);		
        this.prmtRoomType.setEditable(true);		
        this.prmtRoomType.setDisplayFormat("$name$");		
        this.prmtRoomType.setEditFormat("$number$");		
        this.prmtRoomType.setCommitFormat("$number$");		
        this.prmtRoomType.setRequired(false);
        		prmtRoomType.addSelectorListener(new SelectorListener() {
			com.kingdee.eas.custom.dormitorysystem.otherbasicdata.client.RoomTypeListUI prmtRoomType_F7ListUI = null;
			public void willShow(SelectorEvent e) {
				if (prmtRoomType_F7ListUI == null) {
					try {
						prmtRoomType_F7ListUI = new com.kingdee.eas.custom.dormitorysystem.otherbasicdata.client.RoomTypeListUI();
					} catch (Exception e1) {
						e1.printStackTrace();
					}
					HashMap ctx = new HashMap();
					ctx.put("bizUIOwner",javax.swing.SwingUtilities.getWindowAncestor(prmtRoomType_F7ListUI));
					prmtRoomType_F7ListUI.setF7Use(true,ctx);
					prmtRoomType.setSelector(prmtRoomType_F7ListUI);
				}
			}
		});
					
        // prmtDormitoryType		
        this.prmtDormitoryType.setQueryInfo("com.kingdee.eas.custom.dormitorysystem.otherbasicdata.app.DormitoryTypeQuery");		
        this.prmtDormitoryType.setVisible(true);		
        this.prmtDormitoryType.setEditable(true);		
        this.prmtDormitoryType.setDisplayFormat("$name$");		
        this.prmtDormitoryType.setEditFormat("$number$");		
        this.prmtDormitoryType.setCommitFormat("$number$");		
        this.prmtDormitoryType.setRequired(false);
        		prmtDormitoryType.addSelectorListener(new SelectorListener() {
			com.kingdee.eas.custom.dormitorysystem.otherbasicdata.client.DormitoryTypeListUI prmtDormitoryType_F7ListUI = null;
			public void willShow(SelectorEvent e) {
				if (prmtDormitoryType_F7ListUI == null) {
					try {
						prmtDormitoryType_F7ListUI = new com.kingdee.eas.custom.dormitorysystem.otherbasicdata.client.DormitoryTypeListUI();
					} catch (Exception e1) {
						e1.printStackTrace();
					}
					HashMap ctx = new HashMap();
					ctx.put("bizUIOwner",javax.swing.SwingUtilities.getWindowAncestor(prmtDormitoryType_F7ListUI));
					prmtDormitoryType_F7ListUI.setF7Use(true,ctx);
					prmtDormitoryType.setSelector(prmtDormitoryType_F7ListUI);
				}
			}
		});
					
        // txtOccupantsNumber		
        this.txtOccupantsNumber.setVisible(true);		
        this.txtOccupantsNumber.setHorizontalAlignment(2);		
        this.txtOccupantsNumber.setDataType(0);		
        this.txtOccupantsNumber.setSupportedEmpty(true);		
        this.txtOccupantsNumber.setRequired(false);
        // txtOccupancyCapacity		
        this.txtOccupancyCapacity.setVisible(true);		
        this.txtOccupancyCapacity.setHorizontalAlignment(2);		
        this.txtOccupancyCapacity.setDataType(0);		
        this.txtOccupancyCapacity.setSupportedEmpty(true);		
        this.txtOccupancyCapacity.setRequired(false);
        // scrollPaneRemarks
        // txtRemarks		
        this.txtRemarks.setVisible(true);		
        this.txtRemarks.setRequired(false);		
        this.txtRemarks.setMaxLength(255);
        // state		
        this.state.setVisible(true);		
        this.state.addItems(EnumUtils.getEnumList("com.kingdee.shr.base.syssetting.BasicItemStateEnum").toArray());		
        this.state.setRequired(false);
        // txtwaterprice		
        this.txtwaterprice.setVisible(true);		
        this.txtwaterprice.setHorizontalAlignment(2);		
        this.txtwaterprice.setDataType(1);		
        this.txtwaterprice.setSupportedEmpty(true);		
        this.txtwaterprice.setMinimumValue( new java.math.BigDecimal("-1.0E18"));		
        this.txtwaterprice.setMaximumValue( new java.math.BigDecimal("1.0E18"));		
        this.txtwaterprice.setPrecision(2);		
        this.txtwaterprice.setRequired(false);
        // txtelectricityprice		
        this.txtelectricityprice.setVisible(true);		
        this.txtelectricityprice.setHorizontalAlignment(2);		
        this.txtelectricityprice.setDataType(1);		
        this.txtelectricityprice.setSupportedEmpty(true);		
        this.txtelectricityprice.setMinimumValue( new java.math.BigDecimal("-1.0E18"));		
        this.txtelectricityprice.setMaximumValue( new java.math.BigDecimal("1.0E18"));		
        this.txtelectricityprice.setPrecision(2);		
        this.txtelectricityprice.setRequired(false);
        this.setFocusTraversalPolicy(new com.kingdee.bos.ui.UIFocusTraversalPolicy(new java.awt.Component[] {txtRoomNumber,RoomClassification,prmtRoomType,prmtDormitoryType,txtOccupantsNumber,txtOccupancyCapacity,chkIsFull,txtRemarks,state,chkisSealUp,txtwaterprice,txtelectricityprice}));
        this.setFocusCycleRoot(true);
		//Register control's property binding
		registerBindings();
		registerUIState();


    }

	public com.kingdee.bos.ctrl.swing.KDToolBar[] getUIMultiToolBar(){
		java.util.List list = new java.util.ArrayList();
		com.kingdee.bos.ctrl.swing.KDToolBar[] bars = super.getUIMultiToolBar();
		if (bars != null) {
			list.addAll(java.util.Arrays.asList(bars));
		}
		return (com.kingdee.bos.ctrl.swing.KDToolBar[])list.toArray(new com.kingdee.bos.ctrl.swing.KDToolBar[list.size()]);
	}




    /**
     * output initUIContentLayout method
     */
    public void initUIContentLayout()
    {
        this.setBounds(new Rectangle(0, 0, 1013, 629));
        this.setLayout(null);
        kDLabelContainer1.setBounds(new Rectangle(52, 63, 270, 19));
        this.add(kDLabelContainer1, null);
        kDLabelContainer2.setBounds(new Rectangle(53, 27, 270, 19));
        this.add(kDLabelContainer2, null);
        kDLabelContainer3.setBounds(new Rectangle(52, 100, 270, 19));
        this.add(kDLabelContainer3, null);
        kDLabelContainer4.setBounds(new Rectangle(52, 140, 270, 19));
        this.add(kDLabelContainer4, null);
        contRoomNumber.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contRoomNumber, null);
        contRoomClassification.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contRoomClassification, null);
        contRoomType.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contRoomType, null);
        contDormitoryType.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contDormitoryType, null);
        contOccupantsNumber.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contOccupantsNumber, null);
        contOccupancyCapacity.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contOccupancyCapacity, null);
        chkIsFull.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(chkIsFull, null);
        contRemarks.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contRemarks, null);
        contstate.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contstate, null);
        chkisSealUp.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(chkisSealUp, null);
        contwaterprice.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contwaterprice, null);
        contelectricityprice.setBounds(new Rectangle(0, 0, 270, 19));
        this.add(contelectricityprice, null);
        //kDLabelContainer1
        kDLabelContainer1.setBoundEditor(txtName);
        //kDLabelContainer2
        kDLabelContainer2.setBoundEditor(txtNumber);
        //kDLabelContainer3
        kDLabelContainer3.setBoundEditor(txtSimpleName);
        //kDLabelContainer4
        kDLabelContainer4.setBoundEditor(txtDescription);
        //contRoomNumber
        contRoomNumber.setBoundEditor(txtRoomNumber);
        //contRoomClassification
        contRoomClassification.setBoundEditor(RoomClassification);
        //contRoomType
        contRoomType.setBoundEditor(prmtRoomType);
        //contDormitoryType
        contDormitoryType.setBoundEditor(prmtDormitoryType);
        //contOccupantsNumber
        contOccupantsNumber.setBoundEditor(txtOccupantsNumber);
        //contOccupancyCapacity
        contOccupancyCapacity.setBoundEditor(txtOccupancyCapacity);
        //contRemarks
        contRemarks.setBoundEditor(scrollPaneRemarks);
        //scrollPaneRemarks
        scrollPaneRemarks.getViewport().add(txtRemarks, null);
        //contstate
        contstate.setBoundEditor(state);
        //contwaterprice
        contwaterprice.setBoundEditor(txtwaterprice);
        //contelectricityprice
        contelectricityprice.setBoundEditor(txtelectricityprice);

    }


    /**
     * output initUIMenuBarLayout method
     */
    public void initUIMenuBarLayout()
    {
        this.menuBar.add(menuFile);
        this.menuBar.add(menuEdit);
        this.menuBar.add(MenuService);
        this.menuBar.add(menuView);
        this.menuBar.add(menuBiz);
        this.menuBar.add(menuTool);
        this.menuBar.add(menuHelp);
        //menuFile
        menuFile.add(menuItemAddNew);
        menuFile.add(kDSeparator1);
        menuFile.add(menuItemCloudFeed);
        menuFile.add(menuItemSave);
        menuFile.add(menuItemCloudScreen);
        menuFile.add(menuItemSubmit);
        menuFile.add(menuItemCloudShare);
        menuFile.add(menuSubmitOption);
        menuFile.add(kdSeparatorFWFile1);
        menuFile.add(rMenuItemSubmit);
        menuFile.add(rMenuItemSubmitAndAddNew);
        menuFile.add(rMenuItemSubmitAndPrint);
        menuFile.add(separatorFile1);
        menuFile.add(MenuItemAttachment);
        menuFile.add(kDSeparator2);
        menuFile.add(menuItemPageSetup);
        menuFile.add(menuItemPrint);
        menuFile.add(menuItemPrintPreview);
        menuFile.add(kDSeparator3);
        menuFile.add(menuItemExitCurrent);
        //menuSubmitOption
        menuSubmitOption.add(chkMenuItemSubmitAndAddNew);
        menuSubmitOption.add(chkMenuItemSubmitAndPrint);
        //menuEdit
        menuEdit.add(menuItemCopy);
        menuEdit.add(menuItemEdit);
        menuEdit.add(menuItemRemove);
        menuEdit.add(kDSeparator4);
        menuEdit.add(menuItemReset);
        //MenuService
        MenuService.add(MenuItemKnowStore);
        MenuService.add(MenuItemAnwser);
        MenuService.add(SepratorService);
        MenuService.add(MenuItemRemoteAssist);
        //menuView
        menuView.add(menuItemFirst);
        menuView.add(menuItemPre);
        menuView.add(menuItemNext);
        menuView.add(menuItemLast);
        //menuBiz
        menuBiz.add(menuItemCancelCancel);
        menuBiz.add(menuItemCancel);
        //menuTool
        menuTool.add(menuItemMsgFormat);
        menuTool.add(menuItemSendMessage);
        menuTool.add(menuItemCalculator);
        menuTool.add(menuItemToolBarCustom);
        //menuHelp
        menuHelp.add(menuItemHelp);
        menuHelp.add(kDSeparator12);
        menuHelp.add(menuItemRegPro);
        menuHelp.add(menuItemPersonalSite);
        menuHelp.add(helpseparatorDiv);
        menuHelp.add(menuitemProductval);
        menuHelp.add(kDSeparatorProduct);
        menuHelp.add(menuItemAbout);

    }

    /**
     * output initUIToolBarLayout method
     */
    public void initUIToolBarLayout()
    {
        this.toolBar.add(btnAddNew);
        this.toolBar.add(btnCloud);
        this.toolBar.add(btnEdit);
        this.toolBar.add(btnXunTong);
        this.toolBar.add(btnReset);
        this.toolBar.add(kDSeparatorCloud);
        this.toolBar.add(btnSave);
        this.toolBar.add(btnSubmit);
        this.toolBar.add(btnCopy);
        this.toolBar.add(btnRemove);
        this.toolBar.add(btnAttachment);
        this.toolBar.add(separatorFW1);
        this.toolBar.add(btnPageSetup);
        this.toolBar.add(btnPrint);
        this.toolBar.add(btnPrintPreview);
        this.toolBar.add(separatorFW2);
        this.toolBar.add(btnFirst);
        this.toolBar.add(btnPre);
        this.toolBar.add(btnNext);
        this.toolBar.add(btnLast);
        this.toolBar.add(separatorFW3);
        this.toolBar.add(btnCancelCancel);
        this.toolBar.add(btnCancel);


    }

	//Regiester control's property binding.
	private void registerBindings(){
		dataBinder.registerBinding("IsFull", boolean.class, this.chkIsFull, "selected");
		dataBinder.registerBinding("isSealUp", boolean.class, this.chkisSealUp, "selected");
		dataBinder.registerBinding("name", String.class, this.txtName, "_multiLangItem");
		dataBinder.registerBinding("number", String.class, this.txtNumber, "text");
		dataBinder.registerBinding("simpleName", String.class, this.txtSimpleName, "text");
		dataBinder.registerBinding("description", String.class, this.txtDescription, "_multiLangItem");
		dataBinder.registerBinding("RoomNumber", String.class, this.txtRoomNumber, "text");
		dataBinder.registerBinding("RoomClassification", com.kingdee.eas.custom.dormitorysystem.enumerationset.DormitoryClassification.class, this.RoomClassification, "selectedItem");
		dataBinder.registerBinding("RoomType", com.kingdee.eas.custom.dormitorysystem.otherbasicdata.RoomTypeInfo.class, this.prmtRoomType, "data");
		dataBinder.registerBinding("DormitoryType", com.kingdee.eas.custom.dormitorysystem.otherbasicdata.DormitoryTypeInfo.class, this.prmtDormitoryType, "data");
		dataBinder.registerBinding("OccupantsNumber", int.class, this.txtOccupantsNumber, "value");
		dataBinder.registerBinding("OccupancyCapacity", int.class, this.txtOccupancyCapacity, "value");
		dataBinder.registerBinding("Remarks", String.class, this.txtRemarks, "text");
		dataBinder.registerBinding("state", com.kingdee.shr.base.syssetting.BasicItemStateEnum.class, this.state, "selectedItem");
		dataBinder.registerBinding("waterprice", java.math.BigDecimal.class, this.txtwaterprice, "value");
		dataBinder.registerBinding("electricityprice", java.math.BigDecimal.class, this.txtelectricityprice, "value");		
	}
	//Regiester UI State
	private void registerUIState(){
	        getActionManager().registerUIState(STATUS_ADDNEW, this.txtName, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_ADDNEW, this.txtDescription, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_ADDNEW, this.txtNumber, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_ADDNEW, this.txtSimpleName, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_EDIT, this.txtName, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_EDIT, this.txtDescription, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_EDIT, this.txtNumber, ActionStateConst.ENABLED);
	        getActionManager().registerUIState(STATUS_EDIT, this.txtSimpleName, ActionStateConst.ENABLED);					 	        		
	        getActionManager().registerUIState(STATUS_VIEW, this.txtName, ActionStateConst.DISABLED);					 	        		
	        getActionManager().registerUIState(STATUS_VIEW, this.txtDescription, ActionStateConst.DISABLED);					 	        		
	        getActionManager().registerUIState(STATUS_VIEW, this.txtNumber, ActionStateConst.DISABLED);					 	        		
	        getActionManager().registerUIState(STATUS_VIEW, this.txtSimpleName, ActionStateConst.DISABLED);		
	}
	public String getUIHandlerClassName() {
	    return "com.kingdee.eas.custom.dormitorysystem.dormitory.app.DormitoryEditUIHandler";
	}
	public IUIActionPostman prepareInit() {
		IUIActionPostman clientHanlder = super.prepareInit();
		if (clientHanlder != null) {
			RequestContext request = new RequestContext();
    		request.setClassName(getUIHandlerClassName());
			clientHanlder.setRequestContext(request);
		}
		return clientHanlder;
    }
	
	public boolean isPrepareInit() {
    	return false;
    }
    protected void initUIP() {
        super.initUIP();
    }


    /**
     * output onShow method
     */
    public void onShow() throws Exception
    {
        super.onShow();
        this.txtRoomNumber.requestFocusInWindow();
    }

	
	

    /**
     * output setDataObject method
     */
    public void setDataObject(IObjectValue dataObject)
    {
        IObjectValue ov = dataObject;        	    	
        super.setDataObject(ov);
        this.editData = (com.kingdee.eas.custom.dormitorysystem.dormitory.DormitoryInfo)ov;
    }
    protected void removeByPK(IObjectPK pk) throws Exception {
    	IObjectValue editData = this.editData;
    	super.removeByPK(pk);
    	recycleNumberByOrg(editData,"NONE",editData.getString("number"));
    }
    
    protected void recycleNumberByOrg(IObjectValue editData,String orgType,String number) {
        if (!StringUtils.isEmpty(number))
        {
            try {
            	String companyID = null;            
            	com.kingdee.eas.base.codingrule.ICodingRuleManager iCodingRuleManager = com.kingdee.eas.base.codingrule.CodingRuleManagerFactory.getRemoteInstance();
				if(!com.kingdee.util.StringUtils.isEmpty(orgType) && !"NONE".equalsIgnoreCase(orgType) && com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType))!=null) {
					companyID =com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType)).getString("id");
				}
				else if (com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit() != null) {
					companyID = ((com.kingdee.eas.basedata.org.OrgUnitInfo)com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit()).getString("id");
            	}				
				if (!StringUtils.isEmpty(companyID) && iCodingRuleManager.isExist(editData, companyID) && iCodingRuleManager.isUseIntermitNumber(editData, companyID)) {
					iCodingRuleManager.recycleNumber(editData,companyID,number);					
				}
            }
            catch (Exception e)
            {
                handUIException(e);
            }
        }
    }
    protected void setAutoNumberByOrg(String orgType) {
    	if (editData == null) return;
		if (editData.getNumber() == null) {
            try {
            	String companyID = null;
				if(!com.kingdee.util.StringUtils.isEmpty(orgType) && !"NONE".equalsIgnoreCase(orgType) && com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType))!=null) {
					companyID = com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit(com.kingdee.eas.basedata.org.OrgType.getEnum(orgType)).getString("id");
				}
				else if (com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit() != null) {
					companyID = ((com.kingdee.eas.basedata.org.OrgUnitInfo)com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentOrgUnit()).getString("id");
            	}
				com.kingdee.eas.base.codingrule.ICodingRuleManager iCodingRuleManager = com.kingdee.eas.base.codingrule.CodingRuleManagerFactory.getRemoteInstance();
		        if (iCodingRuleManager.isExist(editData, companyID)) {
		            if (iCodingRuleManager.isAddView(editData, companyID)) {
		            	editData.setNumber(iCodingRuleManager.getNumber(editData,companyID));
		            }
	                txtNumber.setEnabled(false);
		        }
            }
            catch (Exception e) {
                handUIException(e);
                this.oldData = editData;
                com.kingdee.eas.util.SysUtil.abort();
            } 
        } 
        else {
            if (editData.getNumber().trim().length() > 0) {
                txtNumber.setText(editData.getNumber());
            }
        }
    }

    /**
     * output loadFields method
     */
    public void loadFields()
    {
        		setAutoNumberByOrg("NONE");
        dataBinder.loadFields();
    }
		protected void setOrgF7(KDBizPromptBox f7,com.kingdee.eas.basedata.org.OrgType orgType) throws Exception
		{
			com.kingdee.eas.basedata.org.client.f7.NewOrgUnitFilterInfoProducer oufip = new com.kingdee.eas.basedata.org.client.f7.NewOrgUnitFilterInfoProducer(orgType);
			oufip.getModel().setIsCUFilter(true);
			f7.setFilterInfoProducer(oufip);
		}

    /**
     * output storeFields method
     */
    public void storeFields()
    {
		dataBinder.storeFields();
    }

	/**
	 * ????????งต??
	 */
	protected void registerValidator() {
    	getValidateHelper().setCustomValidator( getValidator() );
		getValidateHelper().registerBindProperty("IsFull", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("isSealUp", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("name", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("number", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("simpleName", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("description", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("RoomNumber", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("RoomClassification", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("RoomType", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("DormitoryType", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("OccupantsNumber", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("OccupancyCapacity", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("Remarks", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("state", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("waterprice", ValidateHelper.ON_SAVE);    
		getValidateHelper().registerBindProperty("electricityprice", ValidateHelper.ON_SAVE);    		
	}



    /**
     * output setOprtState method
     */
    public void setOprtState(String oprtType)
    {
        super.setOprtState(oprtType);
        if (STATUS_ADDNEW.equals(this.oprtState)) {
		            this.txtName.setEnabled(true);
		            this.txtDescription.setEnabled(true);
		            this.txtNumber.setEnabled(true);
		            this.txtSimpleName.setEnabled(true);
        } else if (STATUS_EDIT.equals(this.oprtState)) {
		            this.txtName.setEnabled(true);
		            this.txtDescription.setEnabled(true);
		            this.txtNumber.setEnabled(true);
		            this.txtSimpleName.setEnabled(true);
        } else if (STATUS_VIEW.equals(this.oprtState)) {
		            this.txtName.setEnabled(false);
		            this.txtDescription.setEnabled(false);
		            this.txtNumber.setEnabled(false);
		            this.txtSimpleName.setEnabled(false);
        }
    }

    /**
     * output getSelectors method
     */
    public SelectorItemCollection getSelectors()
    {
        SelectorItemCollection sic = new SelectorItemCollection();
		String selectorAll = System.getProperty("selector.all");
		if(StringUtils.isEmpty(selectorAll)){
			selectorAll = "true";
		}
        sic.add(new SelectorItemInfo("IsFull"));
        sic.add(new SelectorItemInfo("isSealUp"));
        sic.add(new SelectorItemInfo("name"));
        sic.add(new SelectorItemInfo("number"));
        sic.add(new SelectorItemInfo("simpleName"));
        sic.add(new SelectorItemInfo("description"));
        sic.add(new SelectorItemInfo("RoomNumber"));
        sic.add(new SelectorItemInfo("RoomClassification"));
		if(selectorAll.equalsIgnoreCase("true"))
		{
			sic.add(new SelectorItemInfo("RoomType.*"));
		}
		else{
        	sic.add(new SelectorItemInfo("RoomType.id"));
        	sic.add(new SelectorItemInfo("RoomType.number"));
        	sic.add(new SelectorItemInfo("RoomType.name"));
		}
		if(selectorAll.equalsIgnoreCase("true"))
		{
			sic.add(new SelectorItemInfo("DormitoryType.*"));
		}
		else{
        	sic.add(new SelectorItemInfo("DormitoryType.id"));
        	sic.add(new SelectorItemInfo("DormitoryType.number"));
        	sic.add(new SelectorItemInfo("DormitoryType.name"));
		}
        sic.add(new SelectorItemInfo("OccupantsNumber"));
        sic.add(new SelectorItemInfo("OccupancyCapacity"));
        sic.add(new SelectorItemInfo("Remarks"));
        sic.add(new SelectorItemInfo("state"));
        sic.add(new SelectorItemInfo("waterprice"));
        sic.add(new SelectorItemInfo("electricityprice"));
        return sic;
    }        

    /**
     * output getMetaDataPK method
     */
    public IMetaDataPK getMetaDataPK()
    {
        return new MetaDataPK("com.kingdee.eas.custom.dormitorysystem.dormitory.client", "DormitoryEditUI");
    }

    /**
     * output getEditUIName method
     */
    protected String getEditUIName()
    {
        return com.kingdee.eas.custom.dormitorysystem.dormitory.client.DormitoryEditUI.class.getName();
    }

    /**
     * output getBizInterface method
     */
    protected com.kingdee.eas.framework.ICoreBase getBizInterface() throws Exception
    {
        return com.kingdee.eas.custom.dormitorysystem.dormitory.DormitoryFactory.getRemoteInstance();
    }

    /**
     * output createNewData method
     */
    protected IObjectValue createNewData()
    {
        com.kingdee.eas.custom.dormitorysystem.dormitory.DormitoryInfo objectValue = new com.kingdee.eas.custom.dormitorysystem.dormitory.DormitoryInfo();
        objectValue.setCreator((com.kingdee.eas.base.permission.UserInfo)(com.kingdee.eas.common.client.SysContext.getSysContext().getCurrentUser()));		
        return objectValue;
    }



    /**
     * output getDetailTable method
     */
    protected KDTable getDetailTable() {        
        return null;
	}
    /**
     * output applyDefaultValue method
     */
    protected void applyDefaultValue(IObjectValue vo) {        
		vo.put("RoomClassification","0");
vo.put("state",new Integer(1));
        
    }        
	protected void setFieldsNull(com.kingdee.bos.dao.AbstractObjectValue arg0) {
		super.setFieldsNull(arg0);
		arg0.put("number",null);
	}

}