home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
TextDataFileFrame.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
3KB
|
86 lines
/*
* Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
*
* This SOURCE CODE FILE, which has been provided by Borland as part
* of a Borland product for use ONLY by licensed users of the product,
* includes CONFIDENTIAL and PROPRIETARY information of Borland.
*
* USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
* OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
* THE PRODUCT.
*
* IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
* COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
* OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
* OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
* OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
* OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
* CODE FILE.
*/
package borland.samples.tutorial.dataset.textdatafile;
import java.awt.*;
import java.awt.event.*;
import borland.jbcl.control.*;
import borland.jbcl.layout.*;
import borland.jbcl.dataset.*;
public class TextDataFileFrame extends DecoratedFrame {
BorderLayout borderLayout1 = new BorderLayout();
BevelPanel bevelPanel1 = new BevelPanel();
StatusBar statusBar = new StatusBar();
GridControl gridControl1 = new GridControl();
NavigatorControl navigatorControl1 = new NavigatorControl();
TableDataSet tableDataSet1 = new TableDataSet();
TextDataFile textDataFile1 = new TextDataFile();
GridBagLayout gridBagLayout1 = new GridBagLayout();
//Construct the frame
public TextDataFileFrame() {
try {
jbInit();
}
catch (Exception e) {
borland.jbcl.util.Diagnostic.printStackTrace(e);
}
}
//Component initialization
private void jbInit() throws Exception{
this.setLayout(borderLayout1);
this.setTitle("TextDataFile Tutorial");
bevelPanel1.setLayout(gridBagLayout1);
statusBar.setDataSet(tableDataSet1);
gridControl1.setDataSet(tableDataSet1);
navigatorControl1.setDataSet(tableDataSet1);
tableDataSet1.setDataFile(textDataFile1);
textDataFile1.setFileName("employee.txt");
gridControl1.addActionListener(new TextDataFileFrame_gridControl1_actionAdapter(this));
this.add(statusBar, BorderLayout.SOUTH);
this.add(bevelPanel1, BorderLayout.CENTER);
bevelPanel1.add(gridControl1, new GridBagConstraints2(0, 1, 1, 1, 1.0, 1.0
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 3, 13, 0), -782, -654));
bevelPanel1.add(navigatorControl1, new GridBagConstraints2(0, 0, 2, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(13, 3, 0, 3), 95, 0));
}
void gridControl1_actionPerformed(ActionEvent e) {
}
}
class TextDataFileFrame_gridControl1_actionAdapter implements java.awt.event.ActionListener {
TextDataFileFrame adaptee;
TextDataFileFrame_gridControl1_actionAdapter(TextDataFileFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.gridControl1_actionPerformed(e);
}
}