|
|
@ -224,63 +224,6 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
private UIButton conditionUIButton; |
|
|
|
private UIButton conditionUIButton; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 分组设置监听器 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private ItemListener groupListener = new ItemListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
|
|
|
|
if (e == null) { |
|
|
|
|
|
|
|
//分组-高级-自定义点确定的时候传进来null的e,但是这时候应该触发保存
|
|
|
|
|
|
|
|
groupPane.update(); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (e.getStateChange() == ItemEvent.DESELECTED) { |
|
|
|
|
|
|
|
groupPane.update(); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 数据集列设置监听器 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private ItemListener dataListener = new ItemListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
|
|
|
|
if (e.getStateChange() == ItemEvent.SELECTED) { |
|
|
|
|
|
|
|
dataPane.update(cellElement); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DSColumnBasicEditorPane() { |
|
|
|
|
|
|
|
dataPane = new SelectedDataColumnPane(true, true); |
|
|
|
|
|
|
|
groupPane = new ResultSetGroupDockingPane(); |
|
|
|
|
|
|
|
dataPane.setListener(dataListener); |
|
|
|
|
|
|
|
groupPane.setListener(groupListener); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double[] rowSize = {P}, columnSize = {60, F}; |
|
|
|
|
|
|
|
UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Filter_Conditions")); |
|
|
|
|
|
|
|
condition = new DSColumnConditionAction(); |
|
|
|
|
|
|
|
if (tc != null) { |
|
|
|
|
|
|
|
condition.setEditingComponent(tc); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//丢掉icon,修改按钮名称为编辑
|
|
|
|
|
|
|
|
condition.setSmallIcon(UIConstants.EMPTY_ICON); |
|
|
|
|
|
|
|
condition.setName(Toolkit.i18nText("Fine-Design_Basic_Edit")); |
|
|
|
|
|
|
|
conditionUIButton = new UIButton(condition); |
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{uiLabel, UIComponentUtils.wrapWithBorderLayoutPane(conditionUIButton)} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
conditionPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); |
|
|
|
|
|
|
|
this.createScrollPane(); |
|
|
|
|
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public String getIconPath() { |
|
|
|
public String getIconPath() { |
|
|
|
return Toolkit.i18nText("Fine-Design_Report_Basic"); |
|
|
|
return Toolkit.i18nText("Fine-Design_Report_Basic"); |
|
|
@ -300,11 +243,13 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void populate() { |
|
|
|
public void populate() { |
|
|
|
|
|
|
|
this.removeAttributeChangeListener(); |
|
|
|
dataPane.populate(DesignTableDataManager.getEditingTableDataSource(), cellElement, tc); |
|
|
|
dataPane.populate(DesignTableDataManager.getEditingTableDataSource(), cellElement, tc); |
|
|
|
groupPane.populate(cellElement); |
|
|
|
groupPane.populate(cellElement); |
|
|
|
if (tc != null) { |
|
|
|
if (tc != null) { |
|
|
|
condition.setEditingComponent(tc); |
|
|
|
condition.setEditingComponent(tc); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.addAttributeChangeListener(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -321,7 +266,7 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected JPanel createContentPane() { |
|
|
|
protected JPanel createContentPane() { |
|
|
|
|
|
|
|
initComponents(); |
|
|
|
double[] columnSize = {F}; |
|
|
|
double[] columnSize = {F}; |
|
|
|
double[] rowSize = {P, P, P}; |
|
|
|
double[] rowSize = {P, P, P}; |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
@ -334,6 +279,37 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
}; |
|
|
|
}; |
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); |
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initComponents(){ |
|
|
|
|
|
|
|
dataPane = new SelectedDataColumnPane(true, true); |
|
|
|
|
|
|
|
groupPane = new ResultSetGroupDockingPane(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double[] rowSize = {P}, columnSize = {60, F}; |
|
|
|
|
|
|
|
UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Filter_Conditions")); |
|
|
|
|
|
|
|
condition = new DSColumnConditionAction(); |
|
|
|
|
|
|
|
if (tc != null) { |
|
|
|
|
|
|
|
condition.setEditingComponent(tc); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//丢掉icon,修改按钮名称为编辑
|
|
|
|
|
|
|
|
condition.setSmallIcon(UIConstants.EMPTY_ICON); |
|
|
|
|
|
|
|
condition.setName(Toolkit.i18nText("Fine-Design_Basic_Edit")); |
|
|
|
|
|
|
|
conditionUIButton = new UIButton(condition); |
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{uiLabel, UIComponentUtils.wrapWithBorderLayoutPane(conditionUIButton)} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
conditionPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); |
|
|
|
|
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected AttributeChangeListener getAttributeChangeListener() { |
|
|
|
|
|
|
|
return new AttributeChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void attributeChange() { |
|
|
|
|
|
|
|
update(); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -381,93 +357,8 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
/*pane end*/ |
|
|
|
/*pane end*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*listeners begin*/ |
|
|
|
|
|
|
|
private UIObserverListener sortPaneFormulaChangeListener = new UIObserverListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void doChange() { |
|
|
|
|
|
|
|
sortPane.update(cellElement); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ChangeListener sortTypeBtnGroupChangeListener = new ChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
|
|
|
sortPane.update(cellElement); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private UIObserverListener filterPaneChangeListener = new UIObserverListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void doChange() { |
|
|
|
|
|
|
|
filterPane.update(cellElement); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private UIObserverListener customValuePaneChangeListener = new UIObserverListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void doChange() { |
|
|
|
|
|
|
|
valuePane.update(cellElement); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private AttributeChangeListener formatChangeListener = new AttributeChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void attributeChange() { |
|
|
|
|
|
|
|
formatAttrPane.update(cellElement); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ChangeListener heCheckBoxChangeListener = new ChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
|
|
|
cellDSColumnAdvancedPane.updateExtendConfig(); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ChangeListener veCheckBoxChangeListener = new ChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
|
|
|
cellDSColumnAdvancedPane.updateExtendConfig(); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ActionListener useMultiNumCheckBoxChangeListener = new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
checkButtonEnabled(); |
|
|
|
|
|
|
|
cellDSColumnAdvancedPane.updateMultipleConfig(); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ChangeListener multiNumSpinnerChangeListener = new ChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
|
|
|
cellDSColumnAdvancedPane.updateMultipleConfig(); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private UIObserverListener cellDSColumnSortPaneChangeListener = new UIObserverListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void doChange() { |
|
|
|
|
|
|
|
cellDSColumnSortPane.updateBean(cellElement); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
/*listeners end*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DSColumnAdvancedEditorPane() { |
|
|
|
public DSColumnAdvancedEditorPane() { |
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
|
|
|
this.createScrollPane(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -482,6 +373,7 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void update() { |
|
|
|
public void update() { |
|
|
|
if (cellElement != null) { |
|
|
|
if (cellElement != null) { |
|
|
@ -500,7 +392,7 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void populate() { |
|
|
|
public void populate() { |
|
|
|
if (cellElement != null) { |
|
|
|
if (cellElement != null) { |
|
|
|
disableListener(); |
|
|
|
this.removeAttributeChangeListener(); |
|
|
|
sortPane.populate(cellElement); |
|
|
|
sortPane.populate(cellElement); |
|
|
|
valuePane.populate(cellElement); |
|
|
|
valuePane.populate(cellElement); |
|
|
|
formatAttrPane.populate(cellElement); |
|
|
|
formatAttrPane.populate(cellElement); |
|
|
@ -542,7 +434,7 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
cellDSColumnSortPane.populateBean(cellElement); |
|
|
|
cellDSColumnSortPane.populateBean(cellElement); |
|
|
|
} |
|
|
|
} |
|
|
|
this.checkButtonEnabled(); |
|
|
|
this.checkButtonEnabled(); |
|
|
|
enableListener(); |
|
|
|
this.addAttributeChangeListener(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -551,6 +443,17 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected AttributeChangeListener getAttributeChangeListener() { |
|
|
|
|
|
|
|
return new AttributeChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void attributeChange() { |
|
|
|
|
|
|
|
update(); |
|
|
|
|
|
|
|
fireTargetModified(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 更新单元格扩展属性 |
|
|
|
* 更新单元格扩展属性 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -634,8 +537,6 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
multiPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); |
|
|
|
multiPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); |
|
|
|
multiNumPane.add(multiPane); |
|
|
|
multiNumPane.add(multiPane); |
|
|
|
|
|
|
|
|
|
|
|
enableListener(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
{sortPane}, |
|
|
|
{sortPane}, |
|
|
|
{filterPane}, |
|
|
|
{filterPane}, |
|
|
@ -658,34 +559,6 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
return contentPane; |
|
|
|
return contentPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void enableListener() { |
|
|
|
|
|
|
|
sortPane.addListener(sortPaneFormulaChangeListener, sortTypeBtnGroupChangeListener); |
|
|
|
|
|
|
|
filterPane.addListener(filterPaneChangeListener); |
|
|
|
|
|
|
|
valuePane.addListener(customValuePaneChangeListener); |
|
|
|
|
|
|
|
formatAttrPane.addAttributeChangeListener(formatChangeListener); |
|
|
|
|
|
|
|
heCheckBox.addChangeListener(heCheckBoxChangeListener); |
|
|
|
|
|
|
|
veCheckBox.addChangeListener(veCheckBoxChangeListener); |
|
|
|
|
|
|
|
useMultiNumCheckBox.addActionListener(useMultiNumCheckBoxChangeListener); |
|
|
|
|
|
|
|
multiNumSpinner.addChangeListener(multiNumSpinnerChangeListener); |
|
|
|
|
|
|
|
if (cellDSColumnSortPane != null) { |
|
|
|
|
|
|
|
cellDSColumnSortPane.addListener(cellDSColumnSortPaneChangeListener); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void disableListener() { |
|
|
|
|
|
|
|
sortPane.removeListener(sortTypeBtnGroupChangeListener); |
|
|
|
|
|
|
|
filterPane.removeListener(); |
|
|
|
|
|
|
|
valuePane.removeListener(); |
|
|
|
|
|
|
|
heCheckBox.removeChangeListener(heCheckBoxChangeListener); |
|
|
|
|
|
|
|
veCheckBox.removeChangeListener(veCheckBoxChangeListener); |
|
|
|
|
|
|
|
useMultiNumCheckBox.removeActionListener(useMultiNumCheckBoxChangeListener); |
|
|
|
|
|
|
|
multiNumSpinner.removeChangeListener(multiNumSpinnerChangeListener); |
|
|
|
|
|
|
|
if (cellDSColumnSortPane != null) { |
|
|
|
|
|
|
|
cellDSColumnSortPane.removeListener(cellDSColumnSortPaneChangeListener); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void checkButtonEnabled() { |
|
|
|
private void checkButtonEnabled() { |
|
|
|
if (useMultiNumCheckBox.isSelected()) { |
|
|
|
if (useMultiNumCheckBox.isSelected()) { |
|
|
|
multiNumSpinner.setEnabled(true); |
|
|
|
multiNumSpinner.setEnabled(true); |
|
|
|