package EditField;
import DisplayProject.CloseHideAdaptor;
import DisplayProject.Constants;
import DisplayProject.CursorMgr;
import DisplayProject.DataField;
import DisplayProject.DropListModel;
import DisplayProject.FixedLengthDocument;
import DisplayProject.GridField;
import DisplayProject.UDSWindow;
import DisplayProject.UIutils;
import DisplayProject.WindowManager;
import DisplayProject.WindowUsageMap;
import DisplayProject.actions.AppletConnectionInfo;
import DisplayProject.actions.ExitOnTab;
import DisplayProject.actions.HeightPolicy;
import DisplayProject.actions.LineNumbers;
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.DropList;
import DisplayProject.controls.MultiLineTextField;
import DisplayProject.controls.TextGraphic;
import DisplayProject.events.ClientEventManager;
import DisplayProject.factory.CompoundFieldFactory;
import DisplayProject.factory.DataFieldFactory;
import DisplayProject.factory.DropFillinFactory;
import DisplayProject.factory.GraphicFactory;
import DisplayProject.factory.PushButtonFactory;
import DisplayProject.factory.TextEditFactory;
import DisplayProject.plaf.Win32LookAndFeel;
import Framework.Array_Of_ListElement;
import Framework.ErrorMgr;
import Framework.EventHandle;
import Framework.EventManager;
import Framework.EventRegistration;
import Framework.File;
import Framework.ForteKeyboardFocusManager;
import Framework.FrameworkUtils;
import Framework.ListElement;
import Framework.RuntimeProperties;
import Framework.TextData;
import Framework.UsageException;
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.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.UIManager;
import org.apache.log4j.Logger;
/**
* TEF<p>
* <p>
* @author Generated from Forte
* @since 19-Nov-2008
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@UDSWindow()
@SuppressWarnings("serial")
public class TEF
extends JFrame
implements Serializable, Observable
{
// ----------
// Attributes
// ----------
protected File DefaultHelpFile;
protected BindingManager bindingManager = null;
public PropertyChangeSupport qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
private int aDropList;
private TextData comments;
private TextData code;
private TextData aName;
// ------------
// Constructors
// ------------
public TEF() {
// Explicitly call the superclass constructor to prevent the implicit call
super();
this.initialize();
this.setComments(new TextData());
this.setAName(new TextData());
this.setCode(new TextData());
}
// ----------------------
// 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 setADropList(int aDropList) {
int oldValue = this.aDropList;
this.aDropList = aDropList;
this.qq_Listeners.firePropertyChange("ADropList", oldValue, this.aDropList);
}
public int getADropList() {
return this.aDropList;
}
public void setComments(TextData comments) {
TextData oldValue = this.comments;
this.comments = comments;
this.qq_Listeners.firePropertyChange("comments", oldValue, this.comments);
}
public TextData getComments() {
return this.comments;
}
public void setCode(TextData code) {
TextData oldValue = this.code;
this.code = code;
this.qq_Listeners.firePropertyChange("code", oldValue, this.code);
}
public TextData getCode() {
return this.code;
}
public void setAName(TextData aName) {
TextData oldValue = this.aName;
this.aName = aName;
this.qq_Listeners.firePropertyChange("AName", oldValue, this.aName);
}
public TextData getAName() {
return this.aName;
}
// -------
// 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 TaskHandle_Shutdown_langThreadcurrentThread = ClientEventManager.register( Thread.currentThread(), "Shutdown" );
EventRegistration PushButton_Click_getqq_save = ClientEventManager.register( this.getqq_save(), "Click" );
EventRegistration PushButton_Click_getqq_Set = ClientEventManager.register( this.getqq_Set(), "Click" );
EventRegistration TextField_AfterFocusGain_getqq_Comments = ClientEventManager.register( this.getqq_Comments(), "AfterFocusGain" );
EventRegistration TextField_BeforeFocusLoss_getqq_Comments = ClientEventManager.register( this.getqq_Comments(), "BeforeFocusLoss" );
EventRegistration TextField_AfterValueChange_getqq_Comments = ClientEventManager.register( this.getqq_Comments(), "AfterValueChange" );
EventRegistration TextField_AfterFirstKeystroke_getqq_Comments = ClientEventManager.register( this.getqq_Comments(), "AfterFirstKeystroke" );
EventRegistration window_ChildAfterValueChange = ClientEventManager.register( this.getForm(), "ChildAfterValueChange" );
EventRegistration TextEditField_AfterFocusGain_getqq_Code = ClientEventManager.register( this.getqq_Code(), "AfterFocusGain" );
EventRegistration TextEditField_BeforeFocusLoss_getqq_Code = ClientEventManager.register( this.getqq_Code(), "BeforeFocusLoss" );
EventRegistration TextEditField_AfterValueChange_getqq_Code = ClientEventManager.register( this.getqq_Code(), "AfterValueChange" );
EventRegistration TextEditField_AfterFirstKeystroke_getqq_Code = ClientEventManager.register( this.getqq_Code(), "AfterFirstKeystroke" );
EventRegistration Window_AfterFinalize_this = ClientEventManager.register( this, "AfterFinalize" );
while (true) {
UIutils.processGUIActions();
EventHandle qq_currentEvent = EventManager.waitForEvent();
if (qq_currentEvent == null)
break;
// -------------
// task.Shutdown
// -------------
if (qq_currentEvent.isEvent(TaskHandle_Shutdown_langThreadcurrentThread)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
break;
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ------------
// <save>.click
// ------------
else if (qq_currentEvent.isEvent(PushButton_Click_getqq_save)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("=Save=");
Logger.getLogger("task.part.logmgr").info(this.getAName());
Logger.getLogger("task.part.logmgr").info(this.getComments());
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// -----------
// <Set>.click
// -----------
else if (qq_currentEvent.isEvent(PushButton_Click_getqq_Set)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
this.setAName(new TextData("Peter"));
this.setADropList(3);
this.setComments(new TextData("This is a comment with spaces and hopefully it will wrap"));
this.setCode(new TextData("This simulates code\non multiple lines\nand shows the line numbers\n"));
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// -------------------------
// <Comments>.AfterFocusGain
// -------------------------
else if (qq_currentEvent.isEvent(TextField_AfterFocusGain_getqq_Comments)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("Comments: AfterAfterFocusGain");
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// --------------------------
// <Comments>.BeforeFocusLoss
// --------------------------
else if (qq_currentEvent.isEvent(TextField_BeforeFocusLoss_getqq_Comments)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("Comments: BeforeFocusLoss");
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ---------------------------
// <Comments>.AfterValueChange
// ---------------------------
else if (qq_currentEvent.isEvent(TextField_AfterValueChange_getqq_Comments)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("Comments: AfterValueChange");
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ------------------------------
// <Comments>.AfterFirstKeyStroke
// ------------------------------
else if (qq_currentEvent.isEvent(TextField_AfterFirstKeystroke_getqq_Comments)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("Comments: AfterFirstKeyStroke");
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ----------------------------
// Window.ChildAfterValueChange
// ----------------------------
else if (qq_currentEvent.isEvent(window_ChildAfterValueChange)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("Window: AfterValueChange");
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ---------------------
// <Code>.AfterFocusGain
// ---------------------
else if (qq_currentEvent.isEvent(TextEditField_AfterFocusGain_getqq_Code)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("Code: AfterAfterFocusGain");
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ----------------------
// <Code>.BeforeFocusLoss
// ----------------------
else if (qq_currentEvent.isEvent(TextEditField_BeforeFocusLoss_getqq_Code)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("Code: BeforeFocusLoss");
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// -----------------------
// <Code>.AfterValueChange
// -----------------------
else if (qq_currentEvent.isEvent(TextEditField_AfterValueChange_getqq_Code)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("Code: AfterValueChange");
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// --------------------------
// <Code>.AfterFirstKeyStroke
// --------------------------
else if (qq_currentEvent.isEvent(TextEditField_AfterFirstKeystroke_getqq_Code)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Logger.getLogger("task.part.logmgr").info("Code: AfterFirstKeyStroke");
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// --------------------
// Window.AfterFinalize
// --------------------
else if (qq_currentEvent.isEvent(Window_AfterFinalize_this)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
if (WindowManager.questionDialog("Do you want to exit?", JOptionPane.YES_NO_OPTION, JOptionPane.YES_OPTION, 50) == JOptionPane.YES_OPTION) {
Logger.getLogger("task.part.logmgr").info("=Close=");
Logger.getLogger("task.part.logmgr").info(this.getAName());
Logger.getLogger("task.part.logmgr").info(this.getComments());
break;
}
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
}
EventManager.deregister( TaskHandle_Shutdown_langThreadcurrentThread );
EventManager.deregister( PushButton_Click_getqq_save );
EventManager.deregister( PushButton_Click_getqq_Set );
EventManager.deregister( TextField_AfterFocusGain_getqq_Comments );
EventManager.deregister( TextField_BeforeFocusLoss_getqq_Comments );
EventManager.deregister( TextField_AfterValueChange_getqq_Comments );
EventManager.deregister( TextField_AfterFirstKeystroke_getqq_Comments );
EventManager.deregister( window_ChildAfterValueChange );
EventManager.deregister( TextEditField_AfterFocusGain_getqq_Code );
EventManager.deregister( TextEditField_BeforeFocusLoss_getqq_Code );
EventManager.deregister( TextEditField_AfterValueChange_getqq_Code );
EventManager.deregister( TextEditField_AfterFirstKeystroke_getqq_Code );
EventManager.deregister( Window_AfterFinalize_this );
}
//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_aName;
public DropList qq_aDropList;
public GridField qq_GridField12;
public JButton qq_Set;
public JButton qq_save;
public JPanel Form;
public JScrollPane qq_Code_sp;
public JScrollPane qq_Comments_sp;
public MultiLineTextField qq_Code;
public MultiLineTextField qq_Comments;
public TextGraphic qq_CodeLbl;
public TextGraphic qq_CommentsLbl;
public TextGraphic qq_NameLbl;
/**
* qq_NameLbl: transformed from: qqds_TextGraphic
* TagId=13
* isInherited=FALSE
*/
public TextGraphic getqq_NameLbl() {
if (qq_NameLbl == null) {
qq_NameLbl = GraphicFactory.newTextGraphic("Name\n", "");
// OPTIONAL UIutils.reloadLabelText(qq_NameLbl, mcat);
WidthPolicy.set(qq_NameLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_NameLbl, Constants.SP_NATURAL);
qq_NameLbl.setMinimumSize(new Dimension(26, 12));
}
return qq_NameLbl;
}
public void setqq_NameLbl(TextGraphic value) {
TextGraphic oldValue = qq_NameLbl;
qq_NameLbl = value;
this.qq_Listeners.firePropertyChange("qq_NameLbl", oldValue, value);
}
/**
* qq_aName: transformed from: qqds_DataField
* TagId=14
* isInherited=FALSE
*/
public DataField getqq_aName() {
if (qq_aName == null) {
// Mask type: MK_NONE
qq_aName = DataFieldFactory.newDataField("aName", 32, TextData.class, Constants.MK_NONE);
qq_aName.setValue("");
qq_aName.setOriginalFormatText(null);
qq_aName.setHorizontalAlignment(JTextField.LEFT);
qq_aName.setDocument( new FixedLengthDocument(10) ); // Max characters of 10
getBindingManager().bindComponent(qq_aName, "AName");
WidthPolicy.set(qq_aName, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_aName, Constants.SP_NATURAL);
qq_aName.setMinimumSize(new Dimension(164, 15));
qq_aName.setSize(new Dimension(164, 15));
}
return qq_aName;
}
public void setqq_aName(DataField value) {
DataField oldValue = qq_aName;
qq_aName = value;
this.qq_Listeners.firePropertyChange("qq_aName", oldValue, value);
}
/**
* qq_aDropList: transformed from: qqds_DropList
* TagId=15
* isInherited=FALSE
*/
public DropList getqq_aDropList() {
if (qq_aDropList == null) {
Array_Of_ListElement<ListElement> elements = new Array_Of_ListElement<ListElement>();
elements.add( new ListElement( 1, "One", ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
elements.add( new ListElement( 2, "Two", ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
elements.add( new ListElement( 3, "Three", ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
elements.add( new ListElement( 4, "Four", ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
qq_aDropList = DropFillinFactory.newDropList();
qq_aDropList.setName("aDropList");
getBindingManager().bindComponent(qq_aDropList, "ADropList", elements);
qq_aDropList.addActionListener( (DropListModel)qq_aDropList.getModel() );
// OPTIONAL UIutils.reloadLabelText(qq_aDropList, mcat);
qq_aDropList.setMaximumRowCount(4);
WidthPolicy.set(qq_aDropList, Constants.SP_NATURAL);
HeightPolicy.set(qq_aDropList, Constants.SP_NATURAL);
qq_aDropList.setMinimumSize(new Dimension(54, 16));
}
return qq_aDropList;
}
public void setqq_aDropList(DropList value) {
DropList oldValue = qq_aDropList;
qq_aDropList = value;
this.qq_Listeners.firePropertyChange("qq_aDropList", oldValue, value);
}
/**
* qq_CommentsLbl: transformed from: qqds_TextGraphic
* TagId=16
* isInherited=FALSE
*/
public TextGraphic getqq_CommentsLbl() {
if (qq_CommentsLbl == null) {
qq_CommentsLbl = GraphicFactory.newTextGraphic("Comments\n", "");
// OPTIONAL UIutils.reloadLabelText(qq_CommentsLbl, mcat);
WidthPolicy.set(qq_CommentsLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_CommentsLbl, Constants.SP_NATURAL);
qq_CommentsLbl.setMinimumSize(new Dimension(44, 12));
}
return qq_CommentsLbl;
}
public void setqq_CommentsLbl(TextGraphic value) {
TextGraphic oldValue = qq_CommentsLbl;
qq_CommentsLbl = value;
this.qq_Listeners.firePropertyChange("qq_CommentsLbl", oldValue, value);
}
/**
* qq_Comments_sp: transformed from: qqds_TextField
* TagId=17
* isInherited=FALSE
*/
public JScrollPane getqq_Comments_sp() {
if (qq_Comments_sp == null) {
qq_Comments_sp = CompoundFieldFactory.newScrollPane();
qq_Comments_sp.setName("Comments");
qq_Comments_sp.setViewportView(getqq_Comments());
qq_Comments_sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
qq_Comments_sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
WidthPolicy.set(qq_Comments_sp, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_Comments_sp, Constants.SP_EXPLICIT);
qq_Comments_sp.setSize(new Dimension(179, 140));
qq_Comments_sp.setMinimumSize(new Dimension(179, 140));
qq_Comments_sp.setPreferredSize(new Dimension(179, 140));
}
return qq_Comments_sp;
}
public void setqq_Comments_sp(JScrollPane value) {
JScrollPane oldValue = qq_Comments_sp;
qq_Comments_sp = value;
this.qq_Listeners.firePropertyChange("qq_Comments_sp", oldValue, value);
}
/**
* qq_Comments: transformed from: qqds_TextField
* TagId=17
* isInherited=FALSE
*/
public MultiLineTextField getqq_Comments() {
if (qq_Comments == null) {
qq_Comments = TextEditFactory.newTextField("Comments", 12, 28);
qq_Comments.setWrapStyleWord( true );
qq_Comments.setLineWrap( true );
qq_Comments.setDocument( new FixedLengthDocument(100) ); // Max characters of 100
getBindingManager().bindComponent(qq_Comments, "comments");
ExitOnTab.set(qq_Comments, true);
WidthPolicy.set(qq_Comments, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_Comments, Constants.SP_EXPLICIT);
}
return qq_Comments;
}
public void setqq_Comments(MultiLineTextField value) {
MultiLineTextField oldValue = qq_Comments;
qq_Comments = value;
this.qq_Listeners.firePropertyChange("qq_Comments", oldValue, value);
}
/**
* qq_save: transformed from: qqds_PushButton
* TagId=18
* isInherited=FALSE
*/
public JButton getqq_save() {
if (qq_save == null) {
qq_save = PushButtonFactory.newInstance("save", "Save");
qq_save.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_save, Constants.SP_NATURAL);
HeightPolicy.set(qq_save, Constants.SP_NATURAL);
qq_save.setMinimumSize(new Dimension(31, 17));
}
return qq_save;
}
public void setqq_save(JButton value) {
JButton oldValue = qq_save;
qq_save = value;
this.qq_Listeners.firePropertyChange("qq_save", oldValue, value);
}
/**
* qq_Code_sp: transformed from: qqds_TextEditField
* TagId=19
* isInherited=FALSE
*/
public JScrollPane getqq_Code_sp() {
if (qq_Code_sp == null) {
qq_Code_sp = CompoundFieldFactory.newScrollPane();
qq_Code_sp.setName("Code");
qq_Code_sp.setViewportView(getqq_Code());
qq_Code_sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
qq_Code_sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
WidthPolicy.set(qq_Code_sp, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_Code_sp, Constants.SP_EXPLICIT);
qq_Code_sp.setSize(new Dimension(176, 116));
qq_Code_sp.setMinimumSize(new Dimension(176, 116));
qq_Code_sp.setPreferredSize(new Dimension(176, 116));
}
return qq_Code_sp;
}
public void setqq_Code_sp(JScrollPane value) {
JScrollPane oldValue = qq_Code_sp;
qq_Code_sp = value;
this.qq_Listeners.firePropertyChange("qq_Code_sp", oldValue, value);
}
/**
* qq_Code: transformed from: qqds_TextEditField
* TagId=19
* isInherited=FALSE
*/
public MultiLineTextField getqq_Code() {
if (qq_Code == null) {
qq_Code = TextEditFactory.newTextEditField("Code", 9, 21);
LineNumbers.set(qq_Code, true );
qq_Code.setDocument( new FixedLengthDocument(100) ); // Max characters of 100
getBindingManager().bindComponent(qq_Code, "code");
WidthPolicy.set(qq_Code, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_Code, Constants.SP_EXPLICIT);
}
return qq_Code;
}
public void setqq_Code(MultiLineTextField value) {
MultiLineTextField oldValue = qq_Code;
qq_Code = value;
this.qq_Listeners.firePropertyChange("qq_Code", oldValue, value);
}
/**
* qq_CodeLbl: transformed from: qqds_TextGraphic
* TagId=20
* isInherited=FALSE
*/
public TextGraphic getqq_CodeLbl() {
if (qq_CodeLbl == null) {
qq_CodeLbl = GraphicFactory.newTextGraphic("Code\n", "");
// OPTIONAL UIutils.reloadLabelText(qq_CodeLbl, mcat);
WidthPolicy.set(qq_CodeLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_CodeLbl, Constants.SP_NATURAL);
qq_CodeLbl.setMinimumSize(new Dimension(24, 12));
}
return qq_CodeLbl;
}
public void setqq_CodeLbl(TextGraphic value) {
TextGraphic oldValue = qq_CodeLbl;
qq_CodeLbl = value;
this.qq_Listeners.firePropertyChange("qq_CodeLbl", oldValue, value);
}
/**
* qq_Set: transformed from: qqds_PushButton
* TagId=21
* isInherited=FALSE
*/
public JButton getqq_Set() {
if (qq_Set == null) {
qq_Set = PushButtonFactory.newInstance("Set", "Set");
qq_Set.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_Set, Constants.SP_NATURAL);
HeightPolicy.set(qq_Set, Constants.SP_NATURAL);
qq_Set.setMinimumSize(new Dimension(24, 17));
}
return qq_Set;
}
public void setqq_Set(JButton value) {
JButton oldValue = qq_Set;
qq_Set = value;
this.qq_Listeners.firePropertyChange("qq_Set", oldValue, value);
}
/**
* qq_GridField12: transformed from: qqds_GridField
* TagId=12
* isInherited=FALSE
* In forte this was a 3x4 grid field.
* There are no cell margins set
* The width policy is set to Natural, and the height policy is set to Natural.
*/
protected void setqq_GridField12Properties() {
qq_GridField12.setCellGravity(Constants.CG_TOPLEFT);
qq_GridField12.setCollapsed(true);
qq_GridField12.setHeightPolicy(Constants.SP_NATURAL);
qq_GridField12.setWidthPolicy(Constants.SP_NATURAL);
qq_GridField12.setBackground(null);
qq_GridField12.setLocation(4, 4);
}
public GridField getqq_GridField12() {
if (qq_GridField12 == null) {
qq_GridField12 = CompoundFieldFactory.newGridField("qq_GridField12", true);
setqq_GridField12Properties();
qq_GridField12.setMinimumSize(new Dimension(245, 292));
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.NORTHWEST; // Gravity - original: CG_TOPLEFT 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_GridField12.add( getqq_NameLbl(), 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.NORTHWEST; // Gravity - original: CG_TOPLEFT 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_GridField12.add( getqq_aName(), qq_gbc1 );
GridBagConstraints qq_gbc2 = new GridBagConstraints();
qq_gbc2.gridx = 2; // Column 3
qq_gbc2.gridy = 0; // Row 1
qq_gbc2.weightx = 0;
qq_gbc2.weighty = 0;
qq_gbc2.anchor = GridBagConstraints.NORTHWEST; // Gravity - original: CG_TOPLEFT gf
qq_gbc2.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc2.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
qq_GridField12.add( getqq_Set(), qq_gbc2 );
GridBagConstraints qq_gbc3 = new GridBagConstraints();
qq_gbc3.gridx = 1; // Column 2
qq_gbc3.gridy = 1; // Row 2
qq_gbc3.weightx = 0;
qq_gbc3.weighty = 0;
qq_gbc3.anchor = GridBagConstraints.NORTHWEST; // Gravity - original: CG_TOPLEFT gf
qq_gbc3.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc3.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
qq_GridField12.add( getqq_aDropList(), qq_gbc3 );
GridBagConstraints qq_gbc4 = new GridBagConstraints();
qq_gbc4.gridx = 2; // Column 3
qq_gbc4.gridy = 1; // Row 2
qq_gbc4.weightx = 0;
qq_gbc4.weighty = 0;
qq_gbc4.anchor = GridBagConstraints.NORTHWEST; // Gravity - original: CG_TOPLEFT gf
qq_gbc4.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc4.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
qq_GridField12.add( getqq_save(), qq_gbc4 );
GridBagConstraints qq_gbc5 = new GridBagConstraints();
qq_gbc5.gridx = 0; // Column 1
qq_gbc5.gridy = 2; // Row 3
qq_gbc5.weightx = 0;
qq_gbc5.weighty = 0;
qq_gbc5.anchor = GridBagConstraints.NORTHWEST; // Gravity - original: CG_TOPLEFT gf
qq_gbc5.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc5.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
qq_GridField12.add( getqq_CommentsLbl(), qq_gbc5 );
GridBagConstraints qq_gbc6 = new GridBagConstraints();
qq_gbc6.gridx = 1; // Column 2
qq_gbc6.gridy = 2; // Row 3
qq_gbc6.weightx = 0;
qq_gbc6.weighty = 0;
qq_gbc6.anchor = GridBagConstraints.NORTHWEST; // Gravity - original: CG_TOPLEFT gf
qq_gbc6.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc6.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
qq_GridField12.add( getqq_Comments_sp(), qq_gbc6 );
GridBagConstraints qq_gbc7 = new GridBagConstraints();
qq_gbc7.gridx = 0; // Column 1
qq_gbc7.gridy = 3; // Row 4
qq_gbc7.weightx = 0;
qq_gbc7.weighty = 0;
qq_gbc7.anchor = GridBagConstraints.NORTHWEST; // Gravity - original: CG_TOPLEFT gf
qq_gbc7.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc7.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
qq_GridField12.add( getqq_CodeLbl(), qq_gbc7 );
GridBagConstraints qq_gbc8 = new GridBagConstraints();
qq_gbc8.gridx = 1; // Column 2
qq_gbc8.gridy = 3; // Row 4
qq_gbc8.weightx = 0;
qq_gbc8.weighty = 0;
qq_gbc8.anchor = GridBagConstraints.NORTHWEST; // Gravity - original: CG_TOPLEFT gf
qq_gbc8.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc8.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
qq_GridField12.add( getqq_Code_sp(), qq_gbc8 );
}
return qq_GridField12;
}
public void setqq_GridField12(GridField value) {
GridField oldValue = qq_GridField12;
qq_GridField12 = value;
this.qq_Listeners.firePropertyChange("qq_GridField12", 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_GridField12() );
}
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( "TEF" );
this.setTitle( "" );
this.setSystemClosePolicy(Constants.SC_ENABLEDFINALIZE);
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_GridField12(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_NameLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_aName(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_aDropList(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_CommentsLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_Comments(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_save(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_Code(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_CodeLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_Set(), 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 ) {
FrameworkUtils.setCmdLineArgs(args);
AppletConnectionInfo client = null;
try {
// Install our own focus manager. MUST be done prior to setting the
// UIManager, otherwise you'll run into issues like things have the wrong focus.
KeyboardFocusManager.setCurrentKeyboardFocusManager(new ForteKeyboardFocusManager());
UIManager.setLookAndFeel(new Win32LookAndFeel());
client = UserWindow.postAPPLETStarted();
TEF tEF_start = new TEF();
tEF_start.display();
UserWindow.postAPPLETStopped(client);
System.exit(0);
} catch (Throwable e) {
ErrorMgr.showErrors(null, "Unhandled exception", e);
UserWindow.postAPPLETStopped(client);
System.exit(0);
}
}
} // end class TEF
// c Pass 2 Conversion Time: 437 milliseconds