SourceForge: bina/bina_plugin_bnppderbydriver: changeset 5:030bb26bfc16
Help added default tip
authorgerasch
Wed Nov 04 14:56:11 2009 +0100 (2 weeks ago)
changeset 5030bb26bfc16
parent 4093994eee8aa
Help added
build.xml
src/org/bnplusplus/driver/sql/derby/resources/files/derby-help.html
src/org/bnplusplus/driver/sql/derby/wizards/DerbyDatabaseWizardPage.java
     1.1 --- a/build.xml	Fri Oct 02 13:45:30 2009 +0200
     1.2 +++ b/build.xml	Wed Nov 04 14:56:11 2009 +0100
     1.3 @@ -1,12 +1,9 @@
     1.4  <project name="BiNA BN++ Derby Database Driver Plugin" default="publish" basedir=".">
     1.5  	<description>
     1.6 -        Ant build script for BiNA Core
     1.7 +        Ant build script for BiNAs Derby Database Driver Plugin
     1.8      </description>
     1.9  
    1.10 -
    1.11 -	<import file="../bina_platform/global.xml"/>
    1.12 -			
    1.13 -	<target name="init" depends="base_init">
    1.14 +	<target name="init">
    1.15  		<tstamp/>
    1.16  		<property name="plugin_id" value="bnpp_derby_driver"/>
    1.17  		
    1.18 @@ -23,7 +20,6 @@
    1.19  		<property name="lib_dir" value="lib/"/>
    1.20  		<property name="bin_dir" value="bin/"/>
    1.21  				
    1.22 -		<property name="resources_path" value="org/bnplusplus/driver/sql/derby/resources" />
    1.23  		<property name="api" value="doc/"/>
    1.24  		
    1.25  		
    1.26 @@ -34,7 +30,7 @@
    1.27  		<property name="bcp_jar" value="${platform_dir}plugins/org.bina.bcp/bcp.jar"/>
    1.28  		<property name="bnpp_sql_jar" value="${platform_dir}plugins/org.bnplusplus.driver.sql/bnpp_sql_driver.jar"/>
    1.29  		
    1.30 -		<property name="bina_jar" value="${platform_dir}${platform_jar}" />
    1.31 +		<property name="bina_jar" value="${platform_dir}BiNA.jar" />
    1.32  		<property name="classpath" value="${bina_jar}:${bnpp_model_jar}:${bcp_jar}:${bnpp_sql_jar}" />
    1.33  		
    1.34  		
    1.35 @@ -131,9 +127,5 @@
    1.36  		</javadoc>
    1.37  	</target>
    1.38  	
    1.39 -	<target name="Upload API" depends="docs">
    1.40 -		<antcall target="upload_api" />
    1.41 -	</target>
    1.42 -	
    1.43  </project>
    1.44  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/src/org/bnplusplus/driver/sql/derby/resources/files/derby-help.html	Wed Nov 04 14:56:11 2009 +0100
     2.3 @@ -0,0 +1,10 @@
     2.4 +<html>
     2.5 +<body>
     2.6 +If you want to use a <b>BN++ Apache Derby</b> database for BiNA's 
     2.7 +main data source, you can either download it automatically, 
     2.8 +or specify the path to your local copy.<br/>
     2.9 +<br/>
    2.10 +Please, have a look at our website 
    2.11 +<a href="http://www.bnplusplus.org/">http://www.bnplusplus.org/</a> for further instructions.
    2.12 +</body>
    2.13 +</html>
    2.14 \ No newline at end of file
     3.1 --- a/src/org/bnplusplus/driver/sql/derby/wizards/DerbyDatabaseWizardPage.java	Fri Oct 02 13:45:30 2009 +0200
     3.2 +++ b/src/org/bnplusplus/driver/sql/derby/wizards/DerbyDatabaseWizardPage.java	Wed Nov 04 14:56:11 2009 +0100
     3.3 @@ -23,6 +23,7 @@
     3.4  import javax.swing.JPanel;
     3.5  import javax.swing.JRadioButton;
     3.6  import javax.swing.JTextField;
     3.7 +import javax.swing.JTextPane;
     3.8  
     3.9  import org.bina.platform.Arguments;
    3.10  import org.bina.platform.Core;
    3.11 @@ -35,8 +36,10 @@
    3.12  import org.bina.platform.utils.download.DownloadListener;
    3.13  import org.bina.platform.utils.download.DownloadManager;
    3.14  import org.bina.platform.utils.download.DownloadTask;
    3.15 +import org.bina.platform.utils.swing.ComponentUtilities;
    3.16  import org.bnplusplus.driver.sql.derby.BNPlusPlusDerbyDataSource;
    3.17  import org.bnplusplus.driver.sql.derby.Plugin;
    3.18 +import org.bnplusplus.driver.sql.derby.resources.Resources;
    3.19  
    3.20  import com.jgoodies.forms.layout.CellConstraints;
    3.21  import com.jgoodies.forms.layout.FormLayout;
    3.22 @@ -55,7 +58,7 @@
    3.23  	private BNPlusPlusDerbyDataSource dataSource = null;
    3.24      
    3.25      public DerbyDatabaseWizardPage(Wizard wizard, BNPlusPlusDerbyDataSource dataSource) {
    3.26 -        super(wizard, "Derby Database Settings");
    3.27 +        super(wizard, "Derby database settings");
    3.28  		this.dataSource = dataSource;
    3.29      }
    3.30      
    3.31 @@ -93,25 +96,32 @@
    3.32          if (page == null) {
    3.33              FormLayout layout = new FormLayout(
    3.34                      "5dlu, 10dlu, default:grow, 5dlu, default, 5dlu",   
    3.35 -                    "5dlu, default, 5dlu, default, 5dlu, default, 5dlu, default, default:grow"); 
    3.36 +                    "5dlu, default, 5dlu, default, 5dlu, default, 5dlu, default, 5dlu, default, default:grow"); 
    3.37              
    3.38              
    3.39              page = new JPanel();
    3.40              page.setLayout(layout);
    3.41 +            page.setBackground(Color.WHITE);
    3.42              
    3.43              CellConstraints cc = new CellConstraints();
    3.44              
    3.45 -            page.add(use_file = new JRadioButton("Local Directory"), cc.xyw(2, 2, 2));
    3.46 +            JTextPane pane = ComponentUtilities.createHTMLTextPane(Resources.class.getResource("files/derby-help.html"));
    3.47 +            page.add(ComponentUtilities.createPlainEditorScrollPane(pane, 100), cc.xyw(2, 2, 4, CellConstraints.FILL, CellConstraints.FILL));
    3.48 +            
    3.49 +            
    3.50 +            page.add(use_file = new JRadioButton("Local Directory"), cc.xyw(2, 4, 2));
    3.51 +            use_file.setOpaque(false);
    3.52              use_file.setSelected(true);
    3.53              
    3.54 -            page.add(file_field = new JTextField(), cc.xy(3, 4));
    3.55 -            page.add(openfile_button = new JButton("Open..."), cc.xy(5, 4));
    3.56 +            page.add(file_field = new JTextField(), cc.xy(3, 6));
    3.57 +            page.add(openfile_button = new JButton("Open..."), cc.xy(5, 6));
    3.58  
    3.59 -            page.add(use_url = new JRadioButton("Download from URL"), cc.xyw(2, 6, 2));
    3.60 -            page.add(url_field = new JTextField(), cc.xy(3, 8));
    3.61 +            page.add(use_url = new JRadioButton("Download from URL"), cc.xyw(2, 8, 2));
    3.62 +            use_url.setOpaque(false);
    3.63 +            page.add(url_field = new JTextField(), cc.xy(3, 10));
    3.64             
    3.65              final JButton check = new JButton("Verify Database");
    3.66 -            page.add(check, cc.xyw(2, 9, 4, CellConstraints.CENTER, CellConstraints.CENTER));
    3.67 +            page.add(check, cc.xyw(2, 11, 4, CellConstraints.CENTER, CellConstraints.CENTER));
    3.68              
    3.69              ButtonGroup bg = new ButtonGroup();
    3.70              bg.add(use_file);