|
|
|
@ -168,7 +168,8 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
|
|
|
|
|
|
|
|
|
|
// peter:编辑的TablePane
|
|
|
|
|
JPanel editTablePane = new JPanel(new BorderLayout(FineUIScale.scale(10), 0)); |
|
|
|
|
editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180)); |
|
|
|
|
Dimension editTableDimension = createEditTablePreferredSize(); |
|
|
|
|
editTablePane.setBounds(0, 0, editTableDimension.width, editTableDimension.height); |
|
|
|
|
keyColumnValuesTable = new KeyColumnNameValueTable(); |
|
|
|
|
editTablePane.add(new UIScrollPane(keyColumnValuesTable), BorderLayout.CENTER); |
|
|
|
|
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); |
|
|
|
@ -180,18 +181,15 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
|
|
|
|
|
cell(FineUIUtils.wrapComponentWithTitle(chooseTable, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")))) |
|
|
|
|
.getComponent()); |
|
|
|
|
JPanel bottomPane = initBottomPane(); |
|
|
|
|
this.add(new AttrScrollPane() { |
|
|
|
|
@Override |
|
|
|
|
protected JPanel createContentPane() { |
|
|
|
|
JPanel contentPane = new JPanel(new BorderLayout()); |
|
|
|
|
contentPane.add(column(10, |
|
|
|
|
cell(northPane), |
|
|
|
|
cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))), |
|
|
|
|
cell(bottomPane)) |
|
|
|
|
.getComponent(), BorderLayout.CENTER); |
|
|
|
|
return contentPane; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
JPanel contentPane = new JPanel(new BorderLayout()); |
|
|
|
|
contentPane.add(column(10, |
|
|
|
|
cell(northPane), |
|
|
|
|
cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))), |
|
|
|
|
cell(bottomPane)) |
|
|
|
|
.getComponent(), BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
this.add(new UIScrollPane(contentPane)); |
|
|
|
|
|
|
|
|
|
initJTableColumn(); |
|
|
|
|
|
|
|
|
@ -264,17 +262,17 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
|
|
|
|
|
UpdateCheckBox.setEnabled(b); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel initBottomPane() { |
|
|
|
|
protected JPanel initBottomPane() { |
|
|
|
|
JPanel eventPane = new JPanel(new BorderLayout()); |
|
|
|
|
eventPane.setPreferredSize(createControlBtnPanePreferredSize()); |
|
|
|
|
eventPane.add(addEventButton(), BorderLayout.WEST); |
|
|
|
|
eventPane.add(addEventButton()); |
|
|
|
|
|
|
|
|
|
JPanel conditionPane = this.createConditionPane(); |
|
|
|
|
|
|
|
|
|
JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
btPane.add(column(5, |
|
|
|
|
cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))), |
|
|
|
|
cell(eventPane) |
|
|
|
|
row(cell(eventPane), cell(new UILabel())) |
|
|
|
|
).getComponent()); |
|
|
|
|
return btPane; |
|
|
|
|
} |
|
|
|
@ -315,8 +313,8 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
|
|
|
|
|
DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer(); |
|
|
|
|
cr.setForeground(UIConstants.NORMAL_BACKGROUND); |
|
|
|
|
JScrollPane jp = new JScrollPane(conditionsTree); |
|
|
|
|
jp.setPreferredSize(FineUIScale.scale(new Dimension(0, 40))); |
|
|
|
|
addComponent(conditionPane, jp); |
|
|
|
|
jp.setPreferredSize(createJpPreferredSize()); |
|
|
|
|
jp.setVisible(setJpVisible()); |
|
|
|
|
String submitCondition = Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition"); |
|
|
|
|
UIButton addSubmitConditionButton = new UIButton(submitCondition); |
|
|
|
|
addSubmitConditionButton.setToolTipText(submitCondition); |
|
|
|
@ -354,12 +352,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
JPanel controlBtnPane = new JPanel(new BorderLayout()); |
|
|
|
|
controlBtnPane.setPreferredSize(FineUIScale.scale(new Dimension(122, 20))); |
|
|
|
|
controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize()); |
|
|
|
|
controlBtnPane.add(addSubmitConditionButton, BorderLayout.NORTH); |
|
|
|
|
conditionPane.add(row( |
|
|
|
|
cell(jp).weight(1.0), |
|
|
|
|
cell(new Spacer(122).add(controlBtnPane)) |
|
|
|
|
).getComponent()); |
|
|
|
|
conditionPane.setPreferredSize(createConditionPanePreferredSize()); |
|
|
|
|
conditionPane.add(controlBtnPane, setControlBtnPanePosition()); |
|
|
|
|
conditionPane.add(jp, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
return conditionPane; |
|
|
|
|
} |
|
|
|
@ -372,13 +369,25 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
|
|
|
|
|
mainPane.add(addPane, BorderLayout.CENTER); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected Dimension createEditTablePreferredSize() { |
|
|
|
|
return FineUIScale.scale(new Dimension(280, 180)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected Dimension createConditionPanePreferredSize() { |
|
|
|
|
return FineUIScale.scale(new Dimension(454, 80)); |
|
|
|
|
return FineUIScale.scale(new Dimension(454, 60)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected boolean setJpVisible() { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected Dimension createJpPreferredSize() { |
|
|
|
|
return FineUIScale.scale(new Dimension(280, 60)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected Dimension createControlBtnPanePreferredSize() { |
|
|
|
|
return new Dimension(110, 20); |
|
|
|
|
return FineUIScale.scale(new Dimension(110, 20)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected String setControlBtnPanePosition() { |
|
|
|
|