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