]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IInternalFrame.java
3 The file is used to override JInternalFrame to provides customized interfaces
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 package org
.tianocore
.frameworkwizard
.common
.ui
;
18 import java
.awt
.event
.ActionEvent
;
19 import java
.awt
.event
.ActionListener
;
20 import java
.awt
.event
.ComponentEvent
;
21 import java
.awt
.event
.ComponentListener
;
22 import java
.awt
.event
.FocusEvent
;
23 import java
.awt
.event
.FocusListener
;
24 import java
.awt
.event
.ItemEvent
;
25 import java
.awt
.event
.ItemListener
;
26 import java
.awt
.event
.MouseEvent
;
27 import java
.awt
.event
.MouseListener
;
29 import javax
.swing
.JDesktopPane
;
30 import javax
.swing
.JFrame
;
31 import javax
.swing
.JInternalFrame
;
32 import javax
.swing
.JPanel
;
33 import javax
.swing
.event
.ListSelectionEvent
;
34 import javax
.swing
.event
.ListSelectionListener
;
35 import javax
.swing
.event
.TableModelEvent
;
36 import javax
.swing
.event
.TableModelListener
;
38 import org
.tianocore
.frameworkwizard
.common
.Tools
;
41 * The class is used to override JInternalFrame to provides customized
42 * interfaces It extends JInternalFrame implements ActionListener
47 public class IInternalFrame
extends JInternalFrame
implements ActionListener
, ComponentListener
, ItemListener
,
48 FocusListener
, ListSelectionListener
, TableModelListener
, MouseListener
{
51 // / Define class Serial Version UID
53 private static final long serialVersionUID
= -609841772384875886L;
56 // Define class members
58 private boolean isEdited
= false;
61 * Main class, used for test
66 public static void main(String
[] args
) {
67 JFrame jf
= new JFrame();
68 JPanel jp
= new JPanel();
69 JDesktopPane jdp
= new JDesktopPane();
70 IInternalFrame itf
= new IInternalFrame();
72 jf
.setContentPane(jp
);
77 * This is the default constructor
80 public IInternalFrame() {
86 * This method initializes this
89 private void initialize() {
90 this.setBounds(new java
.awt
.Rectangle(0, 0, 520, 545));
91 this.setMinimumSize(new java
.awt
.Dimension(520, 545));
92 this.addComponentListener(this);
96 * Get if the InternalFrame has been edited
98 * @retval true - The InternalFrame has been edited
99 * @retval false - The InternalFrame hasn't been edited
102 public boolean isEdited() {
107 * Set if the InternalFrame has been edited
110 * The input data which identify if the InternalFrame has been
114 public void setEdited(boolean isEdited
) {
115 this.isEdited
= isEdited
;
119 * Check the input data is empty or not
122 * The input data which need be checked
124 * @retval true - The input data is empty
125 * @retval fals - The input data is not empty
128 public boolean isEmpty(String strValue
) {
129 return Tools
.isEmpty(strValue
);
132 public void actionPerformed(ActionEvent arg0
) {
133 // TODO Auto-generated method stub
136 public void componentHidden(ComponentEvent arg0
) {
137 // TODO Auto-generated method stub
141 public void componentMoved(ComponentEvent arg0
) {
142 // TODO Auto-generated method stub
146 public void componentResized(ComponentEvent arg0
) {
147 // TODO Auto-generated method stub
150 public void componentShown(ComponentEvent arg0
) {
151 // TODO Auto-generated method stub
155 public void showStandard() {
159 public void showAdvanced() {
163 public void showXML() {
167 public void itemStateChanged(ItemEvent arg0
) {
168 // TODO Auto-generated method stub
172 public void focusGained(FocusEvent arg0
) {
173 // TODO Auto-generated method stub
177 public void focusLost(FocusEvent arg0
) {
178 // TODO Auto-generated method stub
182 public void valueChanged(ListSelectionEvent arg0
) {
183 // TODO Auto-generated method stub
187 public void tableChanged(TableModelEvent arg0
) {
188 // TODO Auto-generated method stub
192 public void mouseClicked(MouseEvent arg0
) {
193 // TODO Auto-generated method stub
197 public void mouseEntered(MouseEvent arg0
) {
198 // TODO Auto-generated method stub
202 public void mouseExited(MouseEvent arg0
) {
203 // TODO Auto-generated method stub
207 public void mousePressed(MouseEvent arg0
) {
208 // TODO Auto-generated method stub
212 public void mouseReleased(MouseEvent arg0
) {
213 // TODO Auto-generated method stub