package Express.windows;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.KeyboardFocusManager;
import java.awt.event.ComponentListener;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;
import javax.swing.UIManager;
import DisplayProject.CloseHideAdaptor;
import DisplayProject.Constants;
import DisplayProject.GridField;
import DisplayProject.UIutils;
import DisplayProject.UsageMap;
import DisplayProject.WindowFormLayout;
import DisplayProject.WindowManager;
import DisplayProject.actions.HeightPolicy;
import DisplayProject.actions.UserWindow;
import DisplayProject.actions.WidgetState;
import DisplayProject.actions.WidthPolicy;
import DisplayProject.binding.BindingManager;
import DisplayProject.binding.beans.ExtendedPropertyChangeSupport;
import DisplayProject.binding.beans.Observable;
import DisplayProject.controls.PictureGraphic;
import DisplayProject.controls.TextGraphic;
import DisplayProject.factory.CompoundFieldFactory;
import DisplayProject.factory.GraphicFactory;
import DisplayProject.factory.PushButtonFactory;
import Framework.ErrorMgr;
import Framework.File;
import Framework.ForteKeyboardFocusManager;
import Framework.ImageData;
import Framework.RuntimeProperties;
import Framework.UsageException;
import com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel;
/**
* The IconWindow class stores the enabled and disabled icons for all the toolbar buttons.
* <p>
* @author ITerative Consulting
* @since 26-Feb-2008
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@SuppressWarnings("serial")
public class IconWindow
extends JFrame
implements Serializable, Observable
{
// ----------
// Attributes
// ----------
protected File DefaultHelpFile;
protected BindingManager bindingManager = null;
public PropertyChangeSupport qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
// ------------
// Constructors
// ------------
public IconWindow() {
// 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;
//this.getForm().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), "VK_HELP");
//this.getForm().getActionMap().put("VK_HELP", new HelpAction(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;
}
// -------
// 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);
}
// ------------------
// 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 int initialX;
protected int initialY;
protected int qq_SystemClosePolicy = Constants.SC_ENABLEDSHUTDOWN;
protected int qq_initialPositionPolicy = Constants.PP_SYSTEMDEFAULT;
public GridField qq_GridField1;
public GridField qq_GridField;
public JButton qq_ClearDisabledIcon;
public JButton qq_ClearIcon;
public JButton qq_DeleteDisabledIcon;
public JButton qq_DeleteIcon;
public JButton qq_InsertDisabledIcon;
public JButton qq_InsertIcon;
public JButton qq_SaveDisabledIcon;
public JButton qq_SaveIcon;
public JButton qq_SearchDisabledIcon;
public JButton qq_SearchIcon;
public JPanel Form;
public PictureGraphic qq_FolderLeftEdge;
public PictureGraphic qq_FolderOneLeftEdge;
public TextGraphic qq_ClearResultSetLbl;
public TextGraphic qq_DeleteRecordLbl;
public TextGraphic qq_DisabledLbl;
public TextGraphic qq_EnabledLbl;
public TextGraphic qq_InsertRecordLbl;
public TextGraphic qq_SaveLbl;
public TextGraphic qq_SearchLbl;
public TextGraphic qq_ToolbarIconsLbl;
/**
* qq_DisabledLbl: transformed from: qqds_TextGraphic
* TagId=65531
*/
public TextGraphic getqq_DisabledLbl() {
if (qq_DisabledLbl == null) {
qq_DisabledLbl = GraphicFactory.newTextGraphic("Disabled\n", "");
qq_DisabledLbl.setFont(new Font("Default", Font.BOLD, 11));
// OPTIONAL UIutils.reloadLabelText(qq_DisabledLbl, mcat);
WidthPolicy.set(qq_DisabledLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_DisabledLbl, Constants.SP_NATURAL);
qq_DisabledLbl.setPreferredSize(UIutils.labelWidth(qq_DisabledLbl));
}
return qq_DisabledLbl;
}
/**
* qq_EnabledLbl: transformed from: qqds_TextGraphic
* TagId=65530
*/
public TextGraphic getqq_EnabledLbl() {
if (qq_EnabledLbl == null) {
qq_EnabledLbl = GraphicFactory.newTextGraphic("Enabled\n", "");
qq_EnabledLbl.setFont(new Font("Default", Font.BOLD, 11));
// OPTIONAL UIutils.reloadLabelText(qq_EnabledLbl, mcat);
WidthPolicy.set(qq_EnabledLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_EnabledLbl, Constants.SP_NATURAL);
qq_EnabledLbl.setPreferredSize(UIutils.labelWidth(qq_EnabledLbl));
}
return qq_EnabledLbl;
}
/**
* qq_ToolbarIconsLbl: transformed from: qqds_TextGraphic
* TagId=65529
*/
public TextGraphic getqq_ToolbarIconsLbl() {
if (qq_ToolbarIconsLbl == null) {
qq_ToolbarIconsLbl = GraphicFactory.newTextGraphic("Toolbar Icons\n", "");
qq_ToolbarIconsLbl.setFont(new Font("Default", Font.BOLD, 11));
// OPTIONAL UIutils.reloadLabelText(qq_ToolbarIconsLbl, mcat);
WidthPolicy.set(qq_ToolbarIconsLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_ToolbarIconsLbl, Constants.SP_NATURAL);
qq_ToolbarIconsLbl.setPreferredSize(UIutils.labelWidth(qq_ToolbarIconsLbl));
}
return qq_ToolbarIconsLbl;
}
/**
* qq_ClearResultSetLbl: transformed from: qqds_TextGraphic
* TagId=65528
*/
public TextGraphic getqq_ClearResultSetLbl() {
if (qq_ClearResultSetLbl == null) {
qq_ClearResultSetLbl = GraphicFactory.newTextGraphic("Clear Result Set\n", "");
qq_ClearResultSetLbl.setFont(new Font("Default", Font.PLAIN, 11));
// OPTIONAL UIutils.reloadLabelText(qq_ClearResultSetLbl, mcat);
WidthPolicy.set(qq_ClearResultSetLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_ClearResultSetLbl, Constants.SP_NATURAL);
qq_ClearResultSetLbl.setPreferredSize(UIutils.labelWidth(qq_ClearResultSetLbl));
}
return qq_ClearResultSetLbl;
}
/**
* qq_SearchLbl: transformed from: qqds_TextGraphic
* TagId=65527
*/
public TextGraphic getqq_SearchLbl() {
if (qq_SearchLbl == null) {
qq_SearchLbl = GraphicFactory.newTextGraphic("Search\n", "");
qq_SearchLbl.setFont(new Font("Default", Font.PLAIN, 11));
// OPTIONAL UIutils.reloadLabelText(qq_SearchLbl, mcat);
WidthPolicy.set(qq_SearchLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_SearchLbl, Constants.SP_NATURAL);
qq_SearchLbl.setPreferredSize(UIutils.labelWidth(qq_SearchLbl));
}
return qq_SearchLbl;
}
/**
* qq_InsertRecordLbl: transformed from: qqds_TextGraphic
* TagId=65526
*/
public TextGraphic getqq_InsertRecordLbl() {
if (qq_InsertRecordLbl == null) {
qq_InsertRecordLbl = GraphicFactory.newTextGraphic("Insert Record\n", "");
qq_InsertRecordLbl.setFont(new Font("Default", Font.PLAIN, 11));
// OPTIONAL UIutils.reloadLabelText(qq_InsertRecordLbl, mcat);
WidthPolicy.set(qq_InsertRecordLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_InsertRecordLbl, Constants.SP_NATURAL);
qq_InsertRecordLbl.setPreferredSize(UIutils.labelWidth(qq_InsertRecordLbl));
}
return qq_InsertRecordLbl;
}
/**
* qq_SaveLbl: transformed from: qqds_TextGraphic
* TagId=65525
*/
public TextGraphic getqq_SaveLbl() {
if (qq_SaveLbl == null) {
qq_SaveLbl = GraphicFactory.newTextGraphic("Save\n", "");
qq_SaveLbl.setFont(new Font("Default", Font.PLAIN, 11));
// OPTIONAL UIutils.reloadLabelText(qq_SaveLbl, mcat);
WidthPolicy.set(qq_SaveLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_SaveLbl, Constants.SP_NATURAL);
qq_SaveLbl.setPreferredSize(UIutils.labelWidth(qq_SaveLbl));
}
return qq_SaveLbl;
}
/**
* qq_DeleteRecordLbl: transformed from: qqds_TextGraphic
* TagId=65520
*/
public TextGraphic getqq_DeleteRecordLbl() {
if (qq_DeleteRecordLbl == null) {
qq_DeleteRecordLbl = GraphicFactory.newTextGraphic("Delete Record\n", "");
qq_DeleteRecordLbl.setFont(new Font("Default", Font.PLAIN, 11));
// OPTIONAL UIutils.reloadLabelText(qq_DeleteRecordLbl, mcat);
WidthPolicy.set(qq_DeleteRecordLbl, Constants.SP_NATURAL);
HeightPolicy.set(qq_DeleteRecordLbl, Constants.SP_NATURAL);
qq_DeleteRecordLbl.setPreferredSize(UIutils.labelWidth(qq_DeleteRecordLbl));
}
return qq_DeleteRecordLbl;
}
/**
* qq_FolderOneLeftEdge: transformed from: qqds_PictureGraphic
* TagId=12
*/
public PictureGraphic getqq_FolderOneLeftEdge() {
if (qq_FolderOneLeftEdge == null) {
qq_FolderOneLeftEdge = GraphicFactory.newPictureGraphic("", Constants.CG_CENTER);
qq_FolderOneLeftEdge.setImageValue(new ImageData(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_FolderOneLeftEdge.png"))));
qq_FolderOneLeftEdge.setName("FolderOneLeftEdge");
qq_FolderOneLeftEdge.setWidthPolicy(Constants.SP_NATURAL);
qq_FolderOneLeftEdge.setHeightPolicy(Constants.SP_NATURAL);
qq_FolderOneLeftEdge.setImageSizePolicy(Constants.IS_NATURAL);
qq_FolderOneLeftEdge.setOpaque( true );
qq_FolderOneLeftEdge.setSize(new Dimension(4, 36));
qq_FolderOneLeftEdge.setMinimumSize(new Dimension(4, 36));
qq_FolderOneLeftEdge.setPreferredSize(new Dimension(4, 36));
}
return qq_FolderOneLeftEdge;
}
/**
* qq_FolderLeftEdge: transformed from: qqds_PictureGraphic
* TagId=13
*/
public PictureGraphic getqq_FolderLeftEdge() {
if (qq_FolderLeftEdge == null) {
qq_FolderLeftEdge = GraphicFactory.newPictureGraphic("", Constants.CG_CENTER);
qq_FolderLeftEdge.setImageValue(new ImageData(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_FolderLeftEdge.png"))));
qq_FolderLeftEdge.setName("FolderLeftEdge");
qq_FolderLeftEdge.setWidthPolicy(Constants.SP_NATURAL);
qq_FolderLeftEdge.setHeightPolicy(Constants.SP_NATURAL);
qq_FolderLeftEdge.setImageSizePolicy(Constants.IS_NATURAL);
qq_FolderLeftEdge.setOpaque( true );
qq_FolderLeftEdge.setSize(new Dimension(4, 36));
qq_FolderLeftEdge.setMinimumSize(new Dimension(4, 36));
qq_FolderLeftEdge.setPreferredSize(new Dimension(4, 36));
}
return qq_FolderLeftEdge;
}
/**
* qq_InsertIcon: transformed from: qqds_PictureButton
* TagId=65506
*/
public JButton getqq_InsertIcon() {
if (qq_InsertIcon == null) {
qq_InsertIcon = PushButtonFactory.newInstance("InsertIcon");
qq_InsertIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_InsertIcon.png")));
qq_InsertIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_InsertIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_InsertIcon, Constants.SP_NATURAL);
qq_InsertIcon.setSize(new Dimension(31, 31));
qq_InsertIcon.setMinimumSize(new Dimension(31, 31));
qq_InsertIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_InsertIcon;
}
/**
* qq_ClearIcon: transformed from: qqds_PictureButton
* TagId=65505
*/
public JButton getqq_ClearIcon() {
if (qq_ClearIcon == null) {
qq_ClearIcon = PushButtonFactory.newInstance("ClearIcon");
qq_ClearIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_ClearIcon.png")));
qq_ClearIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_ClearIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_ClearIcon, Constants.SP_NATURAL);
qq_ClearIcon.setSize(new Dimension(31, 31));
qq_ClearIcon.setMinimumSize(new Dimension(31, 31));
qq_ClearIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_ClearIcon;
}
/**
* qq_SearchIcon: transformed from: qqds_PictureButton
* TagId=65504
*/
public JButton getqq_SearchIcon() {
if (qq_SearchIcon == null) {
qq_SearchIcon = PushButtonFactory.newInstance("SearchIcon");
qq_SearchIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_SearchIcon.png")));
qq_SearchIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_SearchIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_SearchIcon, Constants.SP_NATURAL);
qq_SearchIcon.setSize(new Dimension(31, 31));
qq_SearchIcon.setMinimumSize(new Dimension(31, 31));
qq_SearchIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_SearchIcon;
}
/**
* qq_SaveIcon: transformed from: qqds_PictureButton
* TagId=65503
*/
public JButton getqq_SaveIcon() {
if (qq_SaveIcon == null) {
qq_SaveIcon = PushButtonFactory.newInstance("SaveIcon");
qq_SaveIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_SaveIcon.png")));
qq_SaveIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_SaveIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_SaveIcon, Constants.SP_NATURAL);
qq_SaveIcon.setSize(new Dimension(31, 31));
qq_SaveIcon.setMinimumSize(new Dimension(31, 31));
qq_SaveIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_SaveIcon;
}
/**
* qq_DeleteIcon: transformed from: qqds_PictureButton
* TagId=65502
*/
public JButton getqq_DeleteIcon() {
if (qq_DeleteIcon == null) {
qq_DeleteIcon = PushButtonFactory.newInstance("DeleteIcon");
qq_DeleteIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_DeleteIcon.png")));
qq_DeleteIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_DeleteIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_DeleteIcon, Constants.SP_NATURAL);
qq_DeleteIcon.setSize(new Dimension(31, 31));
qq_DeleteIcon.setMinimumSize(new Dimension(31, 31));
qq_DeleteIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_DeleteIcon;
}
/**
* qq_ClearDisabledIcon: transformed from: qqds_PictureButton
* TagId=65497
*/
public JButton getqq_ClearDisabledIcon() {
if (qq_ClearDisabledIcon == null) {
qq_ClearDisabledIcon = PushButtonFactory.newInstance("ClearDisabledIcon");
qq_ClearDisabledIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_ClearDisabledIcon.png")));
qq_ClearDisabledIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_ClearDisabledIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_ClearDisabledIcon, Constants.SP_NATURAL);
qq_ClearDisabledIcon.setSize(new Dimension(31, 31));
qq_ClearDisabledIcon.setMinimumSize(new Dimension(31, 31));
qq_ClearDisabledIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_ClearDisabledIcon;
}
/**
* qq_SearchDisabledIcon: transformed from: qqds_PictureButton
* TagId=65496
*/
public JButton getqq_SearchDisabledIcon() {
if (qq_SearchDisabledIcon == null) {
qq_SearchDisabledIcon = PushButtonFactory.newInstance("SearchDisabledIcon");
qq_SearchDisabledIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_SearchDisabledIcon.png")));
qq_SearchDisabledIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_SearchDisabledIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_SearchDisabledIcon, Constants.SP_NATURAL);
qq_SearchDisabledIcon.setSize(new Dimension(31, 31));
qq_SearchDisabledIcon.setMinimumSize(new Dimension(31, 31));
qq_SearchDisabledIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_SearchDisabledIcon;
}
/**
* qq_SaveDisabledIcon: transformed from: qqds_PictureButton
* TagId=65495
*/
public JButton getqq_SaveDisabledIcon() {
if (qq_SaveDisabledIcon == null) {
qq_SaveDisabledIcon = PushButtonFactory.newInstance("SaveDisabledIcon");
qq_SaveDisabledIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_SaveDisabledIcon.png")));
qq_SaveDisabledIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_SaveDisabledIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_SaveDisabledIcon, Constants.SP_NATURAL);
qq_SaveDisabledIcon.setSize(new Dimension(31, 31));
qq_SaveDisabledIcon.setMinimumSize(new Dimension(31, 31));
qq_SaveDisabledIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_SaveDisabledIcon;
}
/**
* qq_InsertDisabledIcon: transformed from: qqds_PictureButton
* TagId=65494
*/
public JButton getqq_InsertDisabledIcon() {
if (qq_InsertDisabledIcon == null) {
qq_InsertDisabledIcon = PushButtonFactory.newInstance("InsertDisabledIcon");
qq_InsertDisabledIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_InsertDisabledIcon.png")));
qq_InsertDisabledIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_InsertDisabledIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_InsertDisabledIcon, Constants.SP_NATURAL);
qq_InsertDisabledIcon.setSize(new Dimension(31, 31));
qq_InsertDisabledIcon.setMinimumSize(new Dimension(31, 31));
qq_InsertDisabledIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_InsertDisabledIcon;
}
/**
* qq_DeleteDisabledIcon: transformed from: qqds_PictureButton
* TagId=65493
*/
public JButton getqq_DeleteDisabledIcon() {
if (qq_DeleteDisabledIcon == null) {
qq_DeleteDisabledIcon = PushButtonFactory.newInstance("DeleteDisabledIcon");
qq_DeleteDisabledIcon.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Express/windows/IconWindow.qq_DeleteDisabledIcon.png")));
qq_DeleteDisabledIcon.setVerifyInputWhenFocusTarget(true);
WidthPolicy.set(qq_DeleteDisabledIcon, Constants.SP_NATURAL);
HeightPolicy.set(qq_DeleteDisabledIcon, Constants.SP_NATURAL);
qq_DeleteDisabledIcon.setSize(new Dimension(31, 31));
qq_DeleteDisabledIcon.setMinimumSize(new Dimension(31, 31));
qq_DeleteDisabledIcon.setPreferredSize(new Dimension(31, 31));
}
return qq_DeleteDisabledIcon;
}
/**
* qq_GridField1: transformed from: qqds_GridField
* TagId=65532
* In forte this was a 3x7 grid field.
* The top and bottom cell margins are both 40 mils, but neither the left nor the right cell margins are set.
* The width policy is set to Natural, and the height policy is set to Natural.
*/
public GridField getqq_GridField1() {
if (qq_GridField1 == null) {
qq_GridField1 = CompoundFieldFactory.newGridField("");
qq_GridField1.setCellTopMargin(20);
qq_GridField1.setCellBottomMargin(20);
qq_GridField1.setCellGravity(Constants.CG_CENTER);
qq_GridField1.setCollapsed(true);
qq_GridField1.setInsertPolicy(Constants.IP_EXPAND);
qq_GridField1.setHeightPolicy(Constants.SP_NATURAL);
qq_GridField1.setWidthPolicy(Constants.SP_NATURAL);
// OPTIONAL UIutils.reloadLabelText(qq_GridField1, mcat);
qq_GridField1.setBackground(null);
// OPTIONAL qq_GridField1.setSize(new Dimension(209, 249));
// OPTIONAL qq_GridField1.setMinimumSize(new Dimension(209, 249));
// OPTIONAL qq_GridField1.setPreferredSize(new Dimension(209, 249));
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.SOUTHEAST; // Gravity - original: CG_BOTTOMRIGHT
qq_gbc.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_ToolbarIconsLbl(), 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.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc1.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc1.insets = new Insets(7, 0, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_EnabledLbl(), 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.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc2.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc2.insets = new Insets(7, 0, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_DisabledLbl(), qq_gbc2 );
GridBagConstraints qq_gbc3 = new GridBagConstraints();
qq_gbc3.gridx = 0; // Column 1
qq_gbc3.gridy = 1; // Row 2
qq_gbc3.weightx = 0;
qq_gbc3.weighty = 0;
qq_gbc3.anchor = GridBagConstraints.EAST; // Gravity - original: CG_MIDDLERIGHT
qq_gbc3.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc3.insets = new Insets(1, 0, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_ClearResultSetLbl(), qq_gbc3 );
GridBagConstraints qq_gbc4 = new GridBagConstraints();
qq_gbc4.gridx = 1; // Column 2
qq_gbc4.gridy = 1; // Row 2
qq_gbc4.weightx = 0;
qq_gbc4.weighty = 0;
qq_gbc4.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc4.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc4.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_ClearIcon(), qq_gbc4 );
GridBagConstraints qq_gbc5 = new GridBagConstraints();
qq_gbc5.gridx = 2; // Column 3
qq_gbc5.gridy = 1; // Row 2
qq_gbc5.weightx = 0;
qq_gbc5.weighty = 0;
qq_gbc5.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc5.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc5.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_ClearDisabledIcon(), qq_gbc5 );
GridBagConstraints qq_gbc6 = new GridBagConstraints();
qq_gbc6.gridx = 0; // Column 1
qq_gbc6.gridy = 2; // Row 3
qq_gbc6.weightx = 0;
qq_gbc6.weighty = 0;
qq_gbc6.anchor = GridBagConstraints.EAST; // Gravity - original: CG_MIDDLERIGHT
qq_gbc6.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc6.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_SearchLbl(), qq_gbc6 );
GridBagConstraints qq_gbc7 = new GridBagConstraints();
qq_gbc7.gridx = 1; // Column 2
qq_gbc7.gridy = 2; // Row 3
qq_gbc7.weightx = 0;
qq_gbc7.weighty = 0;
qq_gbc7.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc7.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc7.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_SearchIcon(), qq_gbc7 );
GridBagConstraints qq_gbc8 = new GridBagConstraints();
qq_gbc8.gridx = 2; // Column 3
qq_gbc8.gridy = 2; // Row 3
qq_gbc8.weightx = 0;
qq_gbc8.weighty = 0;
qq_gbc8.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc8.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc8.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_SearchDisabledIcon(), qq_gbc8 );
GridBagConstraints qq_gbc9 = new GridBagConstraints();
qq_gbc9.gridx = 0; // Column 1
qq_gbc9.gridy = 3; // Row 4
qq_gbc9.weightx = 0;
qq_gbc9.weighty = 0;
qq_gbc9.anchor = GridBagConstraints.EAST; // Gravity - original: CG_MIDDLERIGHT
qq_gbc9.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc9.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_SaveLbl(), qq_gbc9 );
GridBagConstraints qq_gbc10 = new GridBagConstraints();
qq_gbc10.gridx = 1; // Column 2
qq_gbc10.gridy = 3; // Row 4
qq_gbc10.weightx = 0;
qq_gbc10.weighty = 0;
qq_gbc10.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc10.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc10.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_SaveIcon(), qq_gbc10 );
GridBagConstraints qq_gbc11 = new GridBagConstraints();
qq_gbc11.gridx = 2; // Column 3
qq_gbc11.gridy = 3; // Row 4
qq_gbc11.weightx = 0;
qq_gbc11.weighty = 0;
qq_gbc11.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc11.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc11.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_SaveDisabledIcon(), qq_gbc11 );
GridBagConstraints qq_gbc12 = new GridBagConstraints();
qq_gbc12.gridx = 0; // Column 1
qq_gbc12.gridy = 4; // Row 5
qq_gbc12.weightx = 0;
qq_gbc12.weighty = 0;
qq_gbc12.anchor = GridBagConstraints.EAST; // Gravity - original: CG_MIDDLERIGHT
qq_gbc12.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc12.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_InsertRecordLbl(), qq_gbc12 );
GridBagConstraints qq_gbc13 = new GridBagConstraints();
qq_gbc13.gridx = 1; // Column 2
qq_gbc13.gridy = 4; // Row 5
qq_gbc13.weightx = 0;
qq_gbc13.weighty = 0;
qq_gbc13.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc13.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc13.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_InsertIcon(), qq_gbc13 );
GridBagConstraints qq_gbc14 = new GridBagConstraints();
qq_gbc14.gridx = 2; // Column 3
qq_gbc14.gridy = 4; // Row 5
qq_gbc14.weightx = 0;
qq_gbc14.weighty = 0;
qq_gbc14.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc14.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc14.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_InsertDisabledIcon(), qq_gbc14 );
GridBagConstraints qq_gbc15 = new GridBagConstraints();
qq_gbc15.gridx = 0; // Column 1
qq_gbc15.gridy = 5; // Row 6
qq_gbc15.weightx = 0;
qq_gbc15.weighty = 0;
qq_gbc15.anchor = GridBagConstraints.EAST; // Gravity - original: CG_MIDDLERIGHT
qq_gbc15.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc15.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_DeleteRecordLbl(), qq_gbc15 );
GridBagConstraints qq_gbc16 = new GridBagConstraints();
qq_gbc16.gridx = 1; // Column 2
qq_gbc16.gridy = 5; // Row 6
qq_gbc16.weightx = 0;
qq_gbc16.weighty = 0;
qq_gbc16.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc16.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc16.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_DeleteIcon(), qq_gbc16 );
GridBagConstraints qq_gbc17 = new GridBagConstraints();
qq_gbc17.gridx = 2; // Column 3
qq_gbc17.gridy = 5; // Row 6
qq_gbc17.weightx = 0;
qq_gbc17.weighty = 0;
qq_gbc17.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc17.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc17.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_DeleteDisabledIcon(), qq_gbc17 );
GridBagConstraints qq_gbc18 = new GridBagConstraints();
qq_gbc18.gridx = 1; // Column 2
qq_gbc18.gridy = 6; // Row 7
qq_gbc18.weightx = 0;
qq_gbc18.weighty = 0;
qq_gbc18.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc18.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc18.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_FolderOneLeftEdge(), qq_gbc18 );
GridBagConstraints qq_gbc19 = new GridBagConstraints();
qq_gbc19.gridx = 2; // Column 3
qq_gbc19.gridy = 6; // Row 7
qq_gbc19.weightx = 0;
qq_gbc19.weighty = 0;
qq_gbc19.anchor = GridBagConstraints.SOUTHWEST; // Gravity - original: CG_BOTTOMLEFT
qq_gbc19.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
qq_gbc19.insets = new Insets(1, 9, 1, 0); // Top, Left, Bottom, Right Margin
qq_GridField1.add( getqq_FolderLeftEdge(), qq_gbc19 );
}
return qq_GridField1;
}
/**
* qq_GridField: transformed from: qqds_GridField
* TagId=65535
* In forte this was a 1x1 grid field.
* There are no cell margins set
* The width policy is set to Natural, and the height policy is set to Natural.
*/
public GridField getqq_GridField() {
if (qq_GridField == null) {
qq_GridField = CompoundFieldFactory.newGridField("");
qq_GridField.setCellGravity(Constants.CG_CENTER);
qq_GridField.setCollapsed(true);
qq_GridField.setInsertPolicy(Constants.IP_EXPAND);
qq_GridField.setHeightPolicy(Constants.SP_NATURAL);
qq_GridField.setWidthPolicy(Constants.SP_NATURAL);
// OPTIONAL UIutils.reloadLabelText(qq_GridField, mcat);
qq_GridField.setBackground(null);
// OPTIONAL qq_GridField.setSize(new Dimension(209, 249));
// OPTIONAL qq_GridField.setMinimumSize(new Dimension(209, 249));
// OPTIONAL qq_GridField.setPreferredSize(new Dimension(209, 249));
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_GridField.add( getqq_GridField1(), qq_gbc );
}
return qq_GridField;
}
/**
* Form: transformed from: qqds_Panel
* TagId=1
*/
public JPanel getForm() {
if (Form == null) {
Form = CompoundFieldFactory.newForm();
Form.setLayout(new WindowFormLayout(this));
Form.setOpaque( true );
Form.add( getqq_GridField() );
}
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;
UserWindow.setInitialPositionPolicy(this, policy);
}
/**
* 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.
*/
private void initialize() {
this.setName( "IconWindow" );
this.setTitle( "Sample Icons" );
this.setSystemClosePolicy(Constants.SC_ENABLEDSHUTDOWN);
if (this.getContentPane() != this.getForm()) {
this.setContentPane(getForm());
}
this.setResizable( false );
this.setAlwaysOnTop(false);
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
//-----------------
private UsageMap[] usageUpdate;
public UsageMap[] getUsageUpdate() {
if (usageUpdate == null) {
usageUpdate = new UsageMap[] {
new UsageMap(getqq_GridField(), Constants.FS_UPDATE),
new UsageMap(getqq_GridField1(), Constants.FS_UPDATE),
new UsageMap(getqq_DisabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_EnabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ToolbarIconsLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearResultSetLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderOneLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertIcon(), Constants.FS_DISABLED),
new UsageMap(getqq_ClearIcon(), Constants.FS_DISABLED),
new UsageMap(getqq_SearchIcon(), Constants.FS_DISABLED),
new UsageMap(getqq_SaveIcon(), Constants.FS_DISABLED),
new UsageMap(getqq_DeleteIcon(), Constants.FS_DISABLED),
new UsageMap(getqq_ClearDisabledIcon(), Constants.FS_UPDATE),
new UsageMap(getqq_SearchDisabledIcon(), Constants.FS_UPDATE),
new UsageMap(getqq_SaveDisabledIcon(), Constants.FS_UPDATE),
new UsageMap(getqq_InsertDisabledIcon(), Constants.FS_UPDATE),
new UsageMap(getqq_DeleteDisabledIcon(), Constants.FS_UPDATE),
};
}
return usageUpdate;
}
private UsageMap[] usageView;
public UsageMap[] getUsageView() {
if (usageView == null) {
usageView = new UsageMap[] {
new UsageMap(getqq_GridField(), Constants.FS_UPDATE),
new UsageMap(getqq_GridField1(), Constants.FS_UPDATE),
new UsageMap(getqq_DisabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_EnabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ToolbarIconsLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearResultSetLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderOneLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertIcon(), Constants.FS_VIEWONLY),
new UsageMap(getqq_ClearIcon(), Constants.FS_VIEWONLY),
new UsageMap(getqq_SearchIcon(), Constants.FS_VIEWONLY),
new UsageMap(getqq_SaveIcon(), Constants.FS_VIEWONLY),
new UsageMap(getqq_DeleteIcon(), Constants.FS_VIEWONLY),
new UsageMap(getqq_ClearDisabledIcon(), Constants.FS_VIEWONLY),
new UsageMap(getqq_SearchDisabledIcon(), Constants.FS_VIEWONLY),
new UsageMap(getqq_SaveDisabledIcon(), Constants.FS_VIEWONLY),
new UsageMap(getqq_InsertDisabledIcon(), Constants.FS_VIEWONLY),
new UsageMap(getqq_DeleteDisabledIcon(), Constants.FS_VIEWONLY),
};
}
return usageView;
}
private UsageMap[] usageQuery;
public UsageMap[] getUsageQuery() {
if (usageQuery == null) {
usageQuery = new UsageMap[] {
new UsageMap(getqq_GridField(), Constants.FS_QUERY),
new UsageMap(getqq_GridField1(), Constants.FS_QUERY),
new UsageMap(getqq_DisabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_EnabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ToolbarIconsLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearResultSetLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderOneLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertIcon(), Constants.FS_QUERY),
new UsageMap(getqq_ClearIcon(), Constants.FS_QUERY),
new UsageMap(getqq_SearchIcon(), Constants.FS_QUERY),
new UsageMap(getqq_SaveIcon(), Constants.FS_QUERY),
new UsageMap(getqq_DeleteIcon(), Constants.FS_QUERY),
new UsageMap(getqq_ClearDisabledIcon(), Constants.FS_QUERY),
new UsageMap(getqq_SearchDisabledIcon(), Constants.FS_QUERY),
new UsageMap(getqq_SaveDisabledIcon(), Constants.FS_QUERY),
new UsageMap(getqq_InsertDisabledIcon(), Constants.FS_QUERY),
new UsageMap(getqq_DeleteDisabledIcon(), Constants.FS_QUERY),
};
}
return usageQuery;
}
private UsageMap[] usageUser1;
public UsageMap[] getUsageUser1() {
if (usageUser1 == null) {
usageUser1 = new UsageMap[] {
new UsageMap(getqq_GridField(), Constants.FS_UPDATE),
new UsageMap(getqq_GridField1(), Constants.FS_UPDATE),
new UsageMap(getqq_DisabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_EnabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ToolbarIconsLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearResultSetLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderOneLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteDisabledIcon(), Constants.FS_INACTIVE),
};
}
return usageUser1;
}
private UsageMap[] usageUser2;
public UsageMap[] getUsageUser2() {
if (usageUser2 == null) {
usageUser2 = new UsageMap[] {
new UsageMap(getqq_GridField(), Constants.FS_UPDATE),
new UsageMap(getqq_GridField1(), Constants.FS_UPDATE),
new UsageMap(getqq_DisabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_EnabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ToolbarIconsLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearResultSetLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderOneLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteDisabledIcon(), Constants.FS_INACTIVE),
};
}
return usageUser2;
}
private UsageMap[] usageUser3;
public UsageMap[] getUsageUser3() {
if (usageUser3 == null) {
usageUser3 = new UsageMap[] {
new UsageMap(getqq_GridField(), Constants.FS_UPDATE),
new UsageMap(getqq_GridField1(), Constants.FS_UPDATE),
new UsageMap(getqq_DisabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_EnabledLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ToolbarIconsLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearResultSetLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteRecordLbl(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderOneLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_FolderLeftEdge(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_ClearDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SearchDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_SaveDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_InsertDisabledIcon(), Constants.FS_INACTIVE),
new UsageMap(getqq_DeleteDisabledIcon(), Constants.FS_INACTIVE),
};
}
return usageUser3;
}
protected int Usage = 0;
public int getUsage() {
if (Usage == 0) {
this.setUsage(DisplayProject.Constants.WU_UPDATE);
}
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 u) {
if (this.Usage != u) {
this.Usage = u;
UsageMap[] usage = null;
switch (u) {
case DisplayProject.Constants.WU_UPDATE:
usage = this.getUsageUpdate();
break;
case DisplayProject.Constants.WU_VIEW:
usage = this.getUsageView();
break;
case DisplayProject.Constants.WU_QUERY:
usage = this.getUsageQuery();
break;
case DisplayProject.Constants.WU_USER1:
usage = this.getUsageUser1();
break;
case DisplayProject.Constants.WU_USER2:
usage = this.getUsageUser2();
break;
case DisplayProject.Constants.WU_USER3:
usage = this.getUsageUser3();
break;
default:
throw new UsageException("Window usage " + u + " is unknown." );
}
for (int i = 0 ; i < usage.length; i++) {
WidgetState.set((JComponent)usage[i].getComponent(), usage[i].getState());
}
}
}
// </editor-fold>
// -----------
// Main method
// -----------
public static void main(String []args) {
KeyboardFocusManager.setCurrentKeyboardFocusManager(new ForteKeyboardFocusManager());
try {
// To change to platform look and feel, uncomment the following line,
// and remove the WindowsClassicLookAndFeel
// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
// Forte displayed windows with a clasic Look and Feel
UIManager.setLookAndFeel(new WindowsClassicLookAndFeel());
}
catch (Exception e) {}
ToolTipManager.sharedInstance().setDismissDelay(Integer.MAX_VALUE);
IconWindow myClass = new IconWindow();
myClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
myClass.setVisible(true);
UIutils.processGUIActions();
}
} // end class IconWindow
// c Pass 2 Conversion Time: 594 milliseconds