|
|
@ -2,6 +2,7 @@ package com.fr.design.data.tabledata.tabledatapane; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.Parameter; |
|
|
|
import com.fr.base.Parameter; |
|
|
|
import com.fr.base.ParameterHelper; |
|
|
|
import com.fr.base.ParameterHelper; |
|
|
|
|
|
|
|
import com.fr.base.i18n.BidiUtils; |
|
|
|
import com.fr.data.core.db.TableProcedure; |
|
|
|
import com.fr.data.core.db.TableProcedure; |
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
import com.fr.data.impl.Connection; |
|
|
|
import com.fr.data.impl.DBTableData; |
|
|
|
import com.fr.data.impl.DBTableData; |
|
|
@ -94,6 +95,8 @@ import java.util.List; |
|
|
|
public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implements SwitchableTableDataPane { |
|
|
|
public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implements SwitchableTableDataPane { |
|
|
|
|
|
|
|
|
|
|
|
private static final int BOTTOM = 6; |
|
|
|
private static final int BOTTOM = 6; |
|
|
|
|
|
|
|
private static final int SQL_TEXT_PANE_WIDTH = 680; |
|
|
|
|
|
|
|
private static final int CONNECTION_TABLE_MIN_WIDTH = 230; |
|
|
|
private static final String PREVIEW_BUTTON = Toolkit.i18nText("Fine-Design_Basic_Preview"); |
|
|
|
private static final String PREVIEW_BUTTON = Toolkit.i18nText("Fine-Design_Basic_Preview"); |
|
|
|
private static final String REFRESH_BUTTON = Toolkit.i18nText("Fine-Design_Basic_Refresh"); |
|
|
|
private static final String REFRESH_BUTTON = Toolkit.i18nText("Fine-Design_Basic_Refresh"); |
|
|
|
private ConnectionTableProcedurePane connectionTableProcedurePane; |
|
|
|
private ConnectionTableProcedurePane connectionTableProcedurePane; |
|
|
@ -123,6 +126,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen |
|
|
|
public DBTableDataPane() { |
|
|
|
public DBTableDataPane() { |
|
|
|
initCards(); |
|
|
|
initCards(); |
|
|
|
initContentPane(); |
|
|
|
initContentPane(); |
|
|
|
|
|
|
|
BidiUtils.applyOrientationByLocale(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -239,10 +243,10 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen |
|
|
|
RTextScrollPane sqlTextScrollPane = new RTextScrollPane(this.sqlTextPane); |
|
|
|
RTextScrollPane sqlTextScrollPane = new RTextScrollPane(this.sqlTextPane); |
|
|
|
sqlTextScrollPane.setLineNumbersEnabled(true); |
|
|
|
sqlTextScrollPane.setLineNumbersEnabled(true); |
|
|
|
sqlTextScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); |
|
|
|
sqlTextScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); |
|
|
|
sqlTextScrollPane.setPreferredSize(new Dimension(680, 600)); |
|
|
|
sqlTextScrollPane.setPreferredSize(new Dimension(SQL_TEXT_PANE_WIDTH, 600)); |
|
|
|
|
|
|
|
|
|
|
|
JPanel paraMeanPane = new JPanel(new BorderLayout()); |
|
|
|
JPanel paraMeanPane = new JPanel(new BorderLayout()); |
|
|
|
paraMeanPane.setPreferredSize(new Dimension(680, 90)); |
|
|
|
paraMeanPane.setPreferredSize(new Dimension(SQL_TEXT_PANE_WIDTH, 90)); |
|
|
|
UILabel paraMean = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Datasource_Param_DES")); |
|
|
|
UILabel paraMean = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Datasource_Param_DES")); |
|
|
|
paraMeanPane.add(paraMean, BorderLayout.CENTER); |
|
|
|
paraMeanPane.add(paraMean, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
@ -258,10 +262,15 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen |
|
|
|
|
|
|
|
|
|
|
|
box.setMinimumSize(new Dimension(300, 400)); |
|
|
|
box.setMinimumSize(new Dimension(300, 400)); |
|
|
|
|
|
|
|
|
|
|
|
this.connectionTableProcedurePane.setMinimumSize(new Dimension(230, 400)); |
|
|
|
this.connectionTableProcedurePane.setMinimumSize(new Dimension(CONNECTION_TABLE_MIN_WIDTH, 400)); |
|
|
|
this.connectionTableProcedurePane.setMaximumSize(new Dimension(500, 400)); |
|
|
|
this.connectionTableProcedurePane.setMaximumSize(new Dimension(500, 400)); |
|
|
|
|
|
|
|
JSplitPane mainSplitPane; |
|
|
|
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane); |
|
|
|
if (BidiUtils.rtl()) { |
|
|
|
|
|
|
|
mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, sqlSplitPane, this.connectionTableProcedurePane); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
mainSplitPane.setDividerLocation(BidiUtils.rtl() ? SQL_TEXT_PANE_WIDTH - CONNECTION_TABLE_MIN_WIDTH : CONNECTION_TABLE_MIN_WIDTH); |
|
|
|
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor())); |
|
|
|
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor())); |
|
|
|
mainSplitPane.setOneTouchExpandable(true); |
|
|
|
mainSplitPane.setOneTouchExpandable(true); |
|
|
|
contentPane.add(mainSplitPane, BorderLayout.CENTER); |
|
|
|
contentPane.add(mainSplitPane, BorderLayout.CENTER); |
|
|
|