import java.awt.event.FocusListener;\r
import java.awt.event.ItemEvent;\r
import java.awt.event.ItemListener;\r
+import java.awt.event.MouseEvent;\r
+import java.awt.event.MouseListener;\r
\r
import javax.swing.JDesktopPane;\r
import javax.swing.JFrame;\r
import javax.swing.JInternalFrame;\r
import javax.swing.JPanel;\r
-\r
-import org.tianocore.frameworkwizard.common.DataType;\r
+import javax.swing.event.ListSelectionEvent;\r
+import javax.swing.event.ListSelectionListener;\r
+import javax.swing.event.TableModelEvent;\r
+import javax.swing.event.TableModelListener;\r
\r
/**\r
* The class is used to override JInternalFrame to provides customized\r
*\r
* \r
*/\r
-public class IInternalFrame extends JInternalFrame implements ActionListener, ComponentListener, ItemListener, FocusListener {\r
+public class IInternalFrame extends JInternalFrame implements ActionListener, ComponentListener, ItemListener,\r
+ FocusListener, ListSelectionListener, TableModelListener, MouseListener {\r
\r
// /\r
// / Define class Serial Version UID\r
* \r
*/\r
public void resizeComponentWidth(Component c, int containerWidth, int preferredWidth) {\r
- int newWidth = c.getPreferredSize().width\r
- + (containerWidth - preferredWidth);\r
+ int newWidth = c.getPreferredSize().width + (containerWidth - preferredWidth);\r
if (newWidth < c.getPreferredSize().width) {\r
newWidth = c.getPreferredSize().width;\r
}\r
* @param containerHeight\r
* \r
*/\r
- public void resizeComponent(Component c, int containerWidth, int containerHeight, int preferredWidth, int preferredHeight) {\r
+ public void resizeComponent(Component c, int containerWidth, int containerHeight, int preferredWidth,\r
+ int preferredHeight) {\r
resizeComponentWidth(c, containerWidth, preferredWidth);\r
resizeComponentHeight(c, containerHeight, preferredHeight);\r
}\r
public void relocateComponentX(Component c, int containerWidth, int preferredWidth, int spaceToRight) {\r
int intGapToRight = spaceToRight + c.getPreferredSize().width;\r
int newLocationX = containerWidth - intGapToRight;\r
- if (newLocationX < preferredWidth -intGapToRight) {\r
+ if (newLocationX < preferredWidth - intGapToRight) {\r
newLocationX = preferredWidth - intGapToRight;\r
}\r
c.setLocation(newLocationX, c.getLocation().y);\r
* @param spaceToBottom\r
* \r
*/\r
- public void relocateComponentY(Component c, int containerHeight, int spaceToBottom) {\r
- int newLocationY = containerHeight - spaceToBottom;\r
- if (newLocationY < DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT - spaceToBottom) {\r
- newLocationY = DataType.MAIN_FRAME_EDITOR_PANEL_PREFERRED_SIZE_HEIGHT - spaceToBottom;\r
+ public void relocateComponentY(Component c, int containerHeight, int preferredHeight, int spaceToBottom) {\r
+ int intGapToBottom = spaceToBottom + c.getPreferredSize().height;\r
+ int newLocationY = containerHeight - intGapToBottom;\r
+ if (newLocationY < preferredHeight - spaceToBottom) {\r
+ newLocationY = preferredHeight - spaceToBottom;\r
}\r
c.setLocation(c.getLocation().x, newLocationY);\r
c.validate();\r
* @param spaceToRight\r
* \r
*/\r
- public void relocateComponent(Component c, int containerWidth, int containerHeight, int spaceToBottom,\r
- int spaceToRight, int preferredWidht, int preferredHeight) {\r
- relocateComponentX(c, containerWidth, preferredWidht, spaceToBottom);\r
- relocateComponentY(c, containerHeight, spaceToRight);\r
+ public void relocateComponent(Component c, int containerWidth, int containerHeight, int preferredWidht,\r
+ int preferredHeight, int spaceToRight, int spaceToBottom) {\r
+ relocateComponentX(c, containerWidth, preferredWidht, spaceToRight);\r
+ relocateComponentY(c, containerHeight, preferredHeight, spaceToBottom);\r
}\r
\r
public void showStandard() {\r
\r
public void itemStateChanged(ItemEvent arg0) {\r
// TODO Auto-generated method stub\r
- \r
+\r
}\r
\r
public void focusGained(FocusEvent arg0) {\r
// TODO Auto-generated method stub\r
- \r
+\r
}\r
\r
public void focusLost(FocusEvent arg0) {\r
// TODO Auto-generated method stub\r
+\r
+ }\r
+\r
+ public void valueChanged(ListSelectionEvent arg0) {\r
+ // TODO Auto-generated method stub\r
+\r
+ }\r
+\r
+ public void tableChanged(TableModelEvent arg0) {\r
+ // TODO Auto-generated method stub\r
+\r
+ }\r
+\r
+ public void mouseClicked(MouseEvent arg0) {\r
+ // TODO Auto-generated method stub\r
+ \r
+ }\r
+\r
+ public void mouseEntered(MouseEvent arg0) {\r
+ // TODO Auto-generated method stub\r
+ \r
+ }\r
+\r
+ public void mouseExited(MouseEvent arg0) {\r
+ // TODO Auto-generated method stub\r
+ \r
+ }\r
+\r
+ public void mousePressed(MouseEvent arg0) {\r
+ // TODO Auto-generated method stub\r
+ \r
+ }\r
+\r
+ public void mouseReleased(MouseEvent arg0) {\r
+ // TODO Auto-generated method stub\r
\r
}\r
}\r