package StockTradeWindows;
import DisplayProject.ArrayColumn;
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.ColourChange;
import DisplayProject.actions.ExitOnTab;
import DisplayProject.actions.FrameColor;
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.ArrayField;
import DisplayProject.controls.MultiLineTextField;
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.factory.TableFactory;
import DisplayProject.factory.TextEditFactory;
import DisplayProject.plaf.Win32LookAndFeel;
import DisplayProject.table.ArrayFieldCellHelper;
import DisplayProject.table.FormattedCellEditor;
import DisplayProject.table.FormattedCellRenderer;
import Framework.AsyncStarter;
import Framework.ErrorMgr;
import Framework.EventHandle;
import Framework.EventManager;
import Framework.EventRegistration;
import Framework.File;
import Framework.ForteKeyboardFocusManager;
import Framework.GenericException;
import Framework.RuntimeProperties;
import Framework.TextData;
import Framework.UsageException;
import StockTradeBusinessClasses.Array_Of_Holding;
import StockTradeBusinessClasses.Customer;
import StockTradeBusinessClasses.Holding;
import StockTradeBusinessClasses.Order;
import StockTradeServices.NoSuchCustomerException;
import StockTradeServices.TradeMgr;
import StockTradeServices.interfaces.*;
import StockTradeWindows.OrderWindow;
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.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.lang.Cloneable;
import java.lang.Object;
import java.lang.String;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.ParseException;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.ToolTipManager;
import javax.swing.UIManager;
import javax.swing.WindowConstants;
import javax.swing.text.MaskFormatter;
import org.apache.log4j.Logger;
import org.fest.swing.fixture.FrameFixture;
import org.fest.swing.fixture.JTextComponentFixture;
/**
* CustomerWindow<p>
* <p>
* @author Generated from Forte
* @since 24-Aug-2010
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@UDSWindow()
@SuppressWarnings("serial")
public class CustomerWindow
extends JFrame
implements Cloneable, Serializable, Observable
{
// -------------
// Inner classes
// -------------
/**
* This class contains routines to be able to start threads for the methods on this class in a manner
* similar to that allowed by Forte. This includes:<p>
* <ul>
* <li>Arbitrary parameters</li>
* <li>Starting threads as daemon threads</li>
* <li>Naming the thread for easy debugging</li>
* </ul>
*/
public static class AsyncRunner extends AsyncStarter {
/**
* Create an async runner which does not fire completion events nor begin a transaction
*/
public AsyncRunner() {
super();
}
/**
* display<p>
* <p>
* @param pName4CustWin Type: TextData
*/
public Thread display(final CustomerWindow pCustomerWindow, final TextData pName4CustWin) {
return startTask(pCustomerWindow, "CustomerWindow.Display",
new AsyncStarter.AsyncInvoker() {
@Override public void runWithNoReturn() {
pCustomerWindow.display(pName4CustWin);
}
});
}
}
// ----------
// Attributes
// ----------
protected File defaultHelpFile;
protected BindingManager bindingManager = null;
public PropertyChangeSupport qq_Listeners = null;
private Customer customerGrid;
// ------------
// Constructors
// ------------
public CustomerWindow() {
// Explicitly call the superclass constructor to prevent the implicit call
super();
this.initialize();
this.setCustomerGrid(new Customer());
//self.CustomerName = new;
//self.HoldingList = new;
// Import code for Init Method for CustomerWindow class
// Populate HoldingList Array widget
// Holding1 : Holding = new;
// Holding1.StockName = 'MacDonna';
// Holding1.Quantity = 100;
// Holding1.Price = 25;
// self.HoldingList.AppendRow(Holding1);
//
// Holding2 : Holding = new;
// Holding2.StockName = 'Coarse Light';
// Holding2.Quantity = 100;
// Holding2.Price = 25;
// self.HoldingList.AppendRow(Holding2);
//
// Holding3 : Holding = new;
// Holding3.StockName = 'Boston Quicken';
// Holding3.Quantity = 100;
// Holding3.Price = 25;
// self.HoldingList.AppendRow(Holding3);
//
// //self.CustomerName.SetValue('Natasha');
// self.Address = '1800 Harrison St.,\nOakland CA 94612';
// self.PhoneNumber = '5108692109';
// self.CashBalance = 7000;
// //self.StockName = 'Forte';
// //self.Quantity = 100;
// //self.Price = 25;
}
// ----------------------
// Accessors and Mutators
// ----------------------
public File getDefaultHelpFile() {
return defaultHelpFile;
}
public void setDefaultHelpFile(File defaultHelpFile) {
this.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 setCustomerGrid(Customer customerGrid) {
Customer oldValue = this.customerGrid;
this.customerGrid = customerGrid;
this.firePropertyChange("customerGrid", oldValue, this.customerGrid);
}
/**
* Getter for the attribute CustomerGrid
*/
public Customer getCustomerGrid() {
return this.customerGrid;
}
// -------
// Methods
// -------
public void firePropertyChange(PropertyChangeEvent evt) {
if (qq_Listeners != null) {
qq_Listeners.firePropertyChange(evt);
}
}
public void firePropertyChange(String pName, boolean oldValue, boolean newValue) {
if (qq_Listeners != null) {
qq_Listeners.firePropertyChange(pName, oldValue, newValue);
}
}
public void firePropertyChange(String pName, int oldValue, int newValue) {
if (qq_Listeners != null) {
qq_Listeners.firePropertyChange(pName, oldValue, newValue);
}
}
public void firePropertyChange(String pName, Object oldValue, Object newValue) {
if (qq_Listeners != null) {
qq_Listeners.firePropertyChange(pName, oldValue, newValue);
}
}
public boolean hasListeners(String propertyName) {
if (qq_Listeners != null) {
return qq_Listeners.hasListeners(propertyName);
}
return false;
}
public PropertyChangeSupport getPropertyListeners() {
if (qq_Listeners == null)
qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
return this.qq_Listeners;
}
public void setPropertyListeners(PropertyChangeSupport pcs) {
qq_Listeners = pcs;
}
public void addPropertyChangeListener(String property, PropertyChangeListener listener) {
if (qq_Listeners == null) {
qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
}
qq_Listeners.addPropertyChangeListener(property, listener);
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
if (qq_Listeners == null) {
qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
}
qq_Listeners.addPropertyChangeListener(listener);
}
public void removePropertyChangeListener(String property, PropertyChangeListener listener) {
if (qq_Listeners != null) {
qq_Listeners.removePropertyChangeListener(property, listener);
}
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
if (qq_Listeners != null) {
qq_Listeners.removePropertyChangeListener(listener);
}
}
/**
* display<p>
* <p>
* @param pName4CustWin Type: TextData
*/
public void display(TextData pName4CustWin) {
try {
this.setCustomerGrid(CustomerSO_proxy.getInstance().getCustomer(pName4CustWin));
//self.CustomerName.Setvalue(pName4CustWin);
UserWindow.open(this);
// ----------
// Event Loop
// ----------
EventManager.startEventLoop();
try {
EventRegistration TaskHandle_Shutdown_langThreadcurrentThread = ClientEventManager.register( Thread.currentThread(), "Shutdown" );
EventRegistration TradeMgr_OrderProcessed_getInstance = ClientEventManager.register( TradeSO_proxy.getInstance(), TradeMgr.cEVENT_ORDER_PROCESSED );
EventRegistration PushButton_Click_getqq_BuyBtn = ClientEventManager.register( this.getqq_BuyBtn(), "Click" );
EventRegistration PushButton_Click_getqq_SellBtn = ClientEventManager.register( this.getqq_SellBtn(), "Click" );
EventRegistration PushButton_Click_getqq_ExitBtn = ClientEventManager.register( this.getqq_ExitBtn(), "Click" );
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();
}
}
// ----------------------
// TradeSO.OrderProcessed
// ----------------------
else if (qq_currentEvent.isEvent(TradeMgr_OrderProcessed_getInstance)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
Order orderOK = qq_currentEvent.getParam("pOrder");
if ((this.getCustomerGrid().getCustomerName().isEqual(orderOK.getCustomerName())).getValue()) {
this.setCustomerGrid(CustomerSO_proxy.getInstance().getCustomer(orderOK.getCustomerName()));
}
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// --------------
// <BuyBtn>.Click
// --------------
else if (qq_currentEvent.isEvent(PushButton_Click_getqq_BuyBtn)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
//self.Quantity = self.Quantity + 100;
//self.Window.MessageDialog(MessageText='You bought 100 shares',
// MessageType=MT_INFO);
OrderWindow orderWin = new OrderWindow();
orderWin.display(this.getCustomerGrid().getCustomerName(), "Buy", (Array_Of_Holding<Holding>)null);
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ---------------
// <SellBtn>.Click
// ---------------
else if (qq_currentEvent.isEvent(PushButton_Click_getqq_SellBtn)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
//self.Quantity = self.Quantity - 100;
//self.Window.MessageDialog(MessageText='You sold 100 shares',
// MessageType=MT_INFO);
OrderWindow orderWin = new OrderWindow();
orderWin.display(this.getCustomerGrid().getCustomerName(), "Sell", this.getCustomerGrid().getHoldingList());
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ---------------
// <ExitBtn>.Click
// ---------------
else if (qq_currentEvent.isEvent(PushButton_Click_getqq_ExitBtn)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
break;
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
}
EventManager.deregister( TaskHandle_Shutdown_langThreadcurrentThread );
EventManager.deregister( TradeMgr_OrderProcessed_getInstance );
EventManager.deregister( PushButton_Click_getqq_BuyBtn );
EventManager.deregister( PushButton_Click_getqq_SellBtn );
EventManager.deregister( PushButton_Click_getqq_ExitBtn );
}
//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);
}
}
catch (NoSuchCustomerException noSuchCust) {
WindowManager.messageDialog(this, GenericException.getMessageText(noSuchCust), GenericException.severity(noSuchCust), 50);
}
}
// ------------------
// Window Definitions
// ------------------
// <editor-fold defaultstate="collapsed" desc="Window Definitions">
private int qq_defaultSet = 0;
private int qq_msgNumber = 0;
private int qq_msgSet = 1;
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 ArrayField qq_CustomerGrid_HoldingList;
public DataField qq_CustomerGrid_CashBalance;
public DataField qq_CustomerGrid_CustomerName;
public DataField qq_CustomerGrid_HoldingListArray_Price;
public DataField qq_CustomerGrid_HoldingListArray_Quantity;
public DataField qq_CustomerGrid_HoldingListArray_StockName;
public DataField qq_CustomerGrid_PhoneNumber;
public GridField qq_ButtonGrid;
public GridField qq_CustomerGrid;
public GridField qq_CustomerGrid_CustomerDetailGrdi;
public GridField qq_OutrGrid;
public JButton qq_BuyBtn;
public JButton qq_ExitBtn;
public JButton qq_SellBtn;
public JPanel Form;
public JScrollPane qq_CustomerGrid_Address_sp;
public JScrollPane qq_CustomerGrid_HoldingList_sp;
public MultiLineTextField qq_CustomerGrid_Address;
public TextGraphic qq_AddressLbl;
public TextGraphic qq_CashBalanceLbl;
public TextGraphic qq_NameLbl;
public TextGraphic qq_OTHRWYFLbl;
public TextGraphic qq_PhoneLbl;
/**
* qq_NameLbl: transformed from: qqds_TextGraphic
* TagId=103
* 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(38, 16));
}
return qq_NameLbl;
}
/**
* qq_CustomerGrid_CustomerName: transformed from: qqds_DataField
* TagId=104
* isInherited=FALSE
*/
public DataField getqq_CustomerGrid_CustomerName() {
if (qq_CustomerGrid_CustomerName == null) {
// Mask type: MK_NONE
qq_CustomerGrid_CustomerName = DataFieldFactory.newDataField("CustomerName", 24, TextData.class, Constants.MK_NONE);
qq_CustomerGrid_CustomerName.setValue("");
qq_CustomerGrid_CustomerName.setHorizontalAlignment(JTextField.LEFT);
getBindingManager().bindComponent(qq_CustomerGrid_CustomerName, "customerGrid.customerName");
WidthPolicy.set(qq_CustomerGrid_CustomerName, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_CustomerGrid_CustomerName, Constants.SP_NATURAL);
qq_CustomerGrid_CustomerName.setMinimumSize(new Dimension(167, 19));
qq_CustomerGrid_CustomerName.setSize(new Dimension(167, 19));
}
return qq_CustomerGrid_CustomerName;
}
/**
* qq_AddressLbl: transformed from: qqds_TextGraphic
* TagId=105
* isInherited=FALSE
*/
public TextGraphic getqq_AddressLbl() {
if (qq_AddressLbl == null) {
qq_AddressLbl = GraphicFactory.newTextGraphic("Address:\n", "");
// OPTIONAL UIutils.reloadLabelText(qq_AddressLbl, mcat);
WidthPolicy.set(qq_AddressLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_AddressLbl, Constants.SP_NATURAL);
qq_AddressLbl.setMinimumSize(new Dimension(48, 16));
}
return qq_AddressLbl;
}
/**
* qq_CustomerGrid_Address_sp: transformed from: qqds_TextField
* TagId=106
* isInherited=FALSE
*/
public JScrollPane getqq_CustomerGrid_Address_sp() {
if (qq_CustomerGrid_Address_sp == null) {
qq_CustomerGrid_Address_sp = CompoundFieldFactory.newScrollPane();
qq_CustomerGrid_Address_sp.setName("Address");
qq_CustomerGrid_Address_sp.setViewportView(getqq_CustomerGrid_Address());
qq_CustomerGrid_Address_sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
qq_CustomerGrid_Address_sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
WidthPolicy.set(qq_CustomerGrid_Address_sp, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_CustomerGrid_Address_sp, Constants.SP_EXPLICIT);
qq_CustomerGrid_Address_sp.setMinimumSize(new Dimension(164, 78));
qq_CustomerGrid_Address_sp.setSize(new Dimension(164, 78));
}
return qq_CustomerGrid_Address_sp;
}
/**
* qq_CustomerGrid_Address: transformed from: qqds_TextField
* TagId=106
* isInherited=FALSE
*/
public MultiLineTextField getqq_CustomerGrid_Address() {
if (qq_CustomerGrid_Address == null) {
qq_CustomerGrid_Address = TextEditFactory.newTextField("Address", 3, 19);
getBindingManager().bindComponent(qq_CustomerGrid_Address, "customerGrid.address");
ExitOnTab.set(qq_CustomerGrid_Address, true);
WidthPolicy.set(qq_CustomerGrid_Address, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_CustomerGrid_Address, Constants.SP_EXPLICIT);
}
return qq_CustomerGrid_Address;
}
/**
* qq_PhoneLbl: transformed from: qqds_TextGraphic
* TagId=107
* isInherited=FALSE
*/
public TextGraphic getqq_PhoneLbl() {
if (qq_PhoneLbl == null) {
qq_PhoneLbl = GraphicFactory.newTextGraphic("Phone:\n", "");
// OPTIONAL UIutils.reloadLabelText(qq_PhoneLbl, mcat);
WidthPolicy.set(qq_PhoneLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_PhoneLbl, Constants.SP_NATURAL);
qq_PhoneLbl.setMinimumSize(new Dimension(41, 16));
}
return qq_PhoneLbl;
}
/**
* qq_CustomerGrid_PhoneNumber: transformed from: qqds_DataField
* TagId=108
* isInherited=FALSE
*/
public DataField getqq_CustomerGrid_PhoneNumber() {
if (qq_CustomerGrid_PhoneNumber == null) {
// Mask type: MK_TEMPLATE
try {
MaskFormatter mf = new MaskFormatter("(###) ###-####");
mf.setPlaceholderCharacter('_');
mf.setValueContainsLiteralCharacters(false);
qq_CustomerGrid_PhoneNumber = DataFieldFactory.newDataField("PhoneNumber", 22, mf);
} catch (ParseException e) {
qq_CustomerGrid_PhoneNumber = DataFieldFactory.newDataField("PhoneNumber", 22);
Logger.getLogger("task.part.logmgr").error("Invalid mask specified for field: qq_CustomerGrid_PhoneNumber, a default field will be generated", e);
}
qq_CustomerGrid_PhoneNumber.setOriginalFormatText("(###) ###-####");
qq_CustomerGrid_PhoneNumber.setHorizontalAlignment(JTextField.LEFT);
getBindingManager().bindComponent(qq_CustomerGrid_PhoneNumber, "customerGrid.phoneNumber");
WidthPolicy.set(qq_CustomerGrid_PhoneNumber, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_CustomerGrid_PhoneNumber, Constants.SP_NATURAL);
qq_CustomerGrid_PhoneNumber.setMinimumSize(new Dimension(155, 19));
qq_CustomerGrid_PhoneNumber.setSize(new Dimension(155, 19));
}
return qq_CustomerGrid_PhoneNumber;
}
/**
* qq_CashBalanceLbl: transformed from: qqds_TextGraphic
* TagId=109
* isInherited=FALSE
*/
public TextGraphic getqq_CashBalanceLbl() {
if (qq_CashBalanceLbl == null) {
qq_CashBalanceLbl = GraphicFactory.newTextGraphic("Cash Balance:\n", "");
// OPTIONAL UIutils.reloadLabelText(qq_CashBalanceLbl, mcat);
WidthPolicy.set(qq_CashBalanceLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_CashBalanceLbl, Constants.SP_NATURAL);
qq_CashBalanceLbl.setMinimumSize(new Dimension(74, 16));
}
return qq_CashBalanceLbl;
}
/**
* qq_CustomerGrid_CashBalance: transformed from: qqds_DataField
* TagId=110
* isInherited=FALSE
*/
public DataField getqq_CustomerGrid_CashBalance() {
if (qq_CustomerGrid_CashBalance == null) {
// Mask type: MK_TEMPLATE
// original Forte format string -->$#,##0<--
this.qq_CustomerGrid_CashBalance = DataFieldFactory.newDataField("CashBalance", 17, "$#,##0", Float.TYPE);
qq_CustomerGrid_CashBalance.setOriginalFormatText("$#,##0");
qq_CustomerGrid_CashBalance.setHorizontalAlignment(JTextField.RIGHT);
getBindingManager().bindComponent(qq_CustomerGrid_CashBalance, "customerGrid.cashBalance");
WidthPolicy.set(qq_CustomerGrid_CashBalance, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_CustomerGrid_CashBalance, Constants.SP_NATURAL);
qq_CustomerGrid_CashBalance.setMinimumSize(new Dimension(120, 19));
qq_CustomerGrid_CashBalance.setSize(new Dimension(120, 19));
}
return qq_CustomerGrid_CashBalance;
}
/**
* qq_OTHRWYFLbl: transformed from: qqds_TextGraphic
* TagId=121
* isInherited=FALSE
*/
public TextGraphic getqq_OTHRWYFLbl() {
if (qq_OTHRWYFLbl == null) {
qq_OTHRWYFLbl = GraphicFactory.newTextGraphic("OTHR WYF", "");
qq_OTHRWYFLbl.setHorizontalAlignment( SwingConstants.LEFT );
// OPTIONAL UIutils.reloadLabelText(qq_OTHRWYFLbl, mcat);
WidthPolicy.set(qq_OTHRWYFLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_OTHRWYFLbl, Constants.SP_NATURAL);
qq_OTHRWYFLbl.setMinimumSize(new Dimension(61, 16));
}
return qq_OTHRWYFLbl;
}
/**
* qq_CustomerGrid_CustomerDetailGrdi: transformed from: qqds_GridField
* TagId=102
* isInherited=FALSE
* In forte this was a 2x5 grid field.
* The cell margins are all 100 mils
* The width policy is set to Natural, and the height policy is set to Natural.
*/
protected void setqq_CustomerGrid_CustomerDetailGrdiProperties() {
qq_CustomerGrid_CustomerDetailGrdi.setCellTopMargin(50);
qq_CustomerGrid_CustomerDetailGrdi.setCellBottomMargin(50);
qq_CustomerGrid_CustomerDetailGrdi.setCellLeftMargin(50);
qq_CustomerGrid_CustomerDetailGrdi.setCellRightMargin(50);
qq_CustomerGrid_CustomerDetailGrdi.setCellGravity(Constants.CG_TOPRIGHT);
qq_CustomerGrid_CustomerDetailGrdi.setCollapsed(true);
qq_CustomerGrid_CustomerDetailGrdi.setHeightPolicy(Constants.SP_NATURAL);
qq_CustomerGrid_CustomerDetailGrdi.setWidthPolicy(Constants.SP_NATURAL);
qq_CustomerGrid_CustomerDetailGrdi.setBackground(null);
qq_CustomerGrid_CustomerDetailGrdi.setMinimumSize(new Dimension(283, 257));
}
public GridField getqq_CustomerGrid_CustomerDetailGrdi() {
if (qq_CustomerGrid_CustomerDetailGrdi == null) {
qq_CustomerGrid_CustomerDetailGrdi = CompoundFieldFactory.newGridField("CustomerDetailGrdi", false);
setqq_CustomerGrid_CustomerDetailGrdiProperties();
GridBagConstraints qq_gbc = new GridBagConstraints();
qq_gbc.gridx = 1; // Column 2
qq_gbc.gridy = 0; // Row 1
qq_gbc.weightx = 0;
qq_gbc.weighty = 0;
qq_gbc.anchor = GridBagConstraints.NORTHEAST; // Gravity - original: CG_TOPRIGHT gf
qq_gbc.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid_CustomerDetailGrdi.add( getqq_OTHRWYFLbl(), qq_gbc );
GridBagConstraints qq_gbc1 = new GridBagConstraints();
qq_gbc1.gridx = 0; // Column 1
qq_gbc1.gridy = 1; // Row 2
qq_gbc1.weightx = 0;
qq_gbc1.weighty = 0;
qq_gbc1.anchor = GridBagConstraints.NORTHEAST; // Gravity - original: CG_TOPRIGHT
qq_gbc1.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc1.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid_CustomerDetailGrdi.add( getqq_NameLbl(), qq_gbc1 );
GridBagConstraints qq_gbc2 = new GridBagConstraints();
qq_gbc2.gridx = 1; // Column 2
qq_gbc2.gridy = 1; // Row 2
qq_gbc2.weightx = 0;
qq_gbc2.weighty = 0;
qq_gbc2.anchor = GridBagConstraints.NORTHEAST; // Gravity - original: CG_TOPRIGHT gf
qq_gbc2.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc2.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid_CustomerDetailGrdi.add( getqq_CustomerGrid_CustomerName(), qq_gbc2 );
GridBagConstraints qq_gbc3 = new GridBagConstraints();
qq_gbc3.gridx = 0; // Column 1
qq_gbc3.gridy = 2; // Row 3
qq_gbc3.weightx = 0;
qq_gbc3.weighty = 0;
qq_gbc3.anchor = GridBagConstraints.NORTHEAST; // Gravity - original: CG_TOPRIGHT
qq_gbc3.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc3.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid_CustomerDetailGrdi.add( getqq_AddressLbl(), qq_gbc3 );
GridBagConstraints qq_gbc4 = new GridBagConstraints();
qq_gbc4.gridx = 1; // Column 2
qq_gbc4.gridy = 2; // Row 3
qq_gbc4.weightx = 0;
qq_gbc4.weighty = 0;
qq_gbc4.anchor = GridBagConstraints.NORTHEAST; // Gravity - original: CG_TOPRIGHT gf
qq_gbc4.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc4.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid_CustomerDetailGrdi.add( getqq_CustomerGrid_Address_sp(), qq_gbc4 );
GridBagConstraints qq_gbc5 = new GridBagConstraints();
qq_gbc5.gridx = 0; // Column 1
qq_gbc5.gridy = 3; // Row 4
qq_gbc5.weightx = 0;
qq_gbc5.weighty = 0;
qq_gbc5.anchor = GridBagConstraints.NORTHEAST; // Gravity - original: CG_TOPRIGHT
qq_gbc5.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc5.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid_CustomerDetailGrdi.add( getqq_PhoneLbl(), qq_gbc5 );
GridBagConstraints qq_gbc6 = new GridBagConstraints();
qq_gbc6.gridx = 1; // Column 2
qq_gbc6.gridy = 3; // Row 4
qq_gbc6.weightx = 0;
qq_gbc6.weighty = 0;
qq_gbc6.anchor = GridBagConstraints.NORTHEAST; // Gravity - original: CG_TOPRIGHT gf
qq_gbc6.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc6.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid_CustomerDetailGrdi.add( getqq_CustomerGrid_PhoneNumber(), qq_gbc6 );
GridBagConstraints qq_gbc7 = new GridBagConstraints();
qq_gbc7.gridx = 0; // Column 1
qq_gbc7.gridy = 4; // Row 5
qq_gbc7.weightx = 0;
qq_gbc7.weighty = 0;
qq_gbc7.anchor = GridBagConstraints.NORTHEAST; // Gravity - original: CG_TOPRIGHT
qq_gbc7.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc7.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid_CustomerDetailGrdi.add( getqq_CashBalanceLbl(), qq_gbc7 );
GridBagConstraints qq_gbc8 = new GridBagConstraints();
qq_gbc8.gridx = 1; // Column 2
qq_gbc8.gridy = 4; // Row 5
qq_gbc8.weightx = 0;
qq_gbc8.weighty = 0;
qq_gbc8.anchor = GridBagConstraints.NORTHEAST; // Gravity - original: CG_TOPRIGHT gf
qq_gbc8.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc8.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid_CustomerDetailGrdi.add( getqq_CustomerGrid_CashBalance(), qq_gbc8 );
}
return qq_CustomerGrid_CustomerDetailGrdi;
}
/**
* qq_CustomerGrid_HoldingList_sp: transformed from: qqds_ArrayField
* TagId=111
* isInherited=FALSE
*/
public JScrollPane getqq_CustomerGrid_HoldingList_sp() {
if (qq_CustomerGrid_HoldingList_sp == null) {
qq_CustomerGrid_HoldingList_sp = CompoundFieldFactory.newScrollPane();
qq_CustomerGrid_HoldingList_sp.setName("HoldingList");
qq_CustomerGrid_HoldingList_sp.setViewportView(getqq_CustomerGrid_HoldingList());
qq_CustomerGrid_HoldingList_sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
qq_CustomerGrid_HoldingList_sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
qq_CustomerGrid_HoldingList_sp.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
qq_CustomerGrid_HoldingList_sp.setBackground(null);
qq_CustomerGrid_HoldingList_sp.getViewport().setBackground(null);
FrameColor.set(qq_CustomerGrid_HoldingList_sp, Constants.C_INHERIT);
WidthPolicy.set(qq_CustomerGrid_HoldingList_sp, Constants.SP_NATURAL);
HeightPolicy.set(qq_CustomerGrid_HoldingList_sp, Constants.SP_NATURAL);
// OPTIONAL qq_CustomerGrid_HoldingList_sp.setSize(new Dimension(306, 127));
qq_CustomerGrid_HoldingList_sp.setMinimumSize(new Dimension(306, 127));
qq_CustomerGrid_HoldingList_sp.setPreferredSize(new Dimension(306, 127));
}
return qq_CustomerGrid_HoldingList_sp;
}
/**
* qq_CustomerGrid_HoldingList: transformed from: qqds_ArrayField
* TagId=111
* isInherited=FALSE
*/
public ArrayField getqq_CustomerGrid_HoldingList() {
if (qq_CustomerGrid_HoldingList == null) {
qq_CustomerGrid_HoldingList = TableFactory.newArrayField("HoldingList", 19);
this.getBindingManager().bindComponent(qq_CustomerGrid_HoldingList, "customerGrid.holdingList", Holding.class,
new String[] {"stockName", "quantity", "price"});
qq_CustomerGrid_HoldingList.setVisibleRows(5);
// === Column model setup ===
// StockName converted from qqds_DataField
ArrayColumn qq_CustomerGrid_HoldingListArray_StockName_Column = new ArrayColumn("StockName", 0, new FormattedCellRenderer(getqq_CustomerGrid_HoldingListArray_StockName()), new FormattedCellEditor(getqq_CustomerGrid_HoldingListArray_StockName()), true);
qq_CustomerGrid_HoldingListArray_StockName_Column.setHeaderValue("StockName");
qq_CustomerGrid_HoldingListArray_StockName_Column.setVisible(true);
qq_CustomerGrid_HoldingList.addColumn(qq_CustomerGrid_HoldingListArray_StockName_Column);
// Quantity converted from qqds_DataField
ArrayColumn qq_CustomerGrid_HoldingListArray_Quantity_Column = new ArrayColumn("Quantity", 1, new FormattedCellRenderer(getqq_CustomerGrid_HoldingListArray_Quantity()), new FormattedCellEditor(getqq_CustomerGrid_HoldingListArray_Quantity()), true);
qq_CustomerGrid_HoldingListArray_Quantity_Column.setHeaderValue("Quantity");
qq_CustomerGrid_HoldingListArray_Quantity_Column.setVisible(true);
qq_CustomerGrid_HoldingList.addColumn(qq_CustomerGrid_HoldingListArray_Quantity_Column);
// Price converted from qqds_DataField
ArrayColumn qq_CustomerGrid_HoldingListArray_Price_Column = new ArrayColumn("Price", 2, new FormattedCellRenderer(getqq_CustomerGrid_HoldingListArray_Price()), new FormattedCellEditor(getqq_CustomerGrid_HoldingListArray_Price()), true);
qq_CustomerGrid_HoldingListArray_Price_Column.setHeaderValue("Price");
qq_CustomerGrid_HoldingListArray_Price_Column.setVisible(true);
qq_CustomerGrid_HoldingList.addColumn(qq_CustomerGrid_HoldingListArray_Price_Column);
// === End column model ===
TableFactory.postModelArrayField(qq_CustomerGrid_HoldingList);
}
return qq_CustomerGrid_HoldingList;
}
/**
* qq_CustomerGrid: transformed from: qqds_GridField
* TagId=101
* isInherited=FALSE
* In forte this was a 1x2 grid field, displaying a Customer object.
* The cell margins are all 100 mils
* The width policy is set to Natural, and the height policy is set to Natural.
*/
protected void setqq_CustomerGridProperties() {
qq_CustomerGrid.setCellTopMargin(50);
qq_CustomerGrid.setCellBottomMargin(50);
qq_CustomerGrid.setCellLeftMargin(50);
qq_CustomerGrid.setCellRightMargin(50);
qq_CustomerGrid.setCellGravity(Constants.CG_CENTER);
qq_CustomerGrid.setCollapsed(true);
qq_CustomerGrid.setHeightPolicy(Constants.SP_NATURAL);
qq_CustomerGrid.setWidthPolicy(Constants.SP_NATURAL);
qq_CustomerGrid.setBackground(null);
qq_CustomerGrid.setMinimumSize(new Dimension(328, 427));
}
public GridField getqq_CustomerGrid() {
if (qq_CustomerGrid == null) {
qq_CustomerGrid = CompoundFieldFactory.newGridField("CustomerGrid", false);
getBindingManager().bindComponent(qq_CustomerGrid, "customerGrid");
setqq_CustomerGridProperties();
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_CENTER gf
qq_gbc.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid.add( getqq_CustomerGrid_CustomerDetailGrdi(), qq_gbc );
GridBagConstraints qq_gbc1 = new GridBagConstraints();
qq_gbc1.gridx = 0; // Column 1
qq_gbc1.gridy = 1; // Row 2
qq_gbc1.weightx = 0;
qq_gbc1.weighty = 0;
qq_gbc1.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_CENTER gf
qq_gbc1.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc1.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
qq_CustomerGrid.add( getqq_CustomerGrid_HoldingList_sp(), qq_gbc1 );
}
return qq_CustomerGrid;
}
/**
* qq_BuyBtn: transformed from: qqds_PushButton
* TagId=44
* isInherited=FALSE
*/
public JButton getqq_BuyBtn() {
if (qq_BuyBtn == null) {
qq_BuyBtn = PushButtonFactory.newInstance("BuyBtn", "Buy");
qq_BuyBtn.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_BuyBtn, Constants.SP_NATURAL);
HeightPolicy.set(qq_BuyBtn, Constants.SP_NATURAL);
qq_BuyBtn.setMinimumSize(new Dimension(33, 23));
}
return qq_BuyBtn;
}
/**
* qq_SellBtn: transformed from: qqds_PushButton
* TagId=45
* isInherited=FALSE
*/
public JButton getqq_SellBtn() {
if (qq_SellBtn == null) {
qq_SellBtn = PushButtonFactory.newInstance("SellBtn", "Sell");
qq_SellBtn.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_SellBtn, Constants.SP_NATURAL);
HeightPolicy.set(qq_SellBtn, Constants.SP_NATURAL);
qq_SellBtn.setMinimumSize(new Dimension(29, 23));
}
return qq_SellBtn;
}
/**
* qq_ExitBtn: transformed from: qqds_PushButton
* TagId=46
* isInherited=FALSE
*/
public JButton getqq_ExitBtn() {
if (qq_ExitBtn == null) {
qq_ExitBtn = PushButtonFactory.newInstance("ExitBtn", "Exit");
qq_ExitBtn.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_ExitBtn, Constants.SP_NATURAL);
HeightPolicy.set(qq_ExitBtn, Constants.SP_NATURAL);
qq_ExitBtn.setMinimumSize(new Dimension(32, 23));
}
return qq_ExitBtn;
}
/**
* qq_ButtonGrid: transformed from: qqds_GridField
* TagId=120
* isInherited=FALSE
* In forte this was a 3x1 grid field.
* The top and bottom cell margins are both 100 mils and the left and right cell margins are both 200 mils.
* The width policy is set to Natural, and the height policy is set to Natural.
*/
protected void setqq_ButtonGridProperties() {
qq_ButtonGrid.setCellTopMargin(50);
qq_ButtonGrid.setCellBottomMargin(50);
qq_ButtonGrid.setCellLeftMargin(100);
qq_ButtonGrid.setCellRightMargin(100);
qq_ButtonGrid.setCellGravity(Constants.CG_CENTER);
qq_ButtonGrid.setIgnoreInvisibleChildren(true);
qq_ButtonGrid.setCollapsed(true);
qq_ButtonGrid.setHeightPolicy(Constants.SP_NATURAL);
qq_ButtonGrid.setWidthPolicy(Constants.SP_NATURAL);
qq_ButtonGrid.setBackground(null);
qq_ButtonGrid.setMinimumSize(new Dimension(216, 45));
}
public GridField getqq_ButtonGrid() {
if (qq_ButtonGrid == null) {
qq_ButtonGrid = CompoundFieldFactory.newGridField("ButtonGrid", false);
setqq_ButtonGridProperties();
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_CENTER gf
qq_gbc.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc.insets = new Insets(4, 9, 4, 9); // Top, Left, Bottom, Right Margin
qq_ButtonGrid.add( getqq_BuyBtn(), 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_CENTER gf
qq_gbc1.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc1.insets = new Insets(4, 9, 4, 9); // Top, Left, Bottom, Right Margin
qq_ButtonGrid.add( getqq_SellBtn(), 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.CENTER; // Gravity - original: CG_CENTER gf
qq_gbc2.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc2.insets = new Insets(4, 9, 4, 9); // Top, Left, Bottom, Right Margin
qq_ButtonGrid.add( getqq_ExitBtn(), qq_gbc2 );
}
return qq_ButtonGrid;
}
/**
* qq_OutrGrid: transformed from: qqds_GridField
* TagId=100
* isInherited=FALSE
* In forte this was a 1x2 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_OutrGridProperties() {
qq_OutrGrid.setCellGravity(Constants.CG_CENTER);
qq_OutrGrid.setCollapsed(true);
qq_OutrGrid.setHeightPolicy(Constants.SP_NATURAL);
qq_OutrGrid.setWidthPolicy(Constants.SP_NATURAL);
qq_OutrGrid.setBackground(null);
qq_OutrGrid.setMinimumSize(new Dimension(331, 477));
qq_OutrGrid.setLocation(33, 36);
}
public GridField getqq_OutrGrid() {
if (qq_OutrGrid == null) {
qq_OutrGrid = CompoundFieldFactory.newGridField("OutrGrid", false);
setqq_OutrGridProperties();
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_CENTER 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_OutrGrid.add( getqq_CustomerGrid(), qq_gbc );
GridBagConstraints qq_gbc1 = new GridBagConstraints();
qq_gbc1.gridx = 0; // Column 1
qq_gbc1.gridy = 1; // Row 2
qq_gbc1.weightx = 0;
qq_gbc1.weighty = 0;
qq_gbc1.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_CENTER 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_OutrGrid.add( getqq_ButtonGrid(), qq_gbc1 );
}
return qq_OutrGrid;
}
/**
* Form: transformed from: qqds_Panel
* TagId=1
* isInherited=FALSE
*/
protected void setFormProperties() {
Form.setOpaque( true );
ColourChange.setBackground(Form, UIutils.White);
}
public JPanel getForm() {
if (Form == null) {
Form = CompoundFieldFactory.newForm();
this.setFormProperties();
Form.add( getqq_OutrGrid() );
}
return Form;
}
/**
* 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) {
if (value != this.qq_defaultSet) {
this.qq_defaultSet = value;
UIutils.reloadLabelText(this);
}
}
/**
* 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) {
if (value != this.qq_msgNumber) {
this.qq_msgSet = value;
UIutils.reloadTitle(this, this.qq_msgSet, this.qq_msgNumber);
}
}
/**
* 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) {
if (value != this.qq_msgSet) {
this.qq_msgNumber = value;
UIutils.reloadTitle(this, this.qq_msgSet, this.qq_msgNumber);
}
}
/**
* qq_CustomerGrid_HoldingListArray_StockName: transformed from: qqds_DataField
* TagId=112
* isInherited=FALSE
*/
public DataField getqq_CustomerGrid_HoldingListArray_StockName() {
if (qq_CustomerGrid_HoldingListArray_StockName == null) {
// Mask type: MK_NONE
qq_CustomerGrid_HoldingListArray_StockName = DataFieldFactory.newDataField("StockName", 19, Constants.MK_NONE);
qq_CustomerGrid_HoldingListArray_StockName.setHorizontalAlignment(JTextField.LEFT);
WidthPolicy.set(qq_CustomerGrid_HoldingListArray_StockName, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_CustomerGrid_HoldingListArray_StockName, Constants.SP_NATURAL);
qq_CustomerGrid_HoldingListArray_StockName.setMinimumSize(new Dimension(124, 19));
qq_CustomerGrid_HoldingListArray_StockName.setSize(new Dimension(124, 19));
qq_CustomerGrid_HoldingListArray_StockName.setLocation(16, 249);
ArrayFieldCellHelper.setUpCellEditor(qq_CustomerGrid_HoldingListArray_StockName, qq_CustomerGrid_HoldingList, 0, false);
}
return qq_CustomerGrid_HoldingListArray_StockName;
}
/**
* qq_CustomerGrid_HoldingListArray_Quantity: transformed from: qqds_DataField
* TagId=114
* isInherited=FALSE
*/
public DataField getqq_CustomerGrid_HoldingListArray_Quantity() {
if (qq_CustomerGrid_HoldingListArray_Quantity == null) {
// Mask type: MK_NONE
qq_CustomerGrid_HoldingListArray_Quantity = DataFieldFactory.newDataField("Quantity", 10, Constants.MK_NONE);
qq_CustomerGrid_HoldingListArray_Quantity.setValue(Integer.valueOf(0));
qq_CustomerGrid_HoldingListArray_Quantity.setHorizontalAlignment(JTextField.RIGHT);
WidthPolicy.set(qq_CustomerGrid_HoldingListArray_Quantity, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_CustomerGrid_HoldingListArray_Quantity, Constants.SP_NATURAL);
qq_CustomerGrid_HoldingListArray_Quantity.setMinimumSize(new Dimension(75, 19));
qq_CustomerGrid_HoldingListArray_Quantity.setSize(new Dimension(75, 19));
qq_CustomerGrid_HoldingListArray_Quantity.setLocation(144, 249);
ArrayFieldCellHelper.setUpCellEditor(qq_CustomerGrid_HoldingListArray_Quantity, qq_CustomerGrid_HoldingList, 1, false);
}
return qq_CustomerGrid_HoldingListArray_Quantity;
}
/**
* qq_CustomerGrid_HoldingListArray_Price: transformed from: qqds_DataField
* TagId=116
* isInherited=FALSE
*/
public DataField getqq_CustomerGrid_HoldingListArray_Price() {
if (qq_CustomerGrid_HoldingListArray_Price == null) {
// Mask type: MK_TEMPLATE
// original Forte format string -->$#,##0<--
this.qq_CustomerGrid_HoldingListArray_Price = DataFieldFactory.newDataField("Price", 12, "$#,##0", Float.TYPE);
qq_CustomerGrid_HoldingListArray_Price.setOriginalFormatText("$#,##0");
qq_CustomerGrid_HoldingListArray_Price.setHorizontalAlignment(JTextField.RIGHT);
WidthPolicy.set(qq_CustomerGrid_HoldingListArray_Price, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_CustomerGrid_HoldingListArray_Price, Constants.SP_NATURAL);
qq_CustomerGrid_HoldingListArray_Price.setMinimumSize(new Dimension(87, 19));
qq_CustomerGrid_HoldingListArray_Price.setSize(new Dimension(87, 19));
qq_CustomerGrid_HoldingListArray_Price.setLocation(228, 252);
ArrayFieldCellHelper.setUpCellEditor(qq_CustomerGrid_HoldingListArray_Price, qq_CustomerGrid_HoldingList, 2, false);
}
return qq_CustomerGrid_HoldingListArray_Price;
}
/**
* Initialise the window and all its children.
*/
protected void initialize() {
if (this.Form == null) {
this.setName( "CustomerWindow" );
this.setTitle( "Customer Stock Holdings" );
this.setSetNum(1);
this.setTitleMsgNum(0);
this.setTitleSetNum(0);
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(WindowConstants.DO_NOTHING_ON_CLOSE);
this.setUsage(Constants.WU_UPDATE);
UIutils.processGUIActions();
this.pack();
this.setInitialX(0);
this.setInitialY(0);
this.setInitialPositionPolicy(Constants.PP_SYSTEMDEFAULT);
}
}
// ----------------
// Window usage
//-----------------
protected WindowUsageMap qq_usage = new WindowUsageMap();
public int getUsage() {
return this.qq_usage.getUsage();
}
public WindowUsageMap getUsageMap() {
return this.qq_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.qq_usage.setUsage(usage);
}
public void qq_setupWindowUsage() {
this.qq_usage = new WindowUsageMap();
this.qq_usage.add(getqq_OutrGrid(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_CustomerGrid(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_CustomerGrid_CustomerDetailGrdi(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_NameLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.qq_usage.add(getqq_CustomerGrid_CustomerName(), Constants.FS_VIEWONLY, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_AddressLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.qq_usage.add(getqq_CustomerGrid_Address(), Constants.FS_VIEWONLY, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_PhoneLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.qq_usage.add(getqq_CustomerGrid_PhoneNumber(), Constants.FS_VIEWONLY, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_CashBalanceLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.qq_usage.add(getqq_CustomerGrid_CashBalance(), Constants.FS_VIEWONLY, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_OTHRWYFLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.qq_usage.add(getqq_CustomerGrid_HoldingList(), Constants.FS_VIEWONLY, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_CustomerGrid_HoldingListArray_StockName(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_CustomerGrid_HoldingListArray_Quantity(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_CustomerGrid_HoldingListArray_Price(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_ButtonGrid(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.qq_usage.add(getqq_BuyBtn(), Constants.FS_UPDATE, Constants.FS_INVISIBLE, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.qq_usage.add(getqq_SellBtn(), Constants.FS_UPDATE, Constants.FS_INVISIBLE, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.qq_usage.add(getqq_ExitBtn(), Constants.FS_UPDATE, Constants.FS_UPDATE, 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);
CustomerWindow myClass = new CustomerWindow();
myClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
myClass.setVisible(true);
UIutils.processGUIActions();
}
} // end class CustomerWindow
// c Pass 2 Conversion Time: 578 milliseconds