Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

final/10.0
ju 6 years ago
parent
commit
f93c9b48a5
  1. 8
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  2. 2
      designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java
  3. 9
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java
  4. 3
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java
  5. 10
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
  6. 2
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java
  7. 5
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  8. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java
  9. BIN
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@1x.png
  10. BIN
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@2x.png

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-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java

@ -18,4 +18,6 @@ public interface JavaScriptActionProvider extends Mutable{
FurtherBasicBeanPane<? extends JavaScript> getJavaScriptActionPane(JavaScriptActionPane pane);
boolean isSupportType();
}

9
designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java

@ -26,4 +26,13 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider
public FurtherBasicBeanPane<? extends JavaScript> getJavaScriptActionPane(JavaScriptActionPane pane) {
return getJavaScriptActionPane();
}
/**
* 判断是否是支持的类型cpt,frm默认是
* @return
*/
@Override
public boolean isSupportType(){
return true;
}
}

3
designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java

@ -9,7 +9,6 @@ import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.write.submit.DBManipulationPane;
import com.fr.form.ui.WebContentUtils;
import com.fr.js.JavaScript;
import javax.swing.BorderFactory;
@ -46,9 +45,11 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
Set<JavaScriptActionProvider> javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG);
if (javaScriptActionProviders != null) {
for (JavaScriptActionProvider jsp : javaScriptActionProviders) {
if(jsp.isSupportType()){
paneList.add(jsp.getJavaScriptActionPane(this));
}
}
}
// 自定义事件
// paneList.add(new CustomActionPane());
return paneList;

10
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java

@ -2,9 +2,11 @@ package com.fr.design.mainframe.alphafine;
import com.fr.base.extension.FileExtension;
import com.fr.general.CloudCenter;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.util.ArrayList;
/**
@ -138,4 +140,12 @@ public class AlphaFineConstants {
public static final int RECOMMEND_MAX_ITEM_NUM = 3;
public static final String BACK_ICON_NAME = "back@1x.png";
public static final ArrayList<String> CONJUNCTION = new ArrayList<String>() {{
add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_HE"));
add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_YU"));
add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_DE"));
}};
}

2
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java

@ -24,7 +24,7 @@ public class BottomCellRender implements ListCellRenderer<Object> {
JPanel line = new JPanel();
line.setPreferredSize(new Dimension(200, 1));
line.setBackground(AlphaFineConstants.GRAY);
line.setBackground(AlphaFineConstants.WHITE);
panel.add(line, BorderLayout.NORTH);
goToWebLabel.setFont(AlphaFineConstants.MEDIUM_FONT);

5
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -239,6 +239,7 @@ public class AlphaFineDialog extends UIDialog {
hotPane.setLayout(new BorderLayout());
UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot"));
uiLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
uiLabel.setFont(AlphaFineConstants.SMALL_FONT);
uiLabel.setForeground(AlphaFineConstants.DARK_GRAY);
@ -1377,7 +1378,9 @@ public class AlphaFineDialog extends UIDialog {
*/
private void initBackPane() {
backPane = new JPanel(new BorderLayout());
JLabel jLabel = new JLabel(" < " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back"));
JLabel jLabel = new JLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back"));
jLabel.setIcon(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + AlphaFineConstants.BACK_ICON_NAME));
jLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
jLabel.setPreferredSize(new Dimension(80, 20));
jLabel.setFont(AlphaFineConstants.SMALL_FONT);
jLabel.setForeground(AlphaFineConstants.DARK_GRAY);

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java

@ -2,7 +2,6 @@ package com.fr.design.mainframe.alphafine.search.manager.impl;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.stable.StringUtils;
import com.fr.third.ibm.icu.text.BreakIterator;
import java.util.ArrayList;
@ -72,7 +71,8 @@ public class SegmentationManager {
int start = itor.first();
for (int end = itor.next(); end != BreakIterator.DONE; start = end, end = itor.next()) {
String temp = searchText.substring(start, end);
if (!StringUtils.isEmpty(temp)) {
//去掉空和连词
if (StringUtils.isNotEmpty(temp) && !AlphaFineConstants.CONJUNCTION.contains(temp)) {
result.add(temp);
}
}

BIN
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@1x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

BIN
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Loading…
Cancel
Save