帆软报表设计器源代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

72 lines
2.1 KiB

package com.fr.design.expand;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.cellattr.CellExpandAttr;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
public class ConditionParentPane extends JPanel {
private ParentPane leftParentPane;
private ParentPane upParentPane;
public ConditionParentPane() {
this.initComponents(null);
}
public ConditionParentPane(ActionListener listener) {
this.initComponents(listener);
}
public void initComponents(ActionListener listener) {
this.setLayout(new BorderLayout());
leftParentPane = new ParentPane(ParentPane.LEFT, listener);
upParentPane = new ParentPane(ParentPane.UP, listener);
this.add(row(10,
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Left_Parent") + ": ")).weight(0.1),
cell(leftParentPane).weight(0.3)
).weight(0.3),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Up_Parent") + ": ")).weight(0.1),
cell(upParentPane).weight(0.3)
).weight(0.3),
flex(0.2)
).getComponent());
}
public void putElementcase(ElementCasePane t){
leftParentPane.putElementcase(t);
upParentPane.putElementcase(t);
}
public void putCellElement(TemplateCellElement cellElement){
leftParentPane.putCellElement(cellElement);
upParentPane.putCellElement(cellElement);
}
public void populate(CellExpandAttr cellExpandAttr) {
if (cellExpandAttr == null) {
cellExpandAttr = new CellExpandAttr();
}
this.leftParentPane.populate(cellExpandAttr);
this.upParentPane.populate(cellExpandAttr);
}
public void update(CellExpandAttr cellExpandAttr) {
if (cellExpandAttr == null) {
cellExpandAttr = new CellExpandAttr();
}
this.leftParentPane.update(cellExpandAttr);
this.upParentPane.update(cellExpandAttr);
}
}