|
|
@ -42,6 +42,7 @@ import com.fr.report.cell.cellattr.core.group.DSColumn; |
|
|
|
import com.fr.report.cell.cellattr.core.group.FilterTypeEnum; |
|
|
|
import com.fr.report.cell.cellattr.core.group.FilterTypeEnum; |
|
|
|
import com.fr.report.cell.cellattr.core.group.SelectCount; |
|
|
|
import com.fr.report.cell.cellattr.core.group.SelectCount; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
import com.fr.third.jodd.util.ArraysUtil; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.Icon; |
|
|
@ -60,6 +61,7 @@ import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ItemEvent; |
|
|
|
import java.awt.event.ItemEvent; |
|
|
|
import java.awt.event.ItemListener; |
|
|
|
import java.awt.event.ItemListener; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
|
|
|
|
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.BOTTOM; |
|
|
|
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.BOTTOM; |
|
|
|
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.EVEN; |
|
|
|
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.EVEN; |
|
|
@ -472,6 +474,7 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
if (cellElement != null) { |
|
|
|
if (cellElement != null) { |
|
|
|
sortPane.update(cellElement); |
|
|
|
sortPane.update(cellElement); |
|
|
|
valuePane.update(cellElement); |
|
|
|
valuePane.update(cellElement); |
|
|
|
|
|
|
|
formatAttrPane.update(cellElement); |
|
|
|
filterPane.update(cellElement); |
|
|
|
filterPane.update(cellElement); |
|
|
|
//更新单元格扩展属性
|
|
|
|
//更新单元格扩展属性
|
|
|
|
updateExtendConfig(); |
|
|
|
updateExtendConfig(); |
|
|
@ -486,6 +489,7 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
disableListener(); |
|
|
|
disableListener(); |
|
|
|
sortPane.populate(cellElement); |
|
|
|
sortPane.populate(cellElement); |
|
|
|
valuePane.populate(cellElement); |
|
|
|
valuePane.populate(cellElement); |
|
|
|
|
|
|
|
formatAttrPane.populate(cellElement); |
|
|
|
filterPane.populate(cellElement); |
|
|
|
filterPane.populate(cellElement); |
|
|
|
CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); |
|
|
|
CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); |
|
|
|
if (cellExpandAttr == null) { |
|
|
|
if (cellExpandAttr == null) { |
|
|
@ -614,15 +618,19 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
|
|
|
|
|
|
|
|
enableListener(); |
|
|
|
enableListener(); |
|
|
|
|
|
|
|
|
|
|
|
double[] rowSize = {P, P, P, P, P, P}; |
|
|
|
|
|
|
|
double[] columnSize = {F}; |
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
{sortPane}, |
|
|
|
{sortPane}, |
|
|
|
{filterPane}, |
|
|
|
{filterPane}, |
|
|
|
{valuePane}, |
|
|
|
{valuePane}, |
|
|
|
|
|
|
|
{formatAttrPane}, |
|
|
|
{extendableDirectionPane}, |
|
|
|
{extendableDirectionPane}, |
|
|
|
{multiNumPane} |
|
|
|
{multiNumPane} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double[] rowSize = new double[components.length]; |
|
|
|
|
|
|
|
Arrays.fill(rowSize, P); |
|
|
|
|
|
|
|
double[] columnSize = {F}; |
|
|
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); |
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1233,15 +1241,20 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public class FormatAttrPane extends AbstractAttrNoScrollPane { |
|
|
|
public class FormatAttrPane extends AbstractAttrNoScrollPane { |
|
|
|
private final TextFormatPane formatPane; |
|
|
|
private TextFormatPane formatPane; |
|
|
|
|
|
|
|
|
|
|
|
public FormatAttrPane() { |
|
|
|
@Override |
|
|
|
|
|
|
|
protected JPanel createContentPane() { |
|
|
|
this.formatPane = new TextFormatPane(); |
|
|
|
this.formatPane = new TextFormatPane(); |
|
|
|
|
|
|
|
return this.formatPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected JPanel createContentPane() { |
|
|
|
public Dimension getPreferredSize() { |
|
|
|
return formatPane; |
|
|
|
if (formatPane == null) { |
|
|
|
|
|
|
|
return super.getPreferredSize(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return formatPane.getPreferredSize(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void initContentPane() { |
|
|
|
protected void initContentPane() { |
|
|
@ -1253,13 +1266,13 @@ public class CellDSColumnEditor extends CellQuickEditor { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populate(CellElement cellElement) { |
|
|
|
public void populate(CellElement cellElement) { |
|
|
|
if (cellElement != null) { |
|
|
|
if (cellElement != null && formatPane != null) { |
|
|
|
formatPane.populateBean(cellElement.getStyle()); |
|
|
|
formatPane.populateBean(cellElement.getStyle()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void update(CellElement cellElement) { |
|
|
|
public void update(CellElement cellElement) { |
|
|
|
if (cellElement != null) { |
|
|
|
if (cellElement != null && formatPane != null) { |
|
|
|
cellElement.setStyle(formatPane.update(cellElement.getStyle())); |
|
|
|
cellElement.setStyle(formatPane.update(cellElement.getStyle())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|