package WindowTester;
import DisplayProject.CloseHideAdaptor;
import DisplayProject.Constants;
import DisplayProject.CursorMgr;
import DisplayProject.DataField;
import DisplayProject.GridField;
import DisplayProject.UDSWindow;
import DisplayProject.UIutils;
import DisplayProject.WindowManager;
import DisplayProject.WindowUsageMap;
import DisplayProject.actions.DateTemplate;
import DisplayProject.actions.HeightPolicy;
import DisplayProject.actions.UserWindow;
import DisplayProject.actions.WidthPolicy;
import DisplayProject.binding.BindingManager;
import DisplayProject.binding.beans.ExtendedPropertyChangeSupport;
import DisplayProject.binding.beans.Observable;
import DisplayProject.controls.TextGraphic;
import DisplayProject.events.ClientEventManager;
import DisplayProject.factory.CompoundFieldFactory;
import DisplayProject.factory.DataFieldFactory;
import DisplayProject.factory.GraphicFactory;
import DisplayProject.factory.PushButtonFactory;
import DisplayProject.plaf.Win32LookAndFeel;
import Framework.DateTimeData;
import Framework.DateTimeNullable;
import Framework.ErrorMgr;
import Framework.EventHandle;
import Framework.EventManager;
import Framework.EventRegistration;
import Framework.File;
import Framework.ForteKeyboardFocusManager;
import Framework.RuntimeProperties;
import Framework.UsageException;
import WindowTester.ClassWithDate;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.KeyboardFocusManager;
import java.awt.Window;
import java.awt.event.ComponentListener;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.lang.String;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.ToolTipManager;
import javax.swing.UIManager;
import org.apache.log4j.Logger;
/**
* MappedDateTimeNullable<p>
* <p>
* @author Generated from Forte
* @since 19-Nov-2008
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@UDSWindow()
@SuppressWarnings("serial")
public class MappedDateTimeNullable
extends JFrame
implements Serializable, Observable
{
// ----------
// Attributes
// ----------
protected File DefaultHelpFile;
protected BindingManager bindingManager = null;
public PropertyChangeSupport qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
private DateTimeNullable theDate;
private DateTimeData theDateNotNull;
private DateTimeNullable theDate2;
private DateTimeData theDate3;
private ClassWithDate myMap;
// ------------
// Constructors
// ------------
public MappedDateTimeNullable() {
// Explicitly call the superclass constructor to prevent the implicit call
super();
this.initialize();
this.setMyMap(new ClassWithDate());
this.setTheDate(new DateTimeNullable(true, DateTimeNullable.qq_Resolver.cISNULL));
this.setTheDateNotNull(new DateTimeData());
this.setTheDate2(new DateTimeNullable());
this.setTheDate3(new DateTimeData());
}
// ----------------------
// Accessors and Mutators
// ----------------------
public File getDefaultHelpFile() {
return DefaultHelpFile;
}
public void setDefaultHelpFile(File defaultHelpFile) {
DefaultHelpFile = defaultHelpFile;
UserWindow.createHelp(this, defaultHelpFile);
}
public void setHelpURL(String urlString) {
try {
URL url = new URL(urlString);
UserWindow.createHelp(this, url);
} catch (MalformedURLException e) {
UsageException err = new UsageException("Cannot create help URL", e);
ErrorMgr.addError(err);
throw err;
}
}
protected BindingManager getBindingManager() {
if (this.bindingManager == null) {
this.bindingManager = new BindingManager(this);
}
return bindingManager;
}
public void setTheDate(DateTimeNullable theDate) {
DateTimeNullable oldValue = this.theDate;
this.theDate = theDate;
this.qq_Listeners.firePropertyChange("theDate", oldValue, this.theDate);
}
public DateTimeNullable getTheDate() {
return this.theDate;
}
public void setTheDateNotNull(DateTimeData theDateNotNull) {
DateTimeData oldValue = this.theDateNotNull;
this.theDateNotNull = theDateNotNull;
this.qq_Listeners.firePropertyChange("theDateNotNull", oldValue, this.theDateNotNull);
}
public DateTimeData getTheDateNotNull() {
return this.theDateNotNull;
}
public void setTheDate2(DateTimeNullable theDate2) {
DateTimeNullable oldValue = this.theDate2;
this.theDate2 = theDate2;
this.qq_Listeners.firePropertyChange("theDate2", oldValue, this.theDate2);
}
public DateTimeNullable getTheDate2() {
return this.theDate2;
}
public void setTheDate3(DateTimeData theDate3) {
DateTimeData oldValue = this.theDate3;
this.theDate3 = theDate3;
this.qq_Listeners.firePropertyChange("theDate3", oldValue, this.theDate3);
}
public DateTimeData getTheDate3() {
return this.theDate3;
}
public void setMyMap(ClassWithDate myMap) {
ClassWithDate oldValue = this.myMap;
this.myMap = myMap;
this.qq_Listeners.firePropertyChange("myMap", oldValue, this.myMap);
}
public ClassWithDate getMyMap() {
return this.myMap;
}
// -------
// Methods
// -------
public void addPropertyChangeListener(String property, PropertyChangeListener listener) {
qq_Listeners.addPropertyChangeListener(property, listener);
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
qq_Listeners.addPropertyChangeListener(listener);
}
public void removePropertyChangeListener(String property, PropertyChangeListener listener) {
qq_Listeners.removePropertyChangeListener(property, listener);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
qq_Listeners.removePropertyChangeListener(listener);
}
/**
* display<p>
* <p>
*/
public void display() {
UserWindow.open(this);
// ----------
// Event Loop
// ----------
EventManager.startEventLoop();
try {
EventRegistration PushButton_Click_getqq_PrintBtn = ClientEventManager.register( this.getqq_PrintBtn(), "Click" );
EventRegistration PushButton_Click_getqq_CancelBtn = ClientEventManager.register( this.getqq_CancelBtn(), "Click" );
EventRegistration TaskHandle_Shutdown_langThreadcurrentThread = ClientEventManager.register( Thread.currentThread(), "Shutdown" );
while (true) {
UIutils.processGUIActions();
EventHandle qq_currentEvent = EventManager.waitForEvent();
if (qq_currentEvent == null)
break;
// ---------------------
// self.<printBtn>.Click
// ---------------------
if (qq_currentEvent.isEvent(PushButton_Click_getqq_PrintBtn)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info(this.getTheDate());
Logger.getLogger("task.part.logmgr").info(this.getMyMap().getMyDate());
Logger.getLogger("task.part.logmgr").info(this.getTheDateNotNull());
Logger.getLogger("task.part.logmgr").info(this.getTheDate2());
Logger.getLogger("task.part.logmgr").info(this.getTheDate3());
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ----------------------
// self.<CancelBtn>.Click
// ----------------------
else if (qq_currentEvent.isEvent(PushButton_Click_getqq_CancelBtn)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
break;
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// -------------
// task.Shutdown
// -------------
else if (qq_currentEvent.isEvent(TaskHandle_Shutdown_langThreadcurrentThread)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
break;
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
}
EventManager.deregister( PushButton_Click_getqq_PrintBtn );
EventManager.deregister( PushButton_Click_getqq_CancelBtn );
EventManager.deregister( TaskHandle_Shutdown_langThreadcurrentThread );
}
//catch (Exception qq_error) {
//Logger.getLogger("task.part.Event").error("Event loop terminated by unhandled exception: " + qq_error.getMessage(), qq_error );
//throw qq_error;
//}
finally {
EventManager.endEventLoop();
UserWindow.close(this);
}
}
// ------------------
// Window Definitions
// ------------------
// <editor-fold defaultstate="collapsed" desc="Window Definitions">
private int qq_defaultSet = 1;
private int qq_msgNumber = 0;
private int qq_msgSet = 0;
protected Window primaryWindow = null;
protected int initialX;
protected int initialY;
protected int qq_SystemClosePolicy = Constants.SC_ENABLEDSHUTDOWN;
protected int qq_initialPositionPolicy = Constants.PP_SYSTEMDEFAULT;
public DataField qq_MyMap_MyDate;
public DataField qq_theDate2;
public DataField qq_theDate3;
public DataField qq_theDate;
public DataField qq_theDateNotNull;
public GridField qq_MyMap;
public JButton qq_CancelBtn;
public JButton qq_PrintBtn;
public JPanel Form;
public TextGraphic qq_DateFieldLbl1;
public TextGraphic qq_DateFieldLbl;
public TextGraphic qq_DateFieldNotNullableLbl1;
public TextGraphic qq_DateFieldNotNullableLbl;
public TextGraphic qq_MappedDateLbl;
/**
* qq_theDate: transformed from: qqds_DataField
* TagId=12
* isInherited=FALSE
*/
public DataField getqq_theDate() {
if (qq_theDate == null) {
// Mask type: MK_TEMPLATE
// original Forte format string -->dd/mm/yyyy<--
qq_theDate = DataFieldFactory.newDataField("theDate", 10, DateTimeNullable.class);
DateTemplate.set(qq_theDate, "dd/mm/yyyy", DateTimeNullable.class);
qq_theDate.setOriginalFormatText("dd/mm/yyyy");
qq_theDate.setHorizontalAlignment(JTextField.LEFT);
getBindingManager().bindComponent(qq_theDate, "theDate");
WidthPolicy.set(qq_theDate, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_theDate, Constants.SP_NATURAL);
qq_theDate.setMinimumSize(new Dimension(77, 19));
qq_theDate.setSize(new Dimension(77, 19));
qq_theDate.setLocation(76, 28);
}
return qq_theDate;
}
public void setqq_theDate(DataField value) {
DataField oldValue = qq_theDate;
qq_theDate = value;
this.qq_Listeners.firePropertyChange("qq_theDate", oldValue, value);
}
/**
* qq_DateFieldLbl: transformed from: qqds_TextGraphic
* TagId=13
* isInherited=FALSE
*/
public TextGraphic getqq_DateFieldLbl() {
if (qq_DateFieldLbl == null) {
qq_DateFieldLbl = GraphicFactory.newTextGraphic("Date Field:\n", "");
// OPTIONAL UIutils.reloadLabelText(qq_DateFieldLbl, mcat);
WidthPolicy.set(qq_DateFieldLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_DateFieldLbl, Constants.SP_NATURAL);
qq_DateFieldLbl.setMinimumSize(new Dimension(57, 16));
qq_DateFieldLbl.setLocation(12, 29);
}
return qq_DateFieldLbl;
}
public void setqq_DateFieldLbl(TextGraphic value) {
TextGraphic oldValue = qq_DateFieldLbl;
qq_DateFieldLbl = value;
this.qq_Listeners.firePropertyChange("qq_DateFieldLbl", oldValue, value);
}
/**
* qq_DateFieldNotNullableLbl: transformed from: qqds_TextGraphic
* TagId=14
* isInherited=FALSE
*/
public TextGraphic getqq_DateFieldNotNullableLbl() {
if (qq_DateFieldNotNullableLbl == null) {
qq_DateFieldNotNullableLbl = GraphicFactory.newTextGraphic("Date Field (not nullable):\n", "");
qq_DateFieldNotNullableLbl.setHorizontalAlignment( SwingConstants.LEFT );
// OPTIONAL UIutils.reloadLabelText(qq_DateFieldNotNullableLbl, mcat);
WidthPolicy.set(qq_DateFieldNotNullableLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_DateFieldNotNullableLbl, Constants.SP_NATURAL);
qq_DateFieldNotNullableLbl.setMinimumSize(new Dimension(124, 16));
qq_DateFieldNotNullableLbl.setLocation(28, 102);
}
return qq_DateFieldNotNullableLbl;
}
public void setqq_DateFieldNotNullableLbl(TextGraphic value) {
TextGraphic oldValue = qq_DateFieldNotNullableLbl;
qq_DateFieldNotNullableLbl = value;
this.qq_Listeners.firePropertyChange("qq_DateFieldNotNullableLbl", oldValue, value);
}
/**
* qq_DateFieldLbl1: transformed from: qqds_TextGraphic
* TagId=15
* isInherited=FALSE
*/
public TextGraphic getqq_DateFieldLbl1() {
if (qq_DateFieldLbl1 == null) {
qq_DateFieldLbl1 = GraphicFactory.newTextGraphic("Date Field:\n", "");
// OPTIONAL UIutils.reloadLabelText(qq_DateFieldLbl1, mcat);
WidthPolicy.set(qq_DateFieldLbl1, Constants.SP_NATURAL);
HeightPolicy.set(qq_DateFieldLbl1, Constants.SP_NATURAL);
qq_DateFieldLbl1.setMinimumSize(new Dimension(57, 16));
qq_DateFieldLbl1.setLocation(28, 139);
}
return qq_DateFieldLbl1;
}
public void setqq_DateFieldLbl1(TextGraphic value) {
TextGraphic oldValue = qq_DateFieldLbl1;
qq_DateFieldLbl1 = value;
this.qq_Listeners.firePropertyChange("qq_DateFieldLbl1", oldValue, value);
}
/**
* qq_theDateNotNull: transformed from: qqds_DataField
* TagId=16
* isInherited=FALSE
*/
public DataField getqq_theDateNotNull() {
if (qq_theDateNotNull == null) {
// Mask type: MK_TEMPLATE
// original Forte format string -->dd/mm/yyyy<--
qq_theDateNotNull = DataFieldFactory.newDataField("theDateNotNull", 10, DateTimeData.class);
DateTemplate.set(qq_theDateNotNull, "dd/mm/yyyy", DateTimeData.class);
qq_theDateNotNull.setOriginalFormatText("dd/mm/yyyy");
qq_theDateNotNull.setHorizontalAlignment(JTextField.LEFT);
getBindingManager().bindComponent(qq_theDateNotNull, "theDateNotNull");
WidthPolicy.set(qq_theDateNotNull, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_theDateNotNull, Constants.SP_NATURAL);
qq_theDateNotNull.setMinimumSize(new Dimension(77, 19));
qq_theDateNotNull.setSize(new Dimension(77, 19));
qq_theDateNotNull.setLocation(172, 100);
}
return qq_theDateNotNull;
}
public void setqq_theDateNotNull(DataField value) {
DataField oldValue = qq_theDateNotNull;
qq_theDateNotNull = value;
this.qq_Listeners.firePropertyChange("qq_theDateNotNull", oldValue, value);
}
/**
* qq_theDate2: transformed from: qqds_DataField
* TagId=17
* isInherited=FALSE
*/
public DataField getqq_theDate2() {
if (qq_theDate2 == null) {
// Mask type: MK_TEMPLATE
// original Forte format string -->dd-mmm-yyyy<--
qq_theDate2 = DataFieldFactory.newDataField("theDate2", 10, DateTimeNullable.class);
DateTemplate.set(qq_theDate2, "dd-mmm-yyyy", DateTimeNullable.class);
qq_theDate2.setOriginalFormatText("dd-mmm-yyyy");
qq_theDate2.setHorizontalAlignment(JTextField.LEFT);
getBindingManager().bindComponent(qq_theDate2, "theDate2");
WidthPolicy.set(qq_theDate2, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_theDate2, Constants.SP_NATURAL);
qq_theDate2.setMinimumSize(new Dimension(77, 19));
qq_theDate2.setSize(new Dimension(77, 19));
qq_theDate2.setLocation(110, 136);
}
return qq_theDate2;
}
public void setqq_theDate2(DataField value) {
DataField oldValue = qq_theDate2;
qq_theDate2 = value;
this.qq_Listeners.firePropertyChange("qq_theDate2", oldValue, value);
}
/**
* qq_theDate3: transformed from: qqds_DataField
* TagId=18
* isInherited=FALSE
*/
public DataField getqq_theDate3() {
if (qq_theDate3 == null) {
// Mask type: MK_TEMPLATE
// original Forte format string -->dd-mmm-yyyy<--
qq_theDate3 = DataFieldFactory.newDataField("theDate3", 10, DateTimeData.class);
DateTemplate.set(qq_theDate3, "dd-mmm-yyyy", DateTimeData.class);
qq_theDate3.setOriginalFormatText("dd-mmm-yyyy");
qq_theDate3.setHorizontalAlignment(JTextField.LEFT);
getBindingManager().bindComponent(qq_theDate3, "theDate3");
WidthPolicy.set(qq_theDate3, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_theDate3, Constants.SP_NATURAL);
qq_theDate3.setMinimumSize(new Dimension(77, 19));
qq_theDate3.setSize(new Dimension(77, 19));
qq_theDate3.setLocation(142, 168);
}
return qq_theDate3;
}
public void setqq_theDate3(DataField value) {
DataField oldValue = qq_theDate3;
qq_theDate3 = value;
this.qq_Listeners.firePropertyChange("qq_theDate3", oldValue, value);
}
/**
* qq_DateFieldNotNullableLbl1: transformed from: qqds_TextGraphic
* TagId=19
* isInherited=FALSE
*/
public TextGraphic getqq_DateFieldNotNullableLbl1() {
if (qq_DateFieldNotNullableLbl1 == null) {
qq_DateFieldNotNullableLbl1 = GraphicFactory.newTextGraphic("Date Field (not nullable):\n", "");
qq_DateFieldNotNullableLbl1.setHorizontalAlignment( SwingConstants.LEFT );
// OPTIONAL UIutils.reloadLabelText(qq_DateFieldNotNullableLbl1, mcat);
WidthPolicy.set(qq_DateFieldNotNullableLbl1, Constants.SP_NATURAL);
HeightPolicy.set(qq_DateFieldNotNullableLbl1, Constants.SP_NATURAL);
qq_DateFieldNotNullableLbl1.setMinimumSize(new Dimension(124, 16));
qq_DateFieldNotNullableLbl1.setLocation(15, 170);
}
return qq_DateFieldNotNullableLbl1;
}
public void setqq_DateFieldNotNullableLbl1(TextGraphic value) {
TextGraphic oldValue = qq_DateFieldNotNullableLbl1;
qq_DateFieldNotNullableLbl1 = value;
this.qq_Listeners.firePropertyChange("qq_DateFieldNotNullableLbl1", oldValue, value);
}
/**
* qq_MappedDateLbl: transformed from: qqds_TextGraphic
* TagId=21
* isInherited=FALSE
*/
public TextGraphic getqq_MappedDateLbl() {
if (qq_MappedDateLbl == null) {
qq_MappedDateLbl = GraphicFactory.newTextGraphic("Mapped Date:\n", "");
// OPTIONAL UIutils.reloadLabelText(qq_MappedDateLbl, mcat);
WidthPolicy.set(qq_MappedDateLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_MappedDateLbl, Constants.SP_NATURAL);
qq_MappedDateLbl.setMinimumSize(new Dimension(75, 16));
}
return qq_MappedDateLbl;
}
public void setqq_MappedDateLbl(TextGraphic value) {
TextGraphic oldValue = qq_MappedDateLbl;
qq_MappedDateLbl = value;
this.qq_Listeners.firePropertyChange("qq_MappedDateLbl", oldValue, value);
}
/**
* qq_MyMap_MyDate: transformed from: qqds_DataField
* TagId=22
* isInherited=FALSE
*/
public DataField getqq_MyMap_MyDate() {
if (qq_MyMap_MyDate == null) {
// Mask type: MK_TEMPLATE
// original Forte format string -->dd/mm/yyyy<--
qq_MyMap_MyDate = DataFieldFactory.newDataField("MyDate", 13, DateTimeNullable.class);
DateTemplate.set(qq_MyMap_MyDate, "dd/mm/yyyy", DateTimeNullable.class);
qq_MyMap_MyDate.setOriginalFormatText("dd/mm/yyyy");
qq_MyMap_MyDate.setHorizontalAlignment(JTextField.LEFT);
getBindingManager().bindComponent(qq_MyMap_MyDate, "myMap.myDate");
WidthPolicy.set(qq_MyMap_MyDate, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_MyMap_MyDate, Constants.SP_NATURAL);
qq_MyMap_MyDate.setMinimumSize(new Dimension(93, 19));
qq_MyMap_MyDate.setSize(new Dimension(93, 19));
}
return qq_MyMap_MyDate;
}
public void setqq_MyMap_MyDate(DataField value) {
DataField oldValue = qq_MyMap_MyDate;
qq_MyMap_MyDate = value;
this.qq_Listeners.firePropertyChange("qq_MyMap_MyDate", oldValue, value);
}
/**
* qq_MyMap: transformed from: qqds_GridField
* TagId=20
* isInherited=FALSE
* In forte this was a 2x1 grid field, displaying a ClassWithDate object.
* There are no cell margins set
* The width policy is set to Natural, and the height policy is set to Natural.
*/
protected void setqq_MyMapProperties() {
qq_MyMap.setCollapsed(true);
qq_MyMap.setHeightPolicy(Constants.SP_NATURAL);
qq_MyMap.setWidthPolicy(Constants.SP_NATURAL);
qq_MyMap.setBackground(null);
qq_MyMap.setLocation(10, 60);
}
public GridField getqq_MyMap() {
if (qq_MyMap == null) {
qq_MyMap = CompoundFieldFactory.newGridField("MyMap", false);
getBindingManager().bindComponent(qq_MyMap, "myMap");
setqq_MyMapProperties();
qq_MyMap.setMinimumSize(new Dimension(168, 19));
GridBagConstraints qq_gbc = new GridBagConstraints();
qq_gbc.gridx = 0; // Column 1
qq_gbc.gridy = 0; // Row 1
qq_gbc.weightx = 0;
qq_gbc.weighty = 0;
qq_gbc.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
qq_gbc.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
qq_MyMap.add( getqq_MappedDateLbl(), qq_gbc );
GridBagConstraints qq_gbc1 = new GridBagConstraints();
qq_gbc1.gridx = 1; // Column 2
qq_gbc1.gridy = 0; // Row 1
qq_gbc1.weightx = 0;
qq_gbc1.weighty = 0;
qq_gbc1.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
qq_gbc1.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc1.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
qq_MyMap.add( getqq_MyMap_MyDate(), qq_gbc1 );
}
return qq_MyMap;
}
public void setqq_MyMap(GridField value) {
GridField oldValue = qq_MyMap;
qq_MyMap = value;
this.qq_Listeners.firePropertyChange("qq_MyMap", oldValue, value);
}
/**
* qq_PrintBtn: transformed from: qqds_PushButton
* TagId=23
* isInherited=FALSE
*/
public JButton getqq_PrintBtn() {
if (qq_PrintBtn == null) {
qq_PrintBtn = PushButtonFactory.newInstance("PrintBtn", "Print");
qq_PrintBtn.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_PrintBtn, Constants.SP_NATURAL);
HeightPolicy.set(qq_PrintBtn, Constants.SP_NATURAL);
qq_PrintBtn.setMinimumSize(new Dimension(36, 23));
qq_PrintBtn.setLocation(80, 208);
}
return qq_PrintBtn;
}
public void setqq_PrintBtn(JButton value) {
JButton oldValue = qq_PrintBtn;
qq_PrintBtn = value;
this.qq_Listeners.firePropertyChange("qq_PrintBtn", oldValue, value);
}
/**
* qq_CancelBtn: transformed from: qqds_PushButton
* TagId=24
* isInherited=FALSE
*/
public JButton getqq_CancelBtn() {
if (qq_CancelBtn == null) {
qq_CancelBtn = PushButtonFactory.newInstance("CancelBtn", "Cancel");
WidthPolicy.set(qq_CancelBtn, Constants.SP_NATURAL);
HeightPolicy.set(qq_CancelBtn, Constants.SP_NATURAL);
qq_CancelBtn.setMinimumSize(new Dimension(46, 23));
qq_CancelBtn.setLocation(133, 210);
}
return qq_CancelBtn;
}
public void setqq_CancelBtn(JButton value) {
JButton oldValue = qq_CancelBtn;
qq_CancelBtn = value;
this.qq_Listeners.firePropertyChange("qq_CancelBtn", oldValue, value);
}
/**
* Form: transformed from: qqds_Panel
* TagId=1
* isInherited=FALSE
*/
protected void setFormProperties() {
Form.setOpaque( true );
}
public JPanel getForm() {
if (Form == null) {
Form = CompoundFieldFactory.newForm();
this.setFormProperties();
Form.add( getqq_CancelBtn() );
Form.add( getqq_PrintBtn() );
Form.add( getqq_MyMap() );
Form.add( getqq_DateFieldNotNullableLbl1() );
Form.add( getqq_theDate3() );
Form.add( getqq_theDate2() );
Form.add( getqq_theDateNotNull() );
Form.add( getqq_DateFieldLbl1() );
Form.add( getqq_DateFieldNotNullableLbl() );
Form.add( getqq_DateFieldLbl() );
Form.add( getqq_theDate() );
}
return Form;
}
public void setForm(JPanel value) {
JPanel oldValue = Form;
Form = value;
this.qq_Listeners.firePropertyChange("Form", oldValue, value);
}
/**
* Gets the system close policy
*
* The SystemClosePolicy property determines how a window responds to user attempts to close it by using the native window system through the window close box or a window system menu command.
* SystemClosePolicy responds to window closure attempts according to the following parameters:
* <li>Constants.SC_DISABLED Does not allow window closure through window system.</li>
* <li>Constants.SC_ENABLEDNOFINALIZE Window can be closed, but the contents are not verified, guaranteeing that the window will close (for example, the user clicks the Cancel button).</li>
* <li>Constants.SC_ENABLEDFINALIZE Posts the RequestFinalize method on the window, with a reason code of zero.</li>
* <li>Constants.SC_ENABLEDSHUTDOWN Posts Shutdown event to window�s task and to all tasks started by that task. This is the default value.</li>
*/
public int getSystemClosePolicy() {
return qq_SystemClosePolicy;
}
/**
* Sets the system close policy
*
* The SystemClosePolicy property determines how a window responds to user attempts to close it by using the native window system through the window close box or a window system menu command.
* SystemClosePolicy responds to window closure attempts according to the following parameters:
* <li>Constants.SC_DISABLED Does not allow window closure through window system.</li>
* <li>Constants.SC_ENABLEDNOFINALIZE Window can be closed, but the contents are not verified, guaranteeing that the window will close (for example, the user clicks the Cancel button).</li>
* <li>Constants.SC_ENABLEDFINALIZE Posts the RequestFinalize method on the window, with a reason code of zero.</li>
* <li>Constants.SC_ENABLEDSHUTDOWN Posts Shutdown event to window�s task and to all tasks started by that task. This is the default value.</li>
*/
public void setSystemClosePolicy(int policy) {
this.qq_SystemClosePolicy = policy;
if (policy == Constants.SC_DISABLED) {
this.addComponentListener(new CloseHideAdaptor(this));
} else {
for (ComponentListener cl : this.getComponentListeners()) {
if (cl instanceof CloseHideAdaptor) {
this.removeComponentListener(cl);
break;
}
}
}
}
/**
* Gets the initial position policy
*
* The InitialPositionPolicy property sets the position of a main window when it is first displayed, relative to a primary window or the screen.
* You use the InitialPositionPolicy property in conjunction with the InitialX, InitialY properties.
* InitialPositionPolicy sets the position of a window according to the following values:
* <li>Constants.PP_SYSTEMDEFAULT Accepts the default window system placement specification.</li>
* <li>Constants.PP_PRIMARYCENTERED Centers the window relative to the window specified as the PrimaryWindow property.</li>
* <li>Constants.PP_PRIMARYRELATIVE Positions the window relative to the primary window, using the PrimaryWindow, InitialX and InitialY attributes.</li>
* <li>Constants.PP_SCREENCENTERED Centers the window relative to the screen.</li>
* <li>Constants.PP_SCREENRELATIVE Positions the window relative to the screen, using the InitialX and InitialY properties.</li>
*/
public int getInitialPositionPolicy() {
return qq_initialPositionPolicy;
}
/**
* Sets the initial position policy
*
* The InitialPositionPolicy property sets the position of a main window when it is first displayed, relative to a primary window or the screen.
* You use the InitialPositionPolicy property in conjunction with the InitialX, InitialY properties.
* InitialPositionPolicy sets the position of a window according to the following values:
* <li>Constants.PP_SYSTEMDEFAULT Accepts the default window system placement specification.</li>
* <li>Constants.PP_PRIMARYCENTERED Centers the window relative to the window specified as the PrimaryWindow property.</li>
* <li>Constants.PP_PRIMARYRELATIVE Positions the window relative to the primary window, using the PrimaryWindow, InitialX and InitialY attributes.</li>
* <li>Constants.PP_SCREENCENTERED Centers the window relative to the screen.</li>
* <li>Constants.PP_SCREENRELATIVE Positions the window relative to the screen, using the InitialX and InitialY properties.</li>
*/
public void setInitialPositionPolicy(int policy) {
this.qq_initialPositionPolicy = policy;
}
/**
* Gets the primary window
*
* The primary window property designates a window, known as a primary window, to serve as an initial position reference for the current window.
* When a main window first realizes itself through the Open method on the UserWindow, it assumes a position according to the InitialPositionPolicy attribute.
* When the InitialPositionPolicy property is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_PRIMARYCENTERED (centered on the primary window),
* the window realizes itself in a position relative to the designated primary window.<p>
* <p>
* To take a position relative to the primary window, a window uses the PrimaryWindow attribute in conjunction with the InitialX and InitialY properties, which specify the window�s horizontal and vertical coordinates.
*/
public Window getPrimaryWindow() {
return this.primaryWindow;
}
/**
* Sets the primary window
*
* The primary window property designates a window, known as a primary window, to serve as an initial position reference for the current window.
* When a main window first realizes itself through the Open method on the UserWindow, it assumes a position according to the InitialPositionPolicy attribute.
* When the InitialPositionPolicy property is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_PRIMARYCENTERED (centered on the primary window),
* the window realizes itself in a position relative to the designated primary window.<p>
* <p>
* To take a position relative to the primary window, a window uses the PrimaryWindow attribute in conjunction with the InitialX and InitialY properties, which specify the window�s horizontal and vertical coordinates.
*/
public void setPrimaryWindow(Window value) {
this.primaryWindow = value;
}
/**
* Gets the InitialX value
*
* The InitialX property (integer) is the window�s initial horizontal screen position, relative to a primary window or the screen. It is specified in mils.
* InitialX applies only to main windows and only when a window�s InitialPositionPolicy attribute is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_SCREENRELATIVE (relative to the screen).
* InitialX, and its corollary, InitialY, work in conjunction with the PrimaryWindow and InitialPositionPolicy attributes to determine the position of a main window when it is first realized.
*/
public int getInitialX() {
return initialX;
}
/**
* Sets the InitialX value
*
* The InitialX property (integer) is the window�s initial horizontal screen position, relative to a primary window or the screen. It is specified in mils.
* InitialX applies only to main windows and only when a window�s InitialPositionPolicy attribute is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_SCREENRELATIVE (relative to the screen).
* InitialX, and its corollary, InitialY, work in conjunction with the PrimaryWindow and InitialPositionPolicy attributes to determine the position of a main window when it is first realized.
*/
public void setInitialX(int value) {
this.initialX = value;
}
/**
* Gets the InitialY value
*
* The InitialY property (integer) is the window�s initial vertical screen position, relative to a primary window or the screen. It is specified in mils.
* InitialY applies only to main windows and only when a window�s InitialPositionPolicy attribute is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_SCREENRELATIVE (relative to the screen).
* InitialY, and its corollary, InitialX, work in conjunction with the PrimaryWindow and InitialPositionPolicy attributes to determine the position of a main window when it is first realized.
*/
public int getInitialY() {
return initialY;
}
/**
* Sets the InitialY value
*
* The InitialY property (integer) is the window�s initial vertical screen position, relative to a primary window or the screen. It is specified in mils.
* InitialY applies only to main windows and only when a window�s InitialPositionPolicy attribute is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_SCREENRELATIVE (relative to the screen).
* InitialY, and its corollary, InitialX, work in conjunction with the PrimaryWindow and InitialPositionPolicy attributes to determine the position of a main window when it is first realized.
*/
public void setInitialY(int value) {
this.initialY = value;
}
/**
* Gets the default message set number for the window and its widgets.
*/
public int getSetNum() {
return this.qq_defaultSet;
}
/**
* Sets the default message set number for the window and its widgets.
*/
public void setSetNum(int value) {
this.qq_defaultSet = value;
}
/**
* Gets the message set number for the message number of the window's title.
*/
public int getTitleSetNum() {
return this.qq_msgSet;
}
/**
* Sets the message set number for the message number of the window's title.
*/
public void setTitleSetNum(int value) {
this.qq_msgSet = value;
}
/**
* Gets the message number for the message number of the window's title.
*/
public int getTitleMsgNum() {
return this.qq_msgNumber;
}
/**
* Sets the message number for the message number of the window's title.
*/
public void setTitleMsgNum(int value) {
this.qq_msgNumber = value;
}
/**
* Initialise the window and all its children.
*/
protected void initialize() {
if (this.Form == null) {
this.setName( "MappedDateTimeNullable" );
this.setTitle( "" );
this.setSystemClosePolicy(Constants.SC_ENABLEDSHUTDOWN);
if (this.getContentPane() != this.getForm()) {
this.setContentPane(getForm());
}
this.qq_setupWindowUsage();
this.setResizable( false );
this.setAlwaysOnTop(false);
UserWindow.setIconizeEnabled(this, true);
WindowManager.addWindowListener(this);
this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
this.setUsage(DisplayProject.Constants.WU_UPDATE);
UIutils.processGUIActions();
this.pack();
this.setInitialX(0);
this.setInitialY(0);
this.setInitialPositionPolicy(Constants.PP_SYSTEMDEFAULT);
}
}
// ----------------
// Window usage
//-----------------
protected WindowUsageMap usage = new WindowUsageMap();
public int getUsage() {
return this.usage.getUsage();
}
public WindowUsageMap getUsageMap() {
return this.usage;
}
/**
* Sets the window usage
*
* The Usage property sets the state for all a window�s child widgets at once, providing collective widget state changes on a predefined basis. A widget�s state determines how the widget reacts to mouse actions and how it displays itself. A window�s Usage property provides a convenient way to control the states of a group of widgets in the context of their parent window. With the Usage attribute, you can synchronize widget states to conform to a pattern you establish for the window.
* The Usage attribute accepts the following values:
* <li>Constants.WU_EDIT Edit usage: widgets themselves are editable, but not underlying data.</li>
* <li>Constants.WU_QUERY Query only usage: widget data is editable, but not widgets themselves.</li>
* <li>Constants.WU_UPDATE Update usage: mouse actions and keyboard input accepted. Widgets themselves are changeable. This is the default.</li>
* <li>Constants.WU_USER1 A user-defined usage. Default values same as WU_UPDATE.</li>
* <li>Constants.WU_USER2 A user-defined usage. Default values same as WU_UPDATE.</li>
* <li>Constants.WU_USER3 A user-defined usage. Default values same as WU_UPDATE.</li>
* <li>Constants.WU_VIEW View-only usage: no keyboard input is accepted. Widget posts Click events for mouse clicks.</li>
*/
public void setUsage(int usage) {
this.usage.setUsage(usage);
}
public void qq_setupWindowUsage() {
this.usage = new WindowUsageMap();
this.usage.add(getqq_theDate(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_DateFieldLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_DateFieldNotNullableLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_DateFieldLbl1(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_theDateNotNull(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_theDate2(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_theDate3(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_DateFieldNotNullableLbl1(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_MyMap(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_MappedDateLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_MyMap_MyDate(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_PrintBtn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_CancelBtn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
}
// </editor-fold>
// -----------
// Main method
// -----------
public static void main(String []args) {
KeyboardFocusManager.setCurrentKeyboardFocusManager(new ForteKeyboardFocusManager());
try {
UIManager.setLookAndFeel(new Win32LookAndFeel());
}
catch (Exception e) {}
ToolTipManager.sharedInstance().setDismissDelay(Integer.MAX_VALUE);
MappedDateTimeNullable myClass = new MappedDateTimeNullable();
myClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
myClass.setVisible(true);
UIutils.processGUIActions();
}
} // end class MappedDateTimeNullable
// c Pass 2 Conversion Time: 344 milliseconds