mirror of https://github.com/acidanthera/audk.git
1. Move resize funtions from IInternalFrame.java to Tools.java.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1337 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
f094c270ee
commit
8792f60fcb
|
@ -17,7 +17,6 @@ package org.tianocore.frameworkwizard;
|
|||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ComponentEvent;
|
||||
import java.awt.event.ComponentListener;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
import java.awt.event.WindowEvent;
|
||||
|
@ -55,6 +54,7 @@ import org.tianocore.frameworkwizard.common.Identifications.Identification;
|
|||
import org.tianocore.frameworkwizard.common.Identifications.OpeningModuleType;
|
||||
import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageType;
|
||||
import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;
|
||||
import org.tianocore.frameworkwizard.common.find.FindPPIsResult;
|
||||
import org.tianocore.frameworkwizard.common.ui.IDefaultMutableTreeNode;
|
||||
import org.tianocore.frameworkwizard.common.ui.IDesktopManager;
|
||||
import org.tianocore.frameworkwizard.common.ui.IFrame;
|
||||
|
@ -105,8 +105,7 @@ import org.tianocore.frameworkwizard.workspace.ui.SwitchWorkspace;
|
|||
It extends IFrame implements MouseListener, TreeSelectionListener, ComponentListener and MenuListener
|
||||
|
||||
**/
|
||||
public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSelectionListener, ComponentListener,
|
||||
MenuListener {
|
||||
public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSelectionListener, MenuListener {
|
||||
///
|
||||
/// Define class Serial Version UID
|
||||
///
|
||||
|
@ -217,8 +216,6 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
|
||||
private JMenuItem jMenuItemEditSelectAll = null;
|
||||
|
||||
private JMenuItem jMenuItemEditFind = null;
|
||||
|
||||
private JMenuItem jMenuItemEditFindNext = null;
|
||||
|
||||
private JMenu jMenuView = null;
|
||||
|
@ -281,6 +278,20 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
|
||||
private JMenuItem jMenuItemProjectCreateFar = null;
|
||||
|
||||
private JMenu jMenuEditFind = null;
|
||||
|
||||
private JMenuItem jMenuItemEditFindPcd = null;
|
||||
|
||||
private JMenuItem jMenuItemEditFindLibraryClass = null;
|
||||
|
||||
private JMenuItem jMenuItemEditFindPpi = null;
|
||||
|
||||
private JMenuItem jMenuItemEditFindProtocol = null;
|
||||
|
||||
private JMenuItem jMenuItemEditFindGuid = null;
|
||||
|
||||
private JMenuItem jMenuItemEditFindLibraryInstance = null;
|
||||
|
||||
///
|
||||
/// A static definition for this class itself
|
||||
///
|
||||
|
@ -477,18 +488,18 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
//
|
||||
jMenuEdit.add(getJMenuItemEditUndo());
|
||||
jMenuEdit.add(getJMenuItemEditRedo());
|
||||
jMenuEdit.addSeparator();
|
||||
//jMenuEdit.addSeparator();
|
||||
|
||||
jMenuEdit.add(getJMenuItemEditCut());
|
||||
jMenuEdit.add(getJMenuItemEditCopy());
|
||||
jMenuEdit.add(getJMenuItemEditPaste());
|
||||
jMenuEdit.add(getJMenuItemEditDelete());
|
||||
jMenuEdit.addSeparator();
|
||||
//jMenuEdit.addSeparator();
|
||||
|
||||
jMenuEdit.add(getJMenuItemEditSelectAll());
|
||||
jMenuEdit.add(getJMenuItemEditFind());
|
||||
jMenuEdit.add(getJMenuEditFind());
|
||||
jMenuEdit.add(getJMenuItemEditFindNext());
|
||||
jMenuEdit.addSeparator();
|
||||
//jMenuEdit.addSeparator();
|
||||
}
|
||||
return jMenuEdit;
|
||||
}
|
||||
|
@ -654,6 +665,8 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
jMenuItemEditDelete = new JMenuItem();
|
||||
jMenuItemEditDelete.setText("Delete");
|
||||
jMenuItemEditDelete.setMnemonic('D');
|
||||
jMenuItemEditDelete.setVisible(false);
|
||||
jMenuItemEditDelete.setEnabled(false);
|
||||
jMenuItemEditDelete.addActionListener(this);
|
||||
//
|
||||
//Disabled first when no module is open
|
||||
|
@ -985,6 +998,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
jMenuItemEditUndo.setText("Undo");
|
||||
jMenuItemEditUndo.setMnemonic('U');
|
||||
jMenuItemEditUndo.setEnabled(false);
|
||||
jMenuItemEditUndo.setVisible(false);
|
||||
jMenuItemEditUndo.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditUndo;
|
||||
|
@ -1002,6 +1016,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
jMenuItemEditRedo.setText("Redo");
|
||||
jMenuItemEditRedo.setMnemonic('R');
|
||||
jMenuItemEditRedo.setEnabled(false);
|
||||
jMenuItemEditRedo.setVisible(false);
|
||||
jMenuItemEditRedo.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditRedo;
|
||||
|
@ -1019,6 +1034,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
jMenuItemEditCut.setText("Cut");
|
||||
jMenuItemEditCut.setMnemonic('t');
|
||||
jMenuItemEditCut.setEnabled(false);
|
||||
jMenuItemEditCut.setVisible(false);
|
||||
jMenuItemEditCut.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditCut;
|
||||
|
@ -1036,6 +1052,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
jMenuItemEditCopy.setText("Copy");
|
||||
jMenuItemEditCopy.setMnemonic('C');
|
||||
jMenuItemEditCopy.setEnabled(false);
|
||||
jMenuItemEditCopy.setVisible(false);
|
||||
jMenuItemEditCopy.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditCopy;
|
||||
|
@ -1053,6 +1070,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
jMenuItemEditPaste.setText("Paste");
|
||||
jMenuItemEditPaste.setMnemonic('P');
|
||||
jMenuItemEditPaste.setEnabled(false);
|
||||
jMenuItemEditPaste.setVisible(false);
|
||||
jMenuItemEditPaste.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditPaste;
|
||||
|
@ -1070,28 +1088,12 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
jMenuItemEditSelectAll.setText("Select All");
|
||||
jMenuItemEditSelectAll.setMnemonic('A');
|
||||
jMenuItemEditSelectAll.setEnabled(false);
|
||||
jMenuItemEditSelectAll.setVisible(false);
|
||||
jMenuItemEditSelectAll.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditSelectAll;
|
||||
}
|
||||
|
||||
/**
|
||||
This method initializes jMenuItemEditFind
|
||||
|
||||
@return javax.swing.JMenuItem
|
||||
|
||||
**/
|
||||
private JMenuItem getJMenuItemEditFind() {
|
||||
if (jMenuItemEditFind == null) {
|
||||
jMenuItemEditFind = new JMenuItem();
|
||||
jMenuItemEditFind.setText("Find");
|
||||
jMenuItemEditFind.setMnemonic('F');
|
||||
jMenuItemEditFind.setEnabled(false);
|
||||
jMenuItemEditFind.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditFind;
|
||||
}
|
||||
|
||||
/**
|
||||
This method initializes jMenuItemEditFindNext
|
||||
|
||||
|
@ -1104,6 +1106,7 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
jMenuItemEditFindNext.setText("Find Next");
|
||||
jMenuItemEditFindNext.setMnemonic('n');
|
||||
jMenuItemEditFindNext.setEnabled(false);
|
||||
jMenuItemEditFindNext.setVisible(false);
|
||||
jMenuItemEditFindNext.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditFindNext;
|
||||
|
@ -1642,6 +1645,119 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
return jMenuItemProjectCreateFar;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method initializes jMenuEditFind
|
||||
*
|
||||
* @return javax.swing.JMenu
|
||||
*/
|
||||
private JMenu getJMenuEditFind() {
|
||||
if (jMenuEditFind == null) {
|
||||
jMenuEditFind = new JMenu();
|
||||
jMenuEditFind.setText("Find");
|
||||
jMenuEditFind.setMnemonic('F');
|
||||
|
||||
jMenuEditFind.add(getJMenuItemEditFindPpi());
|
||||
jMenuEditFind.add(getJMenuItemEditFindProtocol());
|
||||
jMenuEditFind.add(getJMenuItemEditFindGuid());
|
||||
jMenuEditFind.add(getJMenuItemEditFindPcd());
|
||||
jMenuEditFind.addSeparator();
|
||||
|
||||
jMenuEditFind.add(getJMenuItemEditFindLibraryClass());
|
||||
jMenuEditFind.add(getJMenuItemEditFindLibraryInstance());
|
||||
}
|
||||
return jMenuEditFind;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method initializes jMenuItemEditFindPcd
|
||||
*
|
||||
* @return javax.swing.JMenuItem
|
||||
*/
|
||||
private JMenuItem getJMenuItemEditFindPcd() {
|
||||
if (jMenuItemEditFindPcd == null) {
|
||||
jMenuItemEditFindPcd = new JMenuItem();
|
||||
jMenuItemEditFindPcd.setText("All PCD entries");
|
||||
jMenuItemEditFindPcd.setMnemonic('P');
|
||||
jMenuItemEditFindPcd.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditFindPcd;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method initializes jMenuItemEditFindLibraryClass
|
||||
*
|
||||
* @return javax.swing.JMenuItem
|
||||
*/
|
||||
private JMenuItem getJMenuItemEditFindLibraryClass() {
|
||||
if (jMenuItemEditFindLibraryClass == null) {
|
||||
jMenuItemEditFindLibraryClass = new JMenuItem();
|
||||
jMenuItemEditFindLibraryClass.setText("All Library Classes");
|
||||
jMenuItemEditFindLibraryClass.setMnemonic('C');
|
||||
jMenuItemEditFindLibraryClass.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditFindLibraryClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method initializes jMenuItemEditFindPpi
|
||||
*
|
||||
* @return javax.swing.JMenuItem
|
||||
*/
|
||||
private JMenuItem getJMenuItemEditFindPpi() {
|
||||
if (jMenuItemEditFindPpi == null) {
|
||||
jMenuItemEditFindPpi = new JMenuItem();
|
||||
jMenuItemEditFindPpi.setText("All PPIs");
|
||||
jMenuItemEditFindPpi.setMnemonic('I');
|
||||
jMenuItemEditFindPpi.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditFindPpi;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method initializes jMenuItemEditFindProtocol
|
||||
*
|
||||
* @return javax.swing.JMenuItem
|
||||
*/
|
||||
private JMenuItem getJMenuItemEditFindProtocol() {
|
||||
if (jMenuItemEditFindProtocol == null) {
|
||||
jMenuItemEditFindProtocol = new JMenuItem();
|
||||
jMenuItemEditFindProtocol.setText("All Protocols");
|
||||
jMenuItemEditFindProtocol.setMnemonic('r');
|
||||
jMenuItemEditFindProtocol.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditFindProtocol;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method initializes jMenuItemEditFindGuid
|
||||
*
|
||||
* @return javax.swing.JMenuItem
|
||||
*/
|
||||
private JMenuItem getJMenuItemEditFindGuid() {
|
||||
if (jMenuItemEditFindGuid == null) {
|
||||
jMenuItemEditFindGuid = new JMenuItem();
|
||||
jMenuItemEditFindGuid.setText("All GUIDs");
|
||||
jMenuItemEditFindGuid.setMnemonic('G');
|
||||
jMenuItemEditFindGuid.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditFindGuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method initializes jMenuItemEditFindLibraryInstance
|
||||
*
|
||||
* @return javax.swing.JMenuItem
|
||||
*/
|
||||
private JMenuItem getJMenuItemEditFindLibraryInstance() {
|
||||
if (jMenuItemEditFindLibraryInstance == null) {
|
||||
jMenuItemEditFindLibraryInstance = new JMenuItem();
|
||||
jMenuItemEditFindLibraryInstance.setText("All Library Instances");
|
||||
jMenuItemEditFindLibraryInstance.setMnemonic('n');
|
||||
jMenuItemEditFindLibraryInstance.addActionListener(this);
|
||||
}
|
||||
return jMenuItemEditFindLibraryInstance;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.tianocore.packaging.common.ui.IFrame#main(java.lang.String[])
|
||||
*
|
||||
|
@ -1692,7 +1808,6 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
this.setSize(DataType.MAIN_FRAME_PREFERRED_SIZE_WIDTH, DataType.MAIN_FRAME_PREFERRED_SIZE_HEIGHT);
|
||||
this.setResizable(true);
|
||||
this.setJMenuBar(getjJMenuBar());
|
||||
this.addComponentListener(this);
|
||||
this.setContentPane(getJContentPane());
|
||||
this.setTitle(DataType.PROJECT_NAME + " " + DataType.PROJECT_VERSION + " " + "- ["
|
||||
+ Workspace.getCurrentWorkspace() + "]");
|
||||
|
@ -1730,67 +1845,71 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
//
|
||||
// Operations of Menu
|
||||
//
|
||||
if (arg0.getSource() == jMenuItemFileNew) {
|
||||
if (arg0.getSource() == this.jMenuItemFileNew) {
|
||||
this.fileNew();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemFileOpen) {
|
||||
if (arg0.getSource() == this.jMenuItemFileOpen) {
|
||||
this.open();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemFileClose) {
|
||||
if (arg0.getSource() == this.jMenuItemFileClose) {
|
||||
this.close();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemFileCloseAll) {
|
||||
if (arg0.getSource() == this.jMenuItemFileCloseAll) {
|
||||
this.closeAll();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemFileSave) {
|
||||
if (arg0.getSource() == this.jMenuItemFileSave) {
|
||||
this.save();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemFileSaveAs) {
|
||||
if (arg0.getSource() == this.jMenuItemFileSaveAs) {
|
||||
this.saveAs();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemFileSaveAll) {
|
||||
if (arg0.getSource() == this.jMenuItemFileSaveAll) {
|
||||
this.saveAll();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemFileExit) {
|
||||
if (arg0.getSource() == this.jMenuItemFileExit) {
|
||||
this.exit();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemProjectChangeWorkspace) {
|
||||
changeWorkspace();
|
||||
if (arg0.getSource() == this.jMenuItemEditFindPpi) {
|
||||
this.findPpi();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemProjectCreateFar) {
|
||||
createFar();
|
||||
if (arg0.getSource() == this.jMenuItemProjectChangeWorkspace) {
|
||||
this.changeWorkspace();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemProjectInstallFar) {
|
||||
installFar();
|
||||
if (arg0.getSource() == this.jMenuItemProjectCreateFar) {
|
||||
this.createFar();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemProjectRemoveFar) {
|
||||
removeFar();
|
||||
if (arg0.getSource() == this.jMenuItemProjectInstallFar) {
|
||||
this.installFar();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemProjectUpdateFar) {
|
||||
updateFar();
|
||||
if (arg0.getSource() == this.jMenuItemProjectRemoveFar) {
|
||||
this.removeFar();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemToolsClone) {
|
||||
cloneItem();
|
||||
if (arg0.getSource() == this.jMenuItemProjectUpdateFar) {
|
||||
this.updateFar();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemToolsToolChainConfiguration) {
|
||||
setupToolChainConfiguration();
|
||||
if (arg0.getSource() == this.jMenuItemToolsClone) {
|
||||
this.cloneItem();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == jMenuItemHelpAbout) {
|
||||
if (arg0.getSource() == this.jMenuItemToolsToolChainConfiguration) {
|
||||
this.setupToolChainConfiguration();
|
||||
}
|
||||
|
||||
if (arg0.getSource() == this.jMenuItemHelpAbout) {
|
||||
About a = new About(this, true);
|
||||
int result = a.showDialog();
|
||||
if (result == DataType.RETURN_TYPE_OK) {
|
||||
|
@ -2014,8 +2133,8 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
//
|
||||
// Add new MsaHeader node to the tree
|
||||
//
|
||||
IDefaultMutableTreeNode node = new IDefaultMutableTreeNode(mid.getName(), IDefaultMutableTreeNode.MODULE,
|
||||
true, mid);
|
||||
IDefaultMutableTreeNode node = new IDefaultMutableTreeNode(mid.getName(), IDefaultMutableTreeNode.MODULE, true,
|
||||
mid);
|
||||
//
|
||||
// First find the module belongs to which package
|
||||
//
|
||||
|
@ -2276,26 +2395,13 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
}
|
||||
}
|
||||
|
||||
public void componentHidden(ComponentEvent arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void componentMoved(ComponentEvent arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void componentResized(ComponentEvent arg0) {
|
||||
this.jSplitPane.setSize(this.getWidth() - DataType.MAIN_FRAME_WIDTH_SPACING,
|
||||
this.getHeight() - DataType.MAIN_FRAME_HEIGHT_SPACING);
|
||||
this.jSplitPane.validate();
|
||||
resizeDesktopPanel();
|
||||
}
|
||||
|
||||
public void componentShown(ComponentEvent arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
if (this.jSplitPane != null) {
|
||||
this.jSplitPane.setSize(this.getWidth() - DataType.MAIN_FRAME_WIDTH_SPACING,
|
||||
this.getHeight() - DataType.MAIN_FRAME_HEIGHT_SPACING);
|
||||
this.jSplitPane.validate();
|
||||
resizeDesktopPanel();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2667,18 +2773,18 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
Log.err("Upddate MsaFiles of Package", e.getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Update Global Data
|
||||
//
|
||||
GlobalData.openingModuleList.insertToOpeningModuleList(mid, smb.getMsa());
|
||||
GlobalData.vModuleList.addElement(mid);
|
||||
|
||||
|
||||
//
|
||||
// Create new node on the tree
|
||||
//
|
||||
addModuleToTree(mid);
|
||||
|
||||
|
||||
//
|
||||
// Open the node
|
||||
//
|
||||
|
@ -2989,6 +3095,15 @@ public class FrameworkWizardUI extends IFrame implements MouseListener, TreeSele
|
|||
System.exit(0);
|
||||
}
|
||||
|
||||
/**
|
||||
To find all defined PPIs in workspace
|
||||
|
||||
**/
|
||||
private void findPpi() {
|
||||
FindPPIsResult fpr = FindPPIsResult.getInstance();
|
||||
fpr.setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
Switch current workspace to others
|
||||
|
||||
|
|
|
@ -168,6 +168,10 @@ public class DataType {
|
|||
public static final int SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON = 30;
|
||||
|
||||
public static final int SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON = 30;
|
||||
|
||||
public static final int SPACE_TO_RIGHT_FOR_CLOSE_BUTTON = 240;
|
||||
|
||||
public static final int SPACE_TO_BOTTOM_FOR_CLOSE_BUTTON = 25;
|
||||
|
||||
public static final int SPACE_TO_RIGHT_FOR_PROTOCOL_NOTIFY = 25;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
package org.tianocore.frameworkwizard.common;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
@ -494,4 +495,126 @@ public class Tools {
|
|||
PlatformIdentification id = new PlatformIdentification(name, guid, version, path);
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* To reset the width of input component via container width
|
||||
*
|
||||
* @param c
|
||||
* @param containerWidth
|
||||
*
|
||||
*/
|
||||
public static void resizeComponentWidth(Component c, int containerWidth, int preferredWidth) {
|
||||
int newWidth = c.getPreferredSize().width + (containerWidth - preferredWidth);
|
||||
if (newWidth < c.getPreferredSize().width) {
|
||||
newWidth = c.getPreferredSize().width;
|
||||
}
|
||||
c.setSize(new java.awt.Dimension(newWidth, c.getHeight()));
|
||||
c.validate();
|
||||
}
|
||||
|
||||
/**
|
||||
* To reset the height of input component via container height
|
||||
*
|
||||
* @param c
|
||||
* @param containerHeight
|
||||
*
|
||||
*/
|
||||
public static void resizeComponentHeight(Component c, int containerHeight, int preferredHeight) {
|
||||
int newHeight = c.getPreferredSize().height + (containerHeight - preferredHeight);
|
||||
if (newHeight < c.getPreferredSize().height) {
|
||||
newHeight = c.getPreferredSize().height;
|
||||
}
|
||||
c.setSize(new java.awt.Dimension(c.getWidth(), newHeight));
|
||||
c.validate();
|
||||
}
|
||||
|
||||
/**
|
||||
* To reset the size of input component via container size
|
||||
*
|
||||
* @param c
|
||||
* @param containerWidth
|
||||
* @param containerHeight
|
||||
*
|
||||
*/
|
||||
public static void resizeComponent(Component c, int containerWidth, int containerHeight, int preferredWidth,
|
||||
int preferredHeight) {
|
||||
resizeComponentWidth(c, containerWidth, preferredWidth);
|
||||
resizeComponentHeight(c, containerHeight, preferredHeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* To relocate the input component
|
||||
*
|
||||
* @param c
|
||||
* @param containerWidth
|
||||
* @param spaceToRight
|
||||
*
|
||||
*/
|
||||
public static void relocateComponentX(Component c, int containerWidth, int preferredWidth, int spaceToRight) {
|
||||
int intGapToRight = spaceToRight + c.getPreferredSize().width;
|
||||
int newLocationX = containerWidth - intGapToRight;
|
||||
if (newLocationX < preferredWidth - intGapToRight) {
|
||||
newLocationX = preferredWidth - intGapToRight;
|
||||
}
|
||||
c.setLocation(newLocationX, c.getLocation().y);
|
||||
c.validate();
|
||||
}
|
||||
|
||||
/**
|
||||
* To relocate the input component
|
||||
*
|
||||
* @param c
|
||||
* @param containerHeight
|
||||
* @param spaceToBottom
|
||||
*
|
||||
*/
|
||||
public static void relocateComponentY(Component c, int containerHeight, int preferredHeight, int spaceToBottom) {
|
||||
int intGapToBottom = spaceToBottom + c.getPreferredSize().height;
|
||||
int newLocationY = containerHeight - intGapToBottom;
|
||||
if (newLocationY < preferredHeight - spaceToBottom) {
|
||||
newLocationY = preferredHeight - spaceToBottom;
|
||||
}
|
||||
c.setLocation(c.getLocation().x, newLocationY);
|
||||
c.validate();
|
||||
}
|
||||
|
||||
/**
|
||||
* To relocate the input component
|
||||
*
|
||||
* @param c
|
||||
* @param containerWidth
|
||||
* @param containerHeight
|
||||
* @param spaceToBottom
|
||||
* @param spaceToRight
|
||||
*
|
||||
*/
|
||||
public static void relocateComponent(Component c, int containerWidth, int containerHeight, int preferredWidht,
|
||||
int preferredHeight, int spaceToRight, int spaceToBottom) {
|
||||
relocateComponentX(c, containerWidth, preferredWidht, spaceToRight);
|
||||
relocateComponentY(c, containerHeight, preferredHeight, spaceToBottom);
|
||||
}
|
||||
|
||||
/**
|
||||
Move the component to the center of screen
|
||||
|
||||
@param c
|
||||
@param width
|
||||
|
||||
**/
|
||||
public static void centerComponent(Component c, int width) {
|
||||
c.setLocation(width / 2 - c.getWidth() / 2, c.getLocation().y);
|
||||
c.validate();
|
||||
}
|
||||
|
||||
/**
|
||||
Move the component to the center of screen and adjust the y location
|
||||
|
||||
@param c
|
||||
@param width
|
||||
|
||||
**/
|
||||
public static void centerComponent(Component c, int width, int containerHeight, int preferredHeight, int spaceToBottom) {
|
||||
relocateComponentY(c, containerHeight, preferredHeight, spaceToBottom);
|
||||
centerComponent(c, width);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ import java.awt.Dimension;
|
|||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.ComponentEvent;
|
||||
import java.awt.event.ComponentListener;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowListener;
|
||||
|
||||
|
@ -30,7 +32,7 @@ import javax.swing.JOptionPane;
|
|||
It extends JFrame implements ActionListener and WindowListener
|
||||
|
||||
**/
|
||||
public class IFrame extends JFrame implements ActionListener, WindowListener {
|
||||
public class IFrame extends JFrame implements ActionListener, WindowListener, ComponentListener {
|
||||
|
||||
///
|
||||
/// Define class Serial Version UID
|
||||
|
@ -77,6 +79,7 @@ public class IFrame extends JFrame implements ActionListener, WindowListener {
|
|||
this.setResizable(false);
|
||||
this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||
this.addWindowListener(this);
|
||||
this.addComponentListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -238,4 +241,24 @@ public class IFrame extends JFrame implements ActionListener, WindowListener {
|
|||
public void showDialog() {
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
public void componentResized(ComponentEvent arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void componentMoved(ComponentEvent arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void componentShown(ComponentEvent arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void componentHidden(ComponentEvent arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
package org.tianocore.frameworkwizard.common.ui;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.ComponentEvent;
|
||||
|
@ -154,104 +153,6 @@ public class IInternalFrame extends JInternalFrame implements ActionListener, Co
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* To reset the width of input component via container width
|
||||
*
|
||||
* @param c
|
||||
* @param containerWidth
|
||||
*
|
||||
*/
|
||||
public void resizeComponentWidth(Component c, int containerWidth, int preferredWidth) {
|
||||
int newWidth = c.getPreferredSize().width + (containerWidth - preferredWidth);
|
||||
if (newWidth < c.getPreferredSize().width) {
|
||||
newWidth = c.getPreferredSize().width;
|
||||
}
|
||||
c.setSize(new java.awt.Dimension(newWidth, c.getHeight()));
|
||||
c.validate();
|
||||
}
|
||||
|
||||
/**
|
||||
* To reset the height of input component via container height
|
||||
*
|
||||
* @param c
|
||||
* @param containerHeight
|
||||
*
|
||||
*/
|
||||
public void resizeComponentHeight(Component c, int containerHeight, int preferredHeight) {
|
||||
int newHeight = c.getPreferredSize().height + (containerHeight - preferredHeight);
|
||||
if (newHeight < c.getPreferredSize().height) {
|
||||
newHeight = c.getPreferredSize().height;
|
||||
}
|
||||
c.setSize(new java.awt.Dimension(c.getWidth(), newHeight));
|
||||
c.validate();
|
||||
}
|
||||
|
||||
/**
|
||||
* To reset the size of input component via container size
|
||||
*
|
||||
* @param c
|
||||
* @param containerWidth
|
||||
* @param containerHeight
|
||||
*
|
||||
*/
|
||||
public void resizeComponent(Component c, int containerWidth, int containerHeight, int preferredWidth,
|
||||
int preferredHeight) {
|
||||
resizeComponentWidth(c, containerWidth, preferredWidth);
|
||||
resizeComponentHeight(c, containerHeight, preferredHeight);
|
||||
}
|
||||
|
||||
/**
|
||||
* To relocate the input component
|
||||
*
|
||||
* @param c
|
||||
* @param containerWidth
|
||||
* @param spaceToRight
|
||||
*
|
||||
*/
|
||||
public void relocateComponentX(Component c, int containerWidth, int preferredWidth, int spaceToRight) {
|
||||
int intGapToRight = spaceToRight + c.getPreferredSize().width;
|
||||
int newLocationX = containerWidth - intGapToRight;
|
||||
if (newLocationX < preferredWidth - intGapToRight) {
|
||||
newLocationX = preferredWidth - intGapToRight;
|
||||
}
|
||||
c.setLocation(newLocationX, c.getLocation().y);
|
||||
c.validate();
|
||||
}
|
||||
|
||||
/**
|
||||
* To relocate the input component
|
||||
*
|
||||
* @param c
|
||||
* @param containerHeight
|
||||
* @param spaceToBottom
|
||||
*
|
||||
*/
|
||||
public void relocateComponentY(Component c, int containerHeight, int preferredHeight, int spaceToBottom) {
|
||||
int intGapToBottom = spaceToBottom + c.getPreferredSize().height;
|
||||
int newLocationY = containerHeight - intGapToBottom;
|
||||
if (newLocationY < preferredHeight - spaceToBottom) {
|
||||
newLocationY = preferredHeight - spaceToBottom;
|
||||
}
|
||||
c.setLocation(c.getLocation().x, newLocationY);
|
||||
c.validate();
|
||||
}
|
||||
|
||||
/**
|
||||
* To relocate the input component
|
||||
*
|
||||
* @param c
|
||||
* @param containerWidth
|
||||
* @param containerHeight
|
||||
* @param spaceToBottom
|
||||
* @param spaceToRight
|
||||
*
|
||||
*/
|
||||
public void relocateComponent(Component c, int containerWidth, int containerHeight, int preferredWidht,
|
||||
int preferredHeight, int spaceToRight, int spaceToBottom) {
|
||||
relocateComponentX(c, containerWidth, preferredWidht, spaceToRight);
|
||||
relocateComponentY(c, containerHeight, preferredHeight, spaceToBottom);
|
||||
}
|
||||
|
||||
public void showStandard() {
|
||||
|
||||
}
|
||||
|
|
|
@ -449,12 +449,16 @@ public class ModuleBootModes extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -446,12 +446,16 @@ public class ModuleDataHubs extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -514,12 +514,16 @@ public class ModuleEvents extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -592,12 +592,16 @@ public class ModuleExterns extends IInternalFrame implements ItemListener {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -442,12 +442,16 @@ public class ModuleGuids extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -446,12 +446,16 @@ public class ModuleHiiPackages extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -448,12 +448,16 @@ public class ModuleHobs extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -458,12 +458,16 @@ public class ModuleLibraryClassDefinitions extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -462,12 +462,16 @@ public class ModulePCDs extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -456,12 +456,16 @@ public class ModulePackageDependencies extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -491,12 +491,16 @@ public class ModulePpis extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -492,12 +492,16 @@ public class ModuleProtocols extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -469,12 +469,16 @@ public class ModuleSourceFiles extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -446,12 +446,16 @@ public class ModuleSystemTables extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -221,7 +221,8 @@ public class ModuleVariables extends IInternalFrame {
|
|||
if (this.variables != null) {
|
||||
if (this.variables.getVariableList().size() > 0) {
|
||||
for (int index = 0; index < this.variables.getVariableList().size(); index++) {
|
||||
String arg0 = Tools.convertUnicodeHexStringToString(variables.getVariableList().get(index).getVariableName());
|
||||
String arg0 = Tools.convertUnicodeHexStringToString(variables.getVariableList().get(index)
|
||||
.getVariableName());
|
||||
String arg1 = variables.getVariableList().get(index).getGuidCName();
|
||||
String arg2 = null;
|
||||
if (variables.getVariableList().get(index).getUsage() != null) {
|
||||
|
@ -448,12 +449,16 @@ public class ModuleVariables extends IInternalFrame {
|
|||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
int intPreferredHeight = this.getJContentPane().getPreferredSize().height;
|
||||
|
||||
resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight);
|
||||
relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth, intPreferredHeight,
|
||||
DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON, DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
Tools.resizeComponent(this.jScrollPaneTable, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight);
|
||||
Tools.relocateComponent(this.jButtonAdd, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_ADD_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_ADD_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonRemove, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_REMOVE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_REMOVE_BUTTON);
|
||||
Tools.relocateComponent(this.jButtonUpdate, intCurrentWidth, intCurrentHeight, intPreferredWidth,
|
||||
intPreferredHeight, DataType.SPACE_TO_RIGHT_FOR_UPDATE_BUTTON,
|
||||
DataType.SPACE_TO_BOTTOM_FOR_UPDATE_BUTTON);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1093,20 +1093,20 @@ public class MsaHeader extends IInternalFrame {
|
|||
int intCurrentWidth = this.getJContentPane().getWidth();
|
||||
int intPreferredWidth = this.getJContentPane().getPreferredSize().width;
|
||||
|
||||
resizeComponentWidth(this.jTextFieldBaseName, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldGuid, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldVersion, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPaneLicense, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldURL, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPaneCopyright, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPaneDescription, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldSpecification, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldAbstract, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jComboBoxModuleType, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jComboBoxBinaryModule, intCurrentWidth, intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldOutputFileBasename, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldBaseName, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldGuid, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldVersion, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPaneLicense, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldURL, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPaneCopyright, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPaneDescription, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldSpecification, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldAbstract, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jComboBoxModuleType, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jComboBoxBinaryModule, intCurrentWidth, intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldOutputFileBasename, intCurrentWidth, intPreferredWidth);
|
||||
|
||||
relocateComponentX(this.jButtonGenerateGuid, intCurrentWidth, intPreferredWidth,
|
||||
Tools.relocateComponentX(this.jButtonGenerateGuid, intCurrentWidth, intPreferredWidth,
|
||||
DataType.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON);
|
||||
}
|
||||
|
||||
|
|
|
@ -708,12 +708,12 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
|
|||
public void componentResized(ComponentEvent arg0) {
|
||||
int intPreferredWidth = 500;
|
||||
|
||||
resizeComponentWidth(this.jTextFieldName, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldAdd, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);
|
||||
relocateComponentX(this.jButtonGen, this.getWidth(), this.getPreferredSize().width, 40);
|
||||
Tools.resizeComponentWidth(this.jTextFieldName, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldAdd, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);
|
||||
Tools.relocateComponentX(this.jButtonGen, this.getWidth(), this.getPreferredSize().width, 40);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -734,16 +734,16 @@ public class SpdHeader extends IInternalFrame {
|
|||
int intPreferredWidth = 500;
|
||||
int intCurrentWidth = this.getJContentPane().getWidth();
|
||||
|
||||
resizeComponentWidth(this.jTextFieldBaseName, intCurrentWidth,intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldGuid, intCurrentWidth,intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldVersion, intCurrentWidth,intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldUrl, intCurrentWidth,intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPaneLicense, intCurrentWidth,intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldCopyright, intCurrentWidth,intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPaneDescription, intCurrentWidth,intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldSpecification, intCurrentWidth,intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldAbstract, intCurrentWidth,intPreferredWidth);
|
||||
relocateComponentX(this.jButtonGenerateGuid, intCurrentWidth, jButtonGenerateGuid.getWidth(),30);
|
||||
Tools.resizeComponentWidth(this.jTextFieldBaseName, intCurrentWidth,intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldGuid, intCurrentWidth,intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldVersion, intCurrentWidth,intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldUrl, intCurrentWidth,intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPaneLicense, intCurrentWidth,intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldCopyright, intCurrentWidth,intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPaneDescription, intCurrentWidth,intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldSpecification, intCurrentWidth,intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldAbstract, intCurrentWidth,intPreferredWidth);
|
||||
Tools.relocateComponentX(this.jButtonGenerateGuid, intCurrentWidth, jButtonGenerateGuid.getWidth(),30);
|
||||
}
|
||||
|
||||
private JScrollPane getTopScrollPane() {
|
||||
|
|
|
@ -52,7 +52,7 @@ import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
|
|||
import org.tianocore.frameworkwizard.common.ui.StarLabel;
|
||||
import org.tianocore.frameworkwizard.common.ui.iCheckBoxList.ICheckBoxList;
|
||||
import org.tianocore.frameworkwizard.platform.ui.ListEditor;
|
||||
import org.tianocore.frameworkwizard.platform.ui.global.WorkspaceProfile;
|
||||
import org.tianocore.frameworkwizard.platform.ui.global.GlobalData;
|
||||
import org.tianocore.frameworkwizard.platform.ui.global.SurfaceAreaQuery;
|
||||
import org.tianocore.frameworkwizard.platform.ui.id.ModuleIdentification;
|
||||
import org.tianocore.frameworkwizard.platform.ui.id.PackageIdentification;
|
||||
|
@ -768,9 +768,9 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
public void componentResized(ComponentEvent arg0) {
|
||||
int intPreferredWidth = 500;
|
||||
|
||||
resizeComponentWidth(this.jTextFieldClass, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth-10);
|
||||
Tools.resizeComponentWidth(this.jTextFieldClass, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth-10);
|
||||
|
||||
}
|
||||
/**
|
||||
|
@ -920,19 +920,19 @@ public class SpdLibClassDecls extends IInternalFrame implements TableModelListen
|
|||
private void getLibInstances(String libClass){
|
||||
libNameGuidMap.clear();
|
||||
try {
|
||||
WorkspaceProfile.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db", System.getenv("WORKSPACE"));
|
||||
GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db", System.getenv("WORKSPACE"));
|
||||
|
||||
Set<PackageIdentification> spi = WorkspaceProfile.getPackageList();
|
||||
Set<PackageIdentification> spi = GlobalData.getPackageList();
|
||||
Iterator ispi = spi.iterator();
|
||||
|
||||
while (ispi.hasNext()) {
|
||||
PackageIdentification pi = (PackageIdentification) ispi.next();
|
||||
|
||||
Set<ModuleIdentification> smi = WorkspaceProfile.getModules(pi);
|
||||
Set<ModuleIdentification> smi = GlobalData.getModules(pi);
|
||||
Iterator ismi = smi.iterator();
|
||||
while (ismi.hasNext()) {
|
||||
ModuleIdentification mi = (ModuleIdentification) ismi.next();
|
||||
Map<String, XmlObject> m = WorkspaceProfile.getNativeMsa(mi);
|
||||
Map<String, XmlObject> m = GlobalData.getNativeMsa(mi);
|
||||
SurfaceAreaQuery.setDoc(m);
|
||||
Vector<String> classProduced = SurfaceAreaQuery.getLibraryClasses("ALWAYS_PRODUCED", mi);
|
||||
for (int i = 0; i < classProduced.size(); ++i) {
|
||||
|
|
|
@ -485,9 +485,9 @@ public class SpdMsaFiles extends IInternalFrame implements TableModelListener{
|
|||
public void componentResized(ComponentEvent arg0) {
|
||||
int intPreferredWidth = 500;
|
||||
|
||||
resizeComponentWidth(this.jScrollPaneMsa, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextField, this.getWidth(), intPreferredWidth);
|
||||
relocateComponentX(this.jButtonBrowse, this.getWidth(), this.getPreferredSize().width, 25);
|
||||
Tools.resizeComponentWidth(this.jScrollPaneMsa, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextField, this.getWidth(), intPreferredWidth);
|
||||
Tools.relocateComponentX(this.jButtonBrowse, this.getWidth(), this.getPreferredSize().width, 25);
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
|
|
|
@ -593,10 +593,10 @@ public class SpdPackageHeaders extends IInternalFrame implements TableModelListe
|
|||
public void componentResized(ComponentEvent arg0) {
|
||||
int intPreferredWidth = 500;
|
||||
|
||||
resizeComponentWidth(this.jComboBoxSelect, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextField, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);
|
||||
relocateComponentX(this.jButtonBrowse, this.getWidth(), this.getPreferredSize().width, 30);
|
||||
Tools.resizeComponentWidth(this.jComboBoxSelect, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextField, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);
|
||||
Tools.relocateComponentX(this.jButtonBrowse, this.getWidth(), this.getPreferredSize().width, 30);
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
|
|
|
@ -39,6 +39,7 @@ import javax.swing.table.TableModel;
|
|||
import org.tianocore.PackageSurfaceAreaDocument;
|
||||
|
||||
import org.tianocore.frameworkwizard.common.DataValidation;
|
||||
import org.tianocore.frameworkwizard.common.Tools;
|
||||
import org.tianocore.frameworkwizard.common.Identifications.OpeningPackageType;
|
||||
import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
|
||||
import org.tianocore.frameworkwizard.common.ui.StarLabel;
|
||||
|
@ -606,14 +607,14 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
|
|||
public void componentResized(ComponentEvent arg0) {
|
||||
int intPreferredWidth = 500;
|
||||
|
||||
resizeComponentWidth(this.jTextFieldC_Name, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldToken, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldTsGuid, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldC_Name, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldToken, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldTsGuid, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldHelp, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPane, this.getWidth(), intPreferredWidth);
|
||||
|
||||
resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldDefaultValue, this.getWidth(), intPreferredWidth);
|
||||
// relocateComponentX(this.jButtonClearAll, this.getWidth(), DataType.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON);
|
||||
// relocateComponentX(this.jButtonRemove, this.getWidth(), DataType.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON);
|
||||
// relocateComponentX(this.jButtonAdd, this.getWidth(), DataType.SPACE_TO_RIGHT_FOR_GENERATE_BUTTON);
|
||||
|
@ -909,8 +910,8 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
|
|||
JOptionPane.showMessageDialog(frame, "C_Name is NOT C_NameType.");
|
||||
return false;
|
||||
}
|
||||
if (!DataValidation.isHexDoubleWordDataType(row[1].toString()) &&
|
||||
!DataValidation.isInt(row[1].toString(), Integer.MIN_VALUE, Integer.MAX_VALUE)) {
|
||||
if (!(DataValidation.isHexDoubleWordDataType(row[1].toString()) ||
|
||||
DataValidation.isInt(row[1].toString(), 0, 0xffffffff))) {
|
||||
JOptionPane.showMessageDialog(frame, "Token is NOT correct.");
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -683,16 +683,16 @@ public class FpdHeader extends IInternalFrame {
|
|||
public void componentResized(ComponentEvent arg0) {
|
||||
int intPreferredWidth = 500;
|
||||
|
||||
resizeComponentWidth(this.jTextFieldBaseName, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldGuid, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldUrl, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPaneLicense, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldCopyright, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jScrollPaneDescription, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldSpecification, this.getWidth(), intPreferredWidth);
|
||||
resizeComponentWidth(this.jTextFieldAbstract, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldBaseName, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldGuid, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldUrl, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPaneLicense, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldCopyright, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jScrollPaneDescription, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldSpecification, this.getWidth(), intPreferredWidth);
|
||||
Tools.resizeComponentWidth(this.jTextFieldAbstract, this.getWidth(), intPreferredWidth);
|
||||
|
||||
relocateComponentX(this.jButtonGenerateGuid, this.getWidth(), jButtonGenerateGuid.getWidth(), 25);
|
||||
Tools.relocateComponentX(this.jButtonGenerateGuid, this.getWidth(), jButtonGenerateGuid.getWidth(), 25);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue