alex.sung 6 years ago
parent
commit
9577e1452c
  1. 8
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  3. 3
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java
  4. 3
      designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

8
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -35,12 +35,12 @@ public class JDBCDefPane extends JPanel {
public static final String DRIVER_TYPE = "driver_type";
public static final String USER_NAME = "user_name";
public static final int TIME_MULTIPLE = 1000;
private static final String EMPTY_DB = StringUtils.EMPTY;
private static final String OTHER_DB = "Others";
private static Map<String, DriverURLName[]> jdbcMap = new HashMap<String, DriverURLName[]>();
static {
jdbcMap.put("Others", new DriverURLName[]{new DriverURLName("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:"),
jdbcMap.put(OTHER_DB, new DriverURLName[]{new DriverURLName("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:"),
new DriverURLName("org.hsqldb.jdbcDriver", "jdbc:hsqldb:file:[PATH_TO_DB_FILES]"), new DriverURLName("com.inet.tds.TdsDriver", "jdbc:inetdae7:localhost:1433/"),
new DriverURLName("COM.cloudscape.JDBCDriver", "jdbc:cloudscape:/cloudscape/"),
new DriverURLName("com.internetcds.jdbc.tds.Driver", "jdbc:freetds:sqlserver://localhost/")});
@ -65,7 +65,7 @@ public class JDBCDefPane extends JPanel {
private UITextField userNameTextField;
private JPasswordField passwordTextField;
// 请不要改动dbtype,只应该最后添加
private final String[] dbtype = {EMPTY_DB, "Oracle", "DB2", "SQL Server", "MySQL", "Sybase", "Access", "Derby", "Postgre","SQLite","Inceptor", "Others"};
private final String[] dbtype = {"Oracle", "DB2", "SQL Server", "MySQL", "Sybase", "Access", "Derby", "Postgre","SQLite","Inceptor", OTHER_DB};
// carl:DBCP的一些属性
private IntegerEditor DBCP_INITIAL_SIZE = new IntegerEditor();
@ -184,7 +184,7 @@ public class JDBCDefPane extends JPanel {
}
}
if (!out) {
this.dbtypeComboBox.setSelectedItem(EMPTY_DB);
this.dbtypeComboBox.setSelectedItem(OTHER_DB);
}
}
this.driverComboBox.setSelectedItem(jdbcDatabase.getDriver());

2
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -936,7 +936,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
*/
@Override
public PreviewProvider[] supportPreview() {
return new PreviewProvider[]{new FormPreview()};
return new PreviewProvider[]{new FormPreview(), new MobilePreview()};
}
/**

3
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -52,6 +52,7 @@ import com.fr.design.menu.ToolBarDef;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.parameter.ParameterDefinitePane;
import com.fr.design.parameter.ParameterInputPane;
import com.fr.design.preview.MobilePreview;
import com.fr.design.preview.PagePreview;
import com.fr.design.preview.ViewPreview;
import com.fr.design.preview.WriteEnhancePreview;
@ -889,7 +890,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public PreviewProvider[] supportPreview() {
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING);
return ArrayUtils.addAll(new PreviewProvider[]{
new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview()
new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview()
}, set.toArray(new PreviewProvider[set.size()]));
}

3
designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

@ -7,6 +7,7 @@ import com.fr.event.Listener;
import com.fr.module.Activator;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.record.analyzer.Metrics;
import com.fr.runtime.FineRuntime;
import com.fr.start.Designer;
import com.fr.start.ServerStarter;
import com.fr.start.SplashContext;
@ -63,7 +64,7 @@ public class DesignerStartup extends Activator {
DesignerContext.getDesignerFrame().getProgressDialog().setVisible(true);
startSub(StartFinishActivator.class);
FineRuntime.startFinish();
}
private void browserDemo() {

Loading…
Cancel
Save