|
|
@ -9,21 +9,25 @@ import com.fr.design.formula.CustomVariableResolver; |
|
|
|
import com.fr.design.formula.FormulaFactory; |
|
|
|
import com.fr.design.formula.FormulaFactory; |
|
|
|
import com.fr.design.formula.SortFormulaPane; |
|
|
|
import com.fr.design.formula.SortFormulaPane; |
|
|
|
import com.fr.design.formula.UIFormula; |
|
|
|
import com.fr.design.formula.UIFormula; |
|
|
|
|
|
|
|
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ispinner.UISpinner; |
|
|
|
import com.fr.design.gui.ispinner.UISpinner; |
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
|
|
|
|
import com.fr.design.gui.style.TextFormatPane; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
|
|
|
|
import com.fr.design.style.FormatPane; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.report.cell.CellElement; |
|
|
|
import com.fr.report.cell.CellElement; |
|
|
|
import com.fr.report.cell.TemplateCellElement; |
|
|
|
import com.fr.report.cell.TemplateCellElement; |
|
|
|
import com.fr.report.cell.cellattr.CellExpandAttr; |
|
|
|
import com.fr.report.cell.cellattr.CellExpandAttr; |
|
|
|
import com.fr.report.cell.cellattr.core.group.DSColumn; |
|
|
|
import com.fr.report.cell.cellattr.core.group.DSColumn; |
|
|
|
import com.fr.report.cell.cellattr.core.group.SelectCount; |
|
|
|
import com.fr.report.cell.cellattr.core.group.SelectCount; |
|
|
|
|
|
|
|
import com.fr.van.chart.designer.component.format.FormatPaneWithOutFont; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.*; |
|
|
@ -40,6 +44,7 @@ public class DSColumnAdvancedPane extends BasicPane { |
|
|
|
private SortPane sortPane; |
|
|
|
private SortPane sortPane; |
|
|
|
private SelectCountPane selectCountPane; |
|
|
|
private SelectCountPane selectCountPane; |
|
|
|
private ValuePane valuePane; |
|
|
|
private ValuePane valuePane; |
|
|
|
|
|
|
|
private FormatAttrPane formatAttrPane; |
|
|
|
private UICheckBox horizontalExtendableCheckBox; |
|
|
|
private UICheckBox horizontalExtendableCheckBox; |
|
|
|
private UICheckBox verticalExtendableCheckBox; |
|
|
|
private UICheckBox verticalExtendableCheckBox; |
|
|
|
private UICheckBox useMultiplyNumCheckBox; |
|
|
|
private UICheckBox useMultiplyNumCheckBox; |
|
|
@ -64,6 +69,8 @@ public class DSColumnAdvancedPane extends BasicPane { |
|
|
|
valuePane = new ValuePane(); |
|
|
|
valuePane = new ValuePane(); |
|
|
|
valuePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Custom_Data_Appearance"), null)); |
|
|
|
valuePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Custom_Data_Appearance"), null)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
formatAttrPane = new FormatAttrPane(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel extendablePane = null; |
|
|
|
JPanel extendablePane = null; |
|
|
|
if (setting > DSColumnPane.SETTING_DSRELATED) { |
|
|
|
if (setting > DSColumnPane.SETTING_DSRELATED) { |
|
|
@ -96,25 +103,28 @@ public class DSColumnAdvancedPane extends BasicPane { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, |
|
|
|
|
|
|
|
TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}; |
|
|
|
|
|
|
|
double[] columnSize = {TableLayout.FILL}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Component[][] components = null; |
|
|
|
Component[][] components = null; |
|
|
|
if (setting > DSColumnPane.SETTING_DSRELATED) { |
|
|
|
if (setting > DSColumnPane.SETTING_DSRELATED) { |
|
|
|
components = new Component[][]{ |
|
|
|
components = new Component[][]{ |
|
|
|
{sortPane}, |
|
|
|
{sortPane}, |
|
|
|
{selectCountPane}, |
|
|
|
{selectCountPane}, |
|
|
|
{valuePane}, |
|
|
|
{valuePane}, |
|
|
|
|
|
|
|
{formatAttrPane}, |
|
|
|
{extendablePane}, |
|
|
|
{extendablePane}, |
|
|
|
{multiNumPane} |
|
|
|
{multiNumPane} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
components = new Component[][]{ |
|
|
|
components = new Component[][]{ |
|
|
|
{sortPane}, |
|
|
|
{sortPane}, |
|
|
|
{valuePane} |
|
|
|
{valuePane}, |
|
|
|
|
|
|
|
{formatAttrPane} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, |
|
|
|
|
|
|
|
TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}; |
|
|
|
|
|
|
|
double[] columnSize = {TableLayout.FILL}; |
|
|
|
|
|
|
|
|
|
|
|
this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.CENTER); |
|
|
|
this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.CENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -130,6 +140,7 @@ public class DSColumnAdvancedPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
sortPane.populate(cellElement); |
|
|
|
sortPane.populate(cellElement); |
|
|
|
valuePane.populate(cellElement); |
|
|
|
valuePane.populate(cellElement); |
|
|
|
|
|
|
|
formatAttrPane.populate(cellElement); |
|
|
|
|
|
|
|
|
|
|
|
if (selectCountPane != null) { |
|
|
|
if (selectCountPane != null) { |
|
|
|
selectCountPane.populate(cellElement); |
|
|
|
selectCountPane.populate(cellElement); |
|
|
@ -179,6 +190,7 @@ public class DSColumnAdvancedPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
sortPane.update(cellElement); |
|
|
|
sortPane.update(cellElement); |
|
|
|
valuePane.update(cellElement); |
|
|
|
valuePane.update(cellElement); |
|
|
|
|
|
|
|
formatAttrPane.update(cellElement); |
|
|
|
|
|
|
|
|
|
|
|
if (selectCountPane != null) { |
|
|
|
if (selectCountPane != null) { |
|
|
|
selectCountPane.update(cellElement); |
|
|
|
selectCountPane.update(cellElement); |
|
|
@ -526,6 +538,44 @@ public class DSColumnAdvancedPane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class FormatAttrPane extends AbstractAttrNoScrollPane { |
|
|
|
|
|
|
|
private TextFormatPane formatPane; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected JPanel createContentPane() { |
|
|
|
|
|
|
|
this.formatPane = new TextFormatPane(); |
|
|
|
|
|
|
|
return this.formatPane; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Dimension getPreferredSize() { |
|
|
|
|
|
|
|
if (formatPane == null) { |
|
|
|
|
|
|
|
return super.getPreferredSize(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return formatPane.getPreferredSize(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void initContentPane() { |
|
|
|
|
|
|
|
leftContentPane = createContentPane(); |
|
|
|
|
|
|
|
if (leftContentPane != null) { |
|
|
|
|
|
|
|
leftContentPane.setBorder(BorderFactory.createEmptyBorder()); |
|
|
|
|
|
|
|
this.add(leftContentPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void populate(CellElement cellElement) { |
|
|
|
|
|
|
|
if (cellElement != null && formatPane != null) { |
|
|
|
|
|
|
|
formatPane.populateBean(cellElement.getStyle()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void update(CellElement cellElement) { |
|
|
|
|
|
|
|
if (cellElement != null && formatPane != null) { |
|
|
|
|
|
|
|
cellElement.setStyle(formatPane.update(cellElement.getStyle())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void checkButtonEnabled() { |
|
|
|
private void checkButtonEnabled() { |
|
|
|
if (useMultiplyNumCheckBox.isSelected()) { |
|
|
|
if (useMultiplyNumCheckBox.isSelected()) { |
|
|
|
multiNumSpinner.setEnabled(true); |
|
|
|
multiNumSpinner.setEnabled(true); |
|
|
|