//#############################################################################
//#                                                                           #
//#  Copyright (C) <2015>  <IMS MAXIMS>                                       #
//#                                                                           #
//#  This program is free software: you can redistribute it and/or modify     #
//#  it under the terms of the GNU Affero General Public License as           #
//#  published by the Free Software Foundation, either version 3 of the       #
//#  License, or (at your option) any later version.                          # 
//#                                                                           #
//#  This program is distributed in the hope that it will be useful,          #
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of           #
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
//#  GNU Affero General Public License for more details.                      #
//#                                                                           #
//#  You should have received a copy of the GNU Affero General Public License #
//#  along with this program.  If not, see <http://www.gnu.org/licenses/>.    #
//#                                                                           #
//#  IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of    #
//#  this program.  Users of this software do so entirely at their own risk.  #
//#  IMS MAXIMS only ensures the Clinical Safety of unaltered run-time        #
//#  software that it builds, deploys and maintains.                          #
//#                                                                           #
//#############################################################################
//#EOH
// This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814)
// Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved.
// WARNING: DO NOT MODIFY the content of this file
package ims.pci.forms.gpcontracts;
import ims.framework.*;
import ims.framework.controls.*;
import ims.framework.enumerations.*;
import ims.framework.utils.RuntimeAnchoring;
public class GenForm extends FormBridge
{
	private static final long serialVersionUID = 1L;
	public boolean canProvideData(IReportSeed[] reportSeeds)
	{
		return new ReportDataProvider(reportSeeds, this.getFormReportFields()).canProvideData();
	}
	public boolean hasData(IReportSeed[] reportSeeds)
	{
		return new ReportDataProvider(reportSeeds, this.getFormReportFields()).hasData();
	}
	public IReportField[] getData(IReportSeed[] reportSeeds)
	{
		return getData(reportSeeds, false);
	}
	public IReportField[] getData(IReportSeed[] reportSeeds, boolean excludeNulls)
	{
		return new ReportDataProvider(reportSeeds, this.getFormReportFields(), excludeNulls).getData();
	}
	public static class ctnContractDetailsContainer extends ContainerBridge
	{
		private static final long serialVersionUID = 1L;
		public static class qmbGPSelectedComboBox extends ComboBoxBridge
		{
			private static final long serialVersionUID = 1L;
			
			public void newRow(ims.core.vo.GpLiteWithNameVo value, String text)
			{
				super.control.newRow(value, text);
			}
			public void newRow(ims.core.vo.GpLiteWithNameVo value, String text, ims.framework.utils.Image image)
			{
				super.control.newRow(value, text, image);
			}
			public void newRow(ims.core.vo.GpLiteWithNameVo value, String text, ims.framework.utils.Color textColor)
			{
				super.control.newRow(value, text, textColor);
			}
			public void newRow(ims.core.vo.GpLiteWithNameVo value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor)
			{
				super.control.newRow(value, text, image, textColor);
			}
			public boolean removeRow(ims.core.vo.GpLiteWithNameVo value)
			{
				return super.control.removeRow(value);
			}
			public ims.core.vo.GpLiteWithNameVo getValue()
			{
				return (ims.core.vo.GpLiteWithNameVo)super.control.getValue();
			}
			public void setValue(ims.core.vo.GpLiteWithNameVo value)
			{
				super.control.setValue(value);
			}
			public void setEditedText(String text)
			{
				super.control.setEditedText(text);
			}
			public String getEditedText()
			{
				return super.control.getEditedText();
			}
		}
		protected void setContext(Form form, ims.framework.interfaces.IAppForm appForm, Control control, FormLoader loader, Images form_images_local, ContextMenus contextMenus, Integer startControlID, ims.framework.utils.SizeInfo designSize, ims.framework.utils.SizeInfo runtimeSize, Integer startTabIndex, boolean skipContextValidation) throws Exception
		{
			if(form == null)
				throw new RuntimeException("Invalid form");
			if(appForm == null)
				throw new RuntimeException("Invalid application form");
			if(control == null); // this is to avoid eclipse warning only.
			if(loader == null); // this is to avoid eclipse warning only.
			if(form_images_local == null); // this is to avoid eclipse warning only.
			if(contextMenus == null); // this is to avoid eclipse warning only.
			if(startControlID == null)
				throw new RuntimeException("Invalid startControlID");
			if(designSize == null); // this is to avoid eclipse warning only.
			if(runtimeSize == null); // this is to avoid eclipse warning only.
			if(startTabIndex == null)
				throw new RuntimeException("Invalid startTabIndex");
	
	
			// Label Controls
			RuntimeAnchoring anchoringHelper1 = new RuntimeAnchoring(designSize, runtimeSize, 16, 50, 75, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
			super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1000), new Integer(anchoringHelper1.getX()), new Integer(anchoringHelper1.getY()), new Integer(anchoringHelper1.getWidth()), new Integer(anchoringHelper1.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Contract ID:", new Integer(1), null, new Integer(0)}));
			RuntimeAnchoring anchoringHelper2 = new RuntimeAnchoring(designSize, runtimeSize, 16, 18, 61, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
			super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1001), new Integer(anchoringHelper2.getX()), new Integer(anchoringHelper2.getY()), new Integer(anchoringHelper2.getWidth()), new Integer(anchoringHelper2.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "GP Name:", new Integer(1), null, new Integer(0)}));
			RuntimeAnchoring anchoringHelper3 = new RuntimeAnchoring(designSize, runtimeSize, 512, 18, 119, 17, ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
			super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1002), new Integer(anchoringHelper3.getX()), new Integer(anchoringHelper3.getY()), new Integer(anchoringHelper3.getWidth()), new Integer(anchoringHelper3.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPRIGHT, "Contract Start Date:", new Integer(1), null, new Integer(0)}));
			RuntimeAnchoring anchoringHelper4 = new RuntimeAnchoring(designSize, runtimeSize, 512, 50, 112, 17, ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
			super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1003), new Integer(anchoringHelper4.getX()), new Integer(anchoringHelper4.getY()), new Integer(anchoringHelper4.getWidth()), new Integer(anchoringHelper4.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPRIGHT, "Contract End Date:", new Integer(1), null, new Integer(0)}));
	
			// TextBox Controls
			RuntimeAnchoring anchoringHelper5 = new RuntimeAnchoring(designSize, runtimeSize, 96, 48, 392, 21, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
			super.addControl(factory.getControl(TextBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1004), new Integer(anchoringHelper5.getX()), new Integer(anchoringHelper5.getY()), new Integer(anchoringHelper5.getWidth()), new Integer(anchoringHelper5.getHeight()), new Integer(startTabIndex.intValue() + 8), ControlState.DISABLED, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,Boolean.FALSE, new Integer(50), Boolean.TRUE, Boolean.FALSE, null, null, Boolean.TRUE, ims.framework.enumerations.CharacterCasing.NORMAL, ims.framework.enumerations.TextTrimming.NONE, "", ""}));
	
			// Date Controls
			RuntimeAnchoring anchoringHelper6 = new RuntimeAnchoring(designSize, runtimeSize, 640, 48, 176, 20, ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
			super.addControl(factory.getControl(DateControl.class, new Object[] { control, new Integer(startControlID.intValue() + 1005), new Integer(anchoringHelper6.getX()), new Integer(anchoringHelper6.getY()), new Integer(anchoringHelper6.getWidth()), new Integer(anchoringHelper6.getHeight()), new Integer(startTabIndex.intValue() + 10), ControlState.DISABLED, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.TOPRIGHT,Boolean.TRUE, null, Boolean.FALSE, null, Boolean.FALSE, null}));
			RuntimeAnchoring anchoringHelper7 = new RuntimeAnchoring(designSize, runtimeSize, 640, 16, 176, 20, ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
			super.addControl(factory.getControl(DateControl.class, new Object[] { control, new Integer(startControlID.intValue() + 1006), new Integer(anchoringHelper7.getX()), new Integer(anchoringHelper7.getY()), new Integer(anchoringHelper7.getWidth()), new Integer(anchoringHelper7.getHeight()), new Integer(startTabIndex.intValue() + 9), ControlState.DISABLED, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.TOPRIGHT,Boolean.TRUE, null, Boolean.FALSE, null, Boolean.TRUE, null}));
	
			// Query ComboBox Controls
			RuntimeAnchoring anchoringHelper8 = new RuntimeAnchoring(designSize, runtimeSize, 96, 16, 392, 21, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
			ComboBox m_qmbGPSelectedTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1007), new Integer(anchoringHelper8.getX()), new Integer(anchoringHelper8.getY()), new Integer(anchoringHelper8.getWidth()), new Integer(anchoringHelper8.getHeight()), new Integer(startTabIndex.intValue() + 7), ControlState.DISABLED, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,Boolean.TRUE, Boolean.TRUE, SortOrder.NONE, Boolean.TRUE, new Integer(3), null, Boolean.TRUE, new Integer(-1), Boolean.FALSE});
			addControl(m_qmbGPSelectedTemp);
			qmbGPSelectedComboBox qmbGPSelected = (qmbGPSelectedComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(qmbGPSelectedComboBox.class, m_qmbGPSelectedTemp);
			super.addComboBox(qmbGPSelected);
		}
		protected void setCollapsed(boolean value)
		{
			super.container.setCollapsed(value);
		}
		//protected boolean isCollapsed()
		//{
			//return super.container.isCollapsed();
		//}
		protected void setCaption(String value)
		{
			super.container.setCaption(value);
		}
		public TextBox txtContractID()
		{
			return (TextBox)super.getControl(4);
		}
		public DateControl dteEndDate()
		{
			return (DateControl)super.getControl(5);
		}
		public DateControl dteStartDate()
		{
			return (DateControl)super.getControl(6);
		}
		public qmbGPSelectedComboBox qmbGPSelected()
		{
			return (qmbGPSelectedComboBox)super.getComboBox(0);
		}
	}
	public static class qmbGPSearchComboBox extends ComboBoxBridge
	{
		private static final long serialVersionUID = 1L;
		
		public void newRow(ims.core.vo.GpLiteWithNameVo value, String text)
		{
			super.control.newRow(value, text);
		}
		public void newRow(ims.core.vo.GpLiteWithNameVo value, String text, ims.framework.utils.Image image)
		{
			super.control.newRow(value, text, image);
		}
		public void newRow(ims.core.vo.GpLiteWithNameVo value, String text, ims.framework.utils.Color textColor)
		{
			super.control.newRow(value, text, textColor);
		}
		public void newRow(ims.core.vo.GpLiteWithNameVo value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor)
		{
			super.control.newRow(value, text, image, textColor);
		}
		public boolean removeRow(ims.core.vo.GpLiteWithNameVo value)
		{
			return super.control.removeRow(value);
		}
		public ims.core.vo.GpLiteWithNameVo getValue()
		{
			return (ims.core.vo.GpLiteWithNameVo)super.control.getValue();
		}
		public void setValue(ims.core.vo.GpLiteWithNameVo value)
		{
			super.control.setValue(value);
		}
		public void setEditedText(String text)
		{
			super.control.setEditedText(text);
		}
		public String getEditedText()
		{
			return super.control.getEditedText();
		}
	}
	public static class grdResultGridRow extends GridRowBridge
	{
		private static final long serialVersionUID = 1L;
		
		protected grdResultGridRow(GridRow row)
		{
			super(row);
		}
		public void showOpened(int column)
		{
			super.row.showOpened(column);
		}
		public void setColGPReadOnly(boolean value)
		{
			super.row.setReadOnly(0, value);
		}
		public boolean isColGPReadOnly()
		{
			return super.row.isReadOnly(0);
		}
		public void showColGPOpened()
		{
			super.row.showOpened(0);
		}
		public String getColGP()
		{
			return (String)super.row.get(0);
		}
		public void setColGP(String value)
		{
			super.row.set(0, value);
		}
		public void setCellColGPTooltip(String value)
		{
			super.row.setTooltip(0, value);
		}
		public void setColContractIDReadOnly(boolean value)
		{
			super.row.setReadOnly(1, value);
		}
		public boolean isColContractIDReadOnly()
		{
			return super.row.isReadOnly(1);
		}
		public void showColContractIDOpened()
		{
			super.row.showOpened(1);
		}
		public String getColContractID()
		{
			return (String)super.row.get(1);
		}
		public void setColContractID(String value)
		{
			super.row.set(1, value);
		}
		public void setCellColContractIDTooltip(String value)
		{
			super.row.setTooltip(1, value);
		}
		public void setColStartDateReadOnly(boolean value)
		{
			super.row.setReadOnly(2, value);
		}
		public boolean isColStartDateReadOnly()
		{
			return super.row.isReadOnly(2);
		}
		public void showColStartDateOpened()
		{
			super.row.showOpened(2);
		}
		public String getColStartDate()
		{
			return (String)super.row.get(2);
		}
		public void setColStartDate(String value)
		{
			super.row.set(2, value);
		}
		public void setCellColStartDateTooltip(String value)
		{
			super.row.setTooltip(2, value);
		}
		public void setColEndDateReadOnly(boolean value)
		{
			super.row.setReadOnly(3, value);
		}
		public boolean isColEndDateReadOnly()
		{
			return super.row.isReadOnly(3);
		}
		public void showColEndDateOpened()
		{
			super.row.showOpened(3);
		}
		public String getColEndDate()
		{
			return (String)super.row.get(3);
		}
		public void setColEndDate(String value)
		{
			super.row.set(3, value);
		}
		public void setCellColEndDateTooltip(String value)
		{
			super.row.setTooltip(3, value);
		}
		public ims.pci.vo.GpContractVo getValue()
		{
			return (ims.pci.vo.GpContractVo)super.row.getValue();
		}
		public void setValue(ims.pci.vo.GpContractVo value)
		{
			super.row.setValue(value);
		}
	}
	public static class grdResultGridRowCollection extends GridRowCollectionBridge
	{
		private static final long serialVersionUID = 1L;
		
		private grdResultGridRowCollection(GridRowCollection collection)
		{
			super(collection);
		}
		public grdResultGridRow get(int index)
		{
			return new grdResultGridRow(super.collection.get(index));
		}
		public grdResultGridRow newRow()
		{
			return new grdResultGridRow(super.collection.newRow());
		}
		public grdResultGridRow newRow(boolean autoSelect)
		{
			return new grdResultGridRow(super.collection.newRow(autoSelect));
		}
		public grdResultGridRow newRowAt(int index)
		{
			return new grdResultGridRow(super.collection.newRowAt(index));
		}
		public grdResultGridRow newRowAt(int index, boolean autoSelect)
		{
			return new grdResultGridRow(super.collection.newRowAt(index, autoSelect));
		}
	}
	public static class grdResultGridGrid extends GridBridge
	{
		private static final long serialVersionUID = 1L;
		
		private void addStringColumn(String caption, int captionAlignment, int alignment, int width, boolean readOnly, boolean bold, int sortOrder, int maxLength, boolean canGrow, ims.framework.enumerations.CharacterCasing casing)
		{
			super.grid.addStringColumn(caption, captionAlignment, alignment, width, readOnly, bold, sortOrder, maxLength, canGrow, casing);
		}
		public ims.pci.vo.GpContractVoCollection getValues()
		{
			ims.pci.vo.GpContractVoCollection listOfValues = new ims.pci.vo.GpContractVoCollection();
			for(int x = 0; x < this.getRows().size(); x++)
			{
				listOfValues.add(this.getRows().get(x).getValue());
			}
			return listOfValues;
		}
		public ims.pci.vo.GpContractVo getValue()
		{
			return (ims.pci.vo.GpContractVo)super.grid.getValue();
		}
		public void setValue(ims.pci.vo.GpContractVo value)
		{
			super.grid.setValue(value);
		}
		public grdResultGridRow getSelectedRow()
		{
			return super.grid.getSelectedRow() == null ? null : new grdResultGridRow(super.grid.getSelectedRow());
		}
		public int getSelectedRowIndex()
		{
			return super.grid.getSelectedRowIndex();
		}
		public grdResultGridRowCollection getRows()
		{
			return new grdResultGridRowCollection(super.grid.getRows());
		}
		public grdResultGridRow getRowByValue(ims.pci.vo.GpContractVo value)
		{
			GridRow row = super.grid.getRowByValue(value);
			return row == null?null:new grdResultGridRow(row);
		}
		public void setColGPHeaderTooltip(String value)
		{
			super.grid.setColumnHeaderTooltip(0, value);
		}
		public String getColGPHeaderTooltip()
		{
			return super.grid.getColumnHeaderTooltip(0);
		}
		public void setColContractIDHeaderTooltip(String value)
		{
			super.grid.setColumnHeaderTooltip(1, value);
		}
		public String getColContractIDHeaderTooltip()
		{
			return super.grid.getColumnHeaderTooltip(1);
		}
		public void setColStartDateHeaderTooltip(String value)
		{
			super.grid.setColumnHeaderTooltip(2, value);
		}
		public String getColStartDateHeaderTooltip()
		{
			return super.grid.getColumnHeaderTooltip(2);
		}
		public void setColEndDateHeaderTooltip(String value)
		{
			super.grid.setColumnHeaderTooltip(3, value);
		}
		public String getColEndDateHeaderTooltip()
		{
			return super.grid.getColumnHeaderTooltip(3);
		}
	}
	private void validateContext(ims.framework.Context context)
	{
		if(context == null)
			return;
	}
	public boolean supportsRecordedInError()
	{
		return false;
	}
	public ims.vo.ValueObject getRecordedInErrorVo()
	{
		return null;
	}
	protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, Context context) throws Exception
	{
		setContext(loader, form, appForm, factory, context, Boolean.FALSE, new Integer(0), null, null, new Integer(0));
	}
	protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, Context context, Boolean skipContextValidation) throws Exception
	{
		setContext(loader, form, appForm, factory, context, skipContextValidation, new Integer(0), null, null, new Integer(0));
	}
	protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, ims.framework.Context context, Boolean skipContextValidation, Integer startControlID, ims.framework.utils.SizeInfo runtimeSize, ims.framework.Control control, Integer startTabIndex) throws Exception
	{
		if(loader == null); // this is to avoid eclipse warning only.
		if(factory == null); // this is to avoid eclipse warning only.
		if(runtimeSize == null); // this is to avoid eclipse warning only.
		if(appForm == null)
			throw new RuntimeException("Invalid application form");
		if(startControlID == null)
			throw new RuntimeException("Invalid startControlID");
		if(control == null); // this is to avoid eclipse warning only.
		if(startTabIndex == null)
			throw new RuntimeException("Invalid startTabIndex");
		this.context = context;
		this.componentIdentifier = startControlID.toString();
		this.formInfo = form.getFormInfo();
		this.globalContext = new GlobalContext(context);
	
		if(skipContextValidation == null || !skipContextValidation.booleanValue())
		{
			validateContext(context);
		}
	
		super.setContext(form);
		ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(848, 632);
		if(runtimeSize == null)
			runtimeSize = designSize;
		form.setWidth(runtimeSize.getWidth());
		form.setHeight(runtimeSize.getHeight());
		super.setFormReferences(FormReferencesFlyweightFactory.getInstance().create(Forms.class));
		super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
		super.setGlobalContext(ContextBridgeFlyweightFactory.getInstance().create(GlobalContextBridge.class, context, false));
		super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));
		// Context Menus


Answer: 		contextMenus = new ContextMenus();