[Btrwiz-commits] CVS: btrwiz/src BtrWiz.java,NONE,1.1 FolderSelect.java,NONE,1.1 WelcomePage.java,NO
Brought to you by:
howama
From: Mark H. <ho...@us...> - 2002-07-12 18:02:42
|
Update of /cvsroot/btrwiz/btrwiz/src In directory usw-pr-cvs1:/tmp/cvs-serv26392 Added Files: BtrWiz.java FolderSelect.java WelcomePage.java Log Message: initial work --- NEW FILE: BtrWiz.java --- import com.tildemh.jgwizard.*; import gnu.gdk.*; import gnu.gtk.*; import gnu.pango.*; class BtrWiz extends WizardForm{ public static final String VERSION = "CVS"; public static void main( String[] args){ Gtk.init(args.length, args); BtrWiz app = new BtrWiz(); Gtk.main(); } public BtrWiz(){ super( "BTRWiz "+VERSION ); } public void customise(){ WizardPage welcomePage = new WelcomePage(this, "Welcome"); WizardPage selFolders = new FolderSelect(this, "Select Folders"); setFirstPage(welcomePage); welcomePage.setFirstChild(selFolders); selFolders.setParentScreen(welcomePage); } } --- NEW FILE: FolderSelect.java --- import com.tildemh.jgwizard.*; import gnu.gdk.*; import gnu.gtk.*; import gnu.pango.*; class FolderSelect extends WizardPage{ private GtkVBox content; GtkEntry dirEntry; FolderSelect(WizardForm parent, String title){ super(parent, title, null); content = new GtkVBox(false, 0); GtkLabel headLbl = new GtkLabel("Please select the directory which contains the files to be searched. You will be able to filter files (so that not all files are searched) in the following screens."); headLbl.setLineWrap(true); headLbl.setJustify(GtkJustification.FILL); content.add(headLbl); dirEntry = new GtkEntry(); dirEntry.setText( System.getProperty("user.dir") ); content.add(dirEntry); GtkButton selDir = new GtkButton("Select Directory"); selDir.signalConnect("clicked", "showSelectBox", this); content.add(selDir); setButtons(true, "Previous", true, "Next"); setContent(content); } GtkFileSelection selector; private void showSelectBox(){ selector = new GtkFileSelection("Select Diretory to scan"); selector.setFilename(dirEntry.getText()); selector.getOkButton().signalConnect("clicked", "setDir", this); selector.show(); } private void setDir(){ dirEntry.setText(selector.getFilename()); } } --- NEW FILE: WelcomePage.java --- import com.tildemh.jgwizard.*; import gnu.gdk.*; import gnu.gtk.*; import gnu.pango.*; class WelcomePage extends WizardPage{ private GtkVBox content; WelcomePage(WizardForm parent, String title){ super(parent, title, null); content = new GtkVBox(false, 0); GtkLabel titleLbl = new GtkLabel(null); titleLbl.setJustify(GtkJustification.CENTER); titleLbl.setMarkup("<span size=\"xx-large\" weight=\"heavy\">Batch Text Replacer</span>"); titleLbl.setUseMarkup(true); content.add(titleLbl); GtkLabel verLbl = new GtkLabel("Version "+BtrWiz.VERSION); verLbl.setJustify(GtkJustification.CENTER); content.add(verLbl); GtkLabel msgLbl = new GtkLabel("WARNING: THIS IS DEVELOPMENTAL SOFTWARE. DO NOT TRUST IT. \n\nThis is open source software, written in Java and using the Java-GNOME Gtk Bindings. If you know anything about java or Gtk programming and would like to help, please get in contact with us."); msgLbl.setLineWrap(true); msgLbl.setJustify(GtkJustification.FILL); content.add(msgLbl); GtkLabel wsLbl = new GtkLabel("http://www.tildemh.com/sw/btrwiz"); wsLbl.setJustify(GtkJustification.CENTER); content.add(wsLbl); GtkLabel gmsgLbl = new GtkLabel("The following pages will guide you through selecting files to search, choosing the text and starting the replacements.\nClick start to begin."); gmsgLbl.setLineWrap(true); gmsgLbl.setJustify(GtkJustification.FILL); content.add(gmsgLbl); setButtons(false, null, true, "Start"); setContent(content); } } |