Browse Source

Merge pull request #527 in BA/design from ~KERRY/design:dev to dev

* commit 'e2da2e04d41a86e3786a63771d86b5ab61076c06':
  REPORT-849 数据集窗口支持拖拽(方便数据集名称较长的显示)
  REPORT-849 数据集窗口支持拖拽(方便数据集名称较长的显示)
master
superman 8 years ago
parent
commit
05b95520ee
  1. 26
      designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

26
designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

@ -28,6 +28,7 @@ import com.fr.design.gui.syntax.ui.rtextarea.RTextScrollPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.script.Calculator;
@ -47,8 +48,8 @@ import java.util.ArrayList;
import java.util.List;
public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
private static final String PREVIEW_BUTTON = Inter.getLocText("Preview");
private static final String REFRESH_BUTTON = Inter.getLocText("Refresh");
private static final String PREVIEW_BUTTON = Inter.getLocText("FR-Designer_Preview");
private static final String REFRESH_BUTTON = Inter.getLocText("FR-Designer_Refresh");
private ConnectionTableProcedurePane connectionTableProcedurePane;
private UITableEditorPane<ParameterProvider> editorPane;
@ -77,7 +78,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
JPanel paraMeanPane = new JPanel(new BorderLayout());
paraMeanPane.setPreferredSize(new Dimension(680, 90));
UILabel paraMean = new UILabel(Inter.getLocText("Datasource-Param_DES"));
UILabel paraMean = new UILabel(Inter.getLocText("FR-Designer-Datasource-Param_DES"));
paraMeanPane.add(paraMean, BorderLayout.CENTER);
ParameterTableModel model = new ParameterTableModel() {
@ -125,9 +126,12 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
}
}
});
this.add(connectionTableProcedurePane, BorderLayout.WEST);
this.add(sqlSplitPane, BorderLayout.CENTER);
box.setMinimumSize(new Dimension(310, 400));
// 使用SplitPane
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, connectionTableProcedurePane, sqlSplitPane);
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
mainSplitPane.setOneTouchExpandable(true);
this.add(mainSplitPane, BorderLayout.CENTER);
}
private boolean isPreviewOrRefreshButton (FocusEvent e) {
@ -140,7 +144,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
@Override
protected String title4PopupWindow() {
return Inter.getLocText("DS-Database_Query");
return Inter.getLocText("FR-Designer-DS-Database_Query");
}
private void refresh() {
@ -160,7 +164,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
toolBarDef.addShortCut(new PreviewAction());
toolBarDef.addShortCut(SeparatorDef.DEFAULT);
toolBarDef.addShortCut(new EditPageQueryAction());
isShareCheckBox = new UICheckBox(Inter.getLocText("Is_Share_DBTableData"));
isShareCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Is_Share_DBTableData"));
maxPanel = new MaxMemRowCountPanel();
maxPanel.setBorder(null);
UIToolbar editToolBar = ToolBarDef.createJToolBar();
@ -233,7 +237,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
String dbName = this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName();
if (StringUtils.isBlank(dbName) || StringUtils.isBlank(this.sqlTextPane.getText())) {
try {
throw new Exception(Inter.getLocText("Connect_SQL_Cannot_Null") + ".");
throw new Exception(Inter.getLocText("FR-Designer_Connect_SQL_Cannot_Null") + ".");
} catch (Exception e) {
// JOptionPane.showMessageDialog(DBTableDataPane.this,
// Inter.getLocText("Connect_SQL_Cannot_Null") + ".");
@ -288,7 +292,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
private class EditPageQueryAction extends UpdateAction {
public EditPageQueryAction() {
this.setName(Inter.getLocText("LayerPageReport_PageQuery"));
this.setName(Inter.getLocText("FR-Designer-LayerPageReport_PageQuery"));
this.setMnemonic('L');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/text.png"));
}
@ -338,7 +342,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
@Override
protected String title4PopupWindow() {
return Inter.getLocText("LayerPageReport_Define_PageQuerySQL");
return Inter.getLocText("FR-Designer-LayerPageReport_Define_PageQuerySQL");
}
}
}
Loading…
Cancel
Save