package ListView;
import DisplayProject.Array_Of_DisplayNode;
import DisplayProject.Array_Of_OutlineColumnDesc;
import DisplayProject.CloseHideAdaptor;
import DisplayProject.Constants;
import DisplayProject.CursorMgr;
import DisplayProject.DataField;
import DisplayProject.DisplayNode;
import DisplayProject.OutlineColumnDesc;
import DisplayProject.UDSWindow;
import DisplayProject.UIutils;
import DisplayProject.WindowManager;
import DisplayProject.WindowUsageMap;
import DisplayProject.actions.AppletConnectionInfo;
import DisplayProject.actions.CommandType;
import DisplayProject.actions.FieldPopupMenu;
import DisplayProject.actions.HeightPolicy;
import DisplayProject.actions.OutlineFieldHasMultipleSelection;
import DisplayProject.actions.OutlineSelectedNodes;
import DisplayProject.actions.TreeFieldCurrentNode;
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.ListView;
import DisplayProject.events.ClientEventManager;
import DisplayProject.factory.CompoundFieldFactory;
import DisplayProject.factory.DataFieldFactory;
import DisplayProject.factory.MenuFactory;
import DisplayProject.factory.PushButtonFactory;
import DisplayProject.factory.TableFactory;
import DisplayProject.plaf.Win32LookAndFeel;
import Framework.ErrorMgr;
import Framework.EventHandle;
import Framework.EventManager;
import Framework.EventRegistration;
import Framework.File;
import Framework.ForteKeyboardFocusManager;
import Framework.FrameworkUtils;
import Framework.ParameterHolder;
import Framework.RuntimeProperties;
import Framework.TextData;
import Framework.UsageException;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.KeyboardFocusManager;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ComponentListener;
import java.awt.event.KeyEvent;
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.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
import javax.swing.UIManager;
import org.apache.log4j.Logger;
/**
* RunMe<p>
* <p>
* @author Generated from Forte
* @since 19-Nov-2008
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@UDSWindow()
@SuppressWarnings("serial")
public class RunMe
extends JFrame
implements Serializable, Observable
{
// ----------
// Attributes
// ----------
protected File DefaultHelpFile;
protected BindingManager bindingManager = null;
public PropertyChangeSupport qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
private TextData df;
private TextData df2;
private DisplayNode lv;
// ------------
// Constructors
// ------------
public RunMe() {
// Explicitly call the superclass constructor to prevent the implicit call
super();
this.initialize();
}
// ----------------------
// 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 setDf(TextData df) {
TextData oldValue = this.df;
this.df = df;
this.qq_Listeners.firePropertyChange("df", oldValue, this.df);
}
public TextData getDf() {
return this.df;
}
public void setDf2(TextData df2) {
TextData oldValue = this.df2;
this.df2 = df2;
this.qq_Listeners.firePropertyChange("df2", oldValue, this.df2);
}
public TextData getDf2() {
return this.df2;
}
public void setLv(DisplayNode lv) {
DisplayNode oldValue = this.getLv();
this.getqq_lv().setRootNode(lv);
this.qq_Listeners.firePropertyChange("lv", oldValue, lv);
}
public DisplayNode getLv() {
return (DisplayNode)this.getqq_lv().getRootNode();
}
// -------
// 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() {
this.setDf(new TextData());
this.setDf2(new TextData());
//<lv>.font = self.Window.WindowSystem.GetPortableFont(typeface = TF_HELVETICA, pointSize = 120, isBold = FALSE);
FieldPopupMenu.set(this.getqq_lv(), this.getqq_mPopUp());
this.setLv(new DisplayNode());
Array_Of_DisplayNode<DisplayNode> nodes = new Array_Of_DisplayNode<DisplayNode>();
nodes.add(new DisplayNode(new TextData("7 Row 1"), DisplayNode.qq_Resolver.cDVNODETEXT));
nodes.add(new DisplayNode(new TextData("0 Row 2"), DisplayNode.qq_Resolver.cDVNODETEXT));
nodes.add(new DisplayNode(new TextData("2 Row 3"), DisplayNode.qq_Resolver.cDVNODETEXT));
nodes.add(new DisplayNode(new TextData("4 Row 4"), DisplayNode.qq_Resolver.cDVNODETEXT));
nodes.add(new DisplayNode(new TextData("1 Row 5"), DisplayNode.qq_Resolver.cDVNODETEXT));
nodes.add(new DisplayNode(new TextData("5 Row 6"), DisplayNode.qq_Resolver.cDVNODETEXT));
nodes.add(new DisplayNode(new TextData("9 Row 7"), DisplayNode.qq_Resolver.cDVNODETEXT));
nodes.add(new DisplayNode(new TextData("6 Row 8"), DisplayNode.qq_Resolver.cDVNODETEXT));
nodes.add(new DisplayNode(new TextData("8 Row 9"), DisplayNode.qq_Resolver.cDVNODETEXT));
nodes.add(new DisplayNode(new TextData("3 Row 10"), DisplayNode.qq_Resolver.cDVNODETEXT));
this.getqq_lv().setViewNodes(nodes);
OutlineFieldHasMultipleSelection.set(this.getqq_lv(), true);
this.getqq_lv().setHasTitles(false);
UserWindow.open(this);
// ----------
// Event Loop
// ----------
EventManager.startEventLoop();
try {
EventRegistration ListView_AfterCurrentNodeChange_getqq_lv = ClientEventManager.register( this.getqq_lv(), "AfterCurrentNodeChange" );
EventRegistration PushButton_Click_getqq_btn = ClientEventManager.register( this.getqq_btn(), "Click" );
EventRegistration PushButton_Click_getqq_btn2 = ClientEventManager.register( this.getqq_btn2(), "Click" );
EventRegistration TaskHandle_Shutdown_langThreadcurrentThread = ClientEventManager.register( Thread.currentThread(), "Shutdown" );
while (true) {
UIutils.processGUIActions();
EventHandle qq_currentEvent = EventManager.waitForEvent();
if (qq_currentEvent == null)
break;
// ---------------------------
// <lv>.aftercurrentnodechange
// ---------------------------
if (qq_currentEvent.isEvent(ListView_AfterCurrentNodeChange_getqq_lv)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
int row = ((ParameterHolder)qq_currentEvent.getParameter("NewRowNumber")).getInt();
TextData aaa = new TextData( "Row " );
aaa.concat(row);
Logger.getLogger("task.part.logmgr").info(aaa);
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// -----------
// <btn>.click
// -----------
else if (qq_currentEvent.isEvent(PushButton_Click_getqq_btn)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
//<lv>.font = self.Window.WindowSystem.GetPortableFont(typeface = TF_HELVETICA, pointSize = 160, isBold = TRUE);
OutlineSelectedNodes.set(this.getqq_lv(), nodes);
Logger.getLogger("task.part.logmgr").info( Boolean.toString(this.getqq_lv().getHasTitles()));
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// ------------
// <btn2>.click
// ------------
else if (qq_currentEvent.isEvent(PushButton_Click_getqq_btn2)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
TreeFieldCurrentNode.set(this.getqq_lv(), nodes.get(2));
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
// -------------
// task.Shutdown
// -------------
else if (qq_currentEvent.isEvent(TaskHandle_Shutdown_langThreadcurrentThread)) {
try {
CursorMgr.startEvent();
// ================ Begin Forte Event Handler Translation ================
break;
// ================ End Forte Event Handler Translation ================
}
finally {
CursorMgr.endEvent();
}
}
}
EventManager.deregister( ListView_AfterCurrentNodeChange_getqq_lv );
EventManager.deregister( PushButton_Click_getqq_btn );
EventManager.deregister( PushButton_Click_getqq_btn2 );
EventManager.deregister( TaskHandle_Shutdown_langThreadcurrentThread );
}
//catch (Exception qq_error) {
//Logger.getLogger("task.part.Event").error("Event loop terminated by unhandled exception: " + qq_error.getMessage(), qq_error );
//throw qq_error;
//}
finally {
EventManager.endEventLoop();
UserWindow.close(this);
}
}
// ------------------
// Window Definitions
// ------------------
// <editor-fold defaultstate="collapsed" desc="Window Definitions">
private int qq_defaultSet = 1;
private int qq_msgNumber = 0;
private int qq_msgSet = 0;
protected Window primaryWindow = null;
protected int initialX;
protected int initialY;
protected int qq_SystemClosePolicy = Constants.SC_ENABLEDSHUTDOWN;
protected int qq_initialPositionPolicy = Constants.PP_SYSTEMDEFAULT;
public DataField qq_df2;
public DataField qq_df;
public JButton qq_btn2;
public JButton qq_btn;
public JMenu qq_FileMenu;
public JMenu qq_SubMenu;
public JMenuBar qq_MainMenuBar;
public JMenuItem qq_exitMenu;
public JMenuItem qq_fileExit;
public JMenuItem qq_mCraig;
public JPanel Form;
public JPopupMenu qq_mPopUp;
public ListView qq_lv;
public OutlineColumnDesc qq_lv_DVNodeText;
/**
* qq_fileExit: transformed from: qqds_MenuCommand
*/
public JMenuItem getqq_fileExit() {
if (qq_fileExit == null) {
qq_fileExit = MenuFactory.newMenuItem("fileExit", true);
qq_fileExit.setVerifyInputWhenFocusTarget(true);
qq_fileExit.setMnemonic( 'x' );
qq_fileExit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F4, ActionEvent.ALT_MASK));
CommandType.set(qq_fileExit, Constants.CT_EXIT);
qq_fileExit.setText( "Exit" );
qq_fileExit.setVisible(true);
}
return qq_fileExit;
}
public void setqq_fileExit(JMenuItem value) {
JMenuItem oldValue = qq_fileExit;
qq_fileExit = value;
this.qq_Listeners.firePropertyChange("qq_fileExit", oldValue, value);
}
/**
* qq_FileMenu: transformed from: qqds_Submenu
*/
public JMenu getqq_FileMenu() {
if (qq_FileMenu == null) {
qq_FileMenu = new JMenu();
qq_FileMenu.setName("FileMenu");
qq_FileMenu.setMnemonic( 'F' );
qq_FileMenu.setText( "File" );
qq_FileMenu.setVisible(true);
qq_FileMenu.add(getqq_fileExit());
}
return qq_FileMenu;
}
/**
* qq_exitMenu: transformed from: qqds_MenuCommand
*/
public JMenuItem getqq_exitMenu() {
if (qq_exitMenu == null) {
qq_exitMenu = MenuFactory.newMenuItem("exitMenu", true);
qq_exitMenu.setVerifyInputWhenFocusTarget(true);
qq_exitMenu.setMnemonic( 'x' );
CommandType.set(qq_exitMenu, Constants.CT_CUSTOM);
qq_exitMenu.setText( "Exit" );
qq_exitMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.CTRL_MASK));
qq_exitMenu.setVisible(true);
}
return qq_exitMenu;
}
public void setqq_exitMenu(JMenuItem value) {
JMenuItem oldValue = qq_exitMenu;
qq_exitMenu = value;
this.qq_Listeners.firePropertyChange("qq_exitMenu", oldValue, value);
}
/**
* qq_SubMenu: transformed from: qqds_Submenu
*/
public JMenu getqq_SubMenu() {
if (qq_SubMenu == null) {
qq_SubMenu = new JMenu();
qq_SubMenu.setName("");
qq_SubMenu.setMnemonic( 'i' );
qq_SubMenu.setText( "File2" );
qq_SubMenu.setVisible(true);
qq_SubMenu.add(getqq_exitMenu());
}
return qq_SubMenu;
}
/**
* qq_mCraig: transformed from: qqds_MenuCommand
*/
public JMenuItem getqq_mCraig() {
if (qq_mCraig == null) {
qq_mCraig = MenuFactory.newMenuItem("mCraig", true);
qq_mCraig.setVerifyInputWhenFocusTarget(true);
CommandType.set(qq_mCraig, Constants.CT_CUSTOM);
qq_mCraig.setText( "Craig Rulz!" );
qq_mCraig.setVisible(true);
}
return qq_mCraig;
}
public void setqq_mCraig(JMenuItem value) {
JMenuItem oldValue = qq_mCraig;
qq_mCraig = value;
this.qq_Listeners.firePropertyChange("qq_mCraig", oldValue, value);
}
/**
* qq_mPopUp: transformed from: qqds_Submenu
*/
public JPopupMenu getqq_mPopUp() {
if (qq_mPopUp == null) {
qq_mPopUp = new JPopupMenu();
qq_mPopUp.setName("mPopUp");
qq_mPopUp.setVisible(true);
qq_mPopUp.add(getqq_mCraig());
}
return qq_mPopUp;
}
/**
* qq_MainMenuBar: transformed from: qqds_MenuBar
*/
public JMenuBar getqq_MenuBar() {
if (qq_MainMenuBar == null) {
qq_MainMenuBar = MenuFactory.newMenuBar();
qq_MainMenuBar.setName("MainMenuBar");
qq_MainMenuBar.setBorderPainted(false);
this.qq_MainMenuBar.add(getqq_FileMenu());
this.qq_MainMenuBar.add(getqq_SubMenu());
}
return qq_MainMenuBar;
}
public void setqq_MainMenuBar(JMenuBar value) {
JMenuBar oldValue = qq_MainMenuBar;
qq_MainMenuBar = value;
this.qq_Listeners.firePropertyChange("qq_MainMenuBar", oldValue, value);
}
/**
* qq_df: transformed from: qqds_DataField
* TagId=18
* isInherited=FALSE
*/
public DataField getqq_df() {
if (qq_df == null) {
// Mask type: MK_NONE
qq_df = DataFieldFactory.newDataField("df", 89, TextData.class, Constants.MK_NONE);
qq_df.setValue("");
qq_df.setOriginalFormatText(null);
qq_df.setHorizontalAlignment(JTextField.LEFT);
getBindingManager().bindComponent(qq_df, "df");
WidthPolicy.set(qq_df, Constants.SP_EXPLICIT);
HeightPolicy.set(qq_df, Constants.SP_NATURAL);
qq_df.setMinimumSize(new Dimension(544, 21));
qq_df.setSize(new Dimension(544, 21));
qq_df.setLocation(0, 403);
}
return qq_df;
}
public void setqq_df(DataField value) {
DataField oldValue = qq_df;
qq_df = value;
this.qq_Listeners.firePropertyChange("qq_df", oldValue, value);
}
/**
* qq_df2: transformed from: qqds_DataField
* TagId=25
* isInherited=FALSE
*/
public DataField getqq_df2() {
if (qq_df2 == null) {
// Mask type: MK_NONE
qq_df2 = DataFieldFactory.newDataField("df2", 10, TextData.class, Constants.MK_NONE);
qq_df2.setValue("");
qq_df2.setOriginalFormatText(null);
qq_df2.setHorizontalAlignment(JTextField.LEFT);
getBindingManager().bindComponent(qq_df2, "df2");
WidthPolicy.set(qq_df2, Constants.SP_TO_PARENT);
HeightPolicy.set(qq_df2, Constants.SP_NATURAL);
int width = UIutils.colsToPixels(10, qq_df2);
qq_df2.setMinimumSize(new Dimension(width, 21));
qq_df2.setLocation(16, 470);
}
return qq_df2;
}
public void setqq_df2(DataField value) {
DataField oldValue = qq_df2;
qq_df2 = value;
this.qq_Listeners.firePropertyChange("qq_df2", oldValue, value);
}
/**
* qq_lv: transformed from: qqds_ListView
* TagId=12
* isInherited=FALSE
*/
public ListView getqq_lv() {
if (qq_lv == null) {
qq_lv = TableFactory.newListView("lv", Constants.LT_DETAIL, null, Font.PLAIN);
qq_lv.setMappedType(Array_Of_DisplayNode.class);
Array_Of_OutlineColumnDesc<OutlineColumnDesc> columns = new Array_Of_OutlineColumnDesc<OutlineColumnDesc>();
columns.add(getqq_lv_DVNodeText());
qq_lv.setColumnList(columns);
qq_lv.setHasTitles(true);
qq_lv.setVisibleLines(7);
qq_lv.setVisibleColumns(35);
WidthPolicy.set(qq_lv, Constants.SP_NATURAL);
HeightPolicy.set(qq_lv, Constants.SP_NATURAL);
qq_lv.setLocation(0, 2);
}
return qq_lv;
}
public void setqq_lv(ListView value) {
ListView oldValue = qq_lv;
qq_lv = value;
this.qq_Listeners.firePropertyChange("qq_lv", oldValue, value);
}
public OutlineColumnDesc getqq_lv_DVNodeText() {
if (qq_lv_DVNodeText == null) {
qq_lv_DVNodeText = new OutlineColumnDesc(Constants.TA_LEFT, false, false, 30, "DVNodeText", Constants.FP_FIXED, Constants.FS_VISIBLE, "DVNodeText", 0);
}
return qq_lv_DVNodeText;
}
/**
* qq_btn: transformed from: qqds_PushButton
* TagId=19
* isInherited=FALSE
*/
public JButton getqq_btn() {
if (qq_btn == null) {
qq_btn = PushButtonFactory.newInstance("btn", "Select");
qq_btn.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_btn, Constants.SP_NATURAL);
HeightPolicy.set(qq_btn, Constants.SP_NATURAL);
qq_btn.setMinimumSize(new Dimension(48, 26));
qq_btn.setLocation(31, 430);
}
return qq_btn;
}
public void setqq_btn(JButton value) {
JButton oldValue = qq_btn;
qq_btn = value;
this.qq_Listeners.firePropertyChange("qq_btn", oldValue, value);
}
/**
* qq_btn2: transformed from: qqds_PushButton
* TagId=30
* isInherited=FALSE
*/
public JButton getqq_btn2() {
if (qq_btn2 == null) {
qq_btn2 = PushButtonFactory.newInstance("btn2", "Select 2");
qq_btn2.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_btn2, Constants.SP_NATURAL);
HeightPolicy.set(qq_btn2, Constants.SP_NATURAL);
qq_btn2.setMinimumSize(new Dimension(57, 26));
qq_btn2.setLocation(124, 441);
}
return qq_btn2;
}
public void setqq_btn2(JButton value) {
JButton oldValue = qq_btn2;
qq_btn2 = value;
this.qq_Listeners.firePropertyChange("qq_btn2", 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_btn2() );
Form.add( getqq_btn() );
Form.add( getqq_lv() );
Form.add( getqq_df2() );
Form.add( getqq_df() );
}
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( "RunMe" );
this.setTitle( "" );
this.setSystemClosePolicy(Constants.SC_ENABLEDSHUTDOWN);
this.setJMenuBar( getqq_MenuBar() );
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_fileExit(), Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED);
this.usage.add(getqq_FileMenu(), Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED);
this.usage.add(getqq_exitMenu(), Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED);
this.usage.add(getqq_SubMenu(), Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED);
this.usage.add(getqq_mCraig(), Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED);
this.usage.add(getqq_mPopUp(), Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED, Constants.MS_ENABLED);
this.usage.add(getqq_df(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_df2(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_lv(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
this.usage.add(getqq_btn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
this.usage.add(getqq_btn2(), 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();
RunMe runMe_start = new RunMe();
runMe_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 RunMe
// c Pass 2 Conversion Time: 422 milliseconds