|
|
@ -17,6 +17,7 @@ import com.fr.design.menu.MenuKeySet; |
|
|
|
import com.fr.design.menu.ShortCut; |
|
|
|
import com.fr.design.menu.ShortCut; |
|
|
|
import com.fr.design.selection.QuickEditor; |
|
|
|
import com.fr.design.selection.QuickEditor; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.utils.gui.UIComponentUtils; |
|
|
|
import com.fr.grid.selection.CellSelection; |
|
|
|
import com.fr.grid.selection.CellSelection; |
|
|
|
import com.fr.quickeditor.cellquick.layout.CellElementBarLayout; |
|
|
|
import com.fr.quickeditor.cellquick.layout.CellElementBarLayout; |
|
|
|
import com.fr.report.cell.TemplateCellElement; |
|
|
|
import com.fr.report.cell.TemplateCellElement; |
|
|
@ -46,20 +47,9 @@ import java.util.ArrayList; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> { |
|
|
|
public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected static final Dimension LABEL_DIMENSION = new Dimension(60, 20); |
|
|
|
/** |
|
|
|
|
|
|
|
* 面板配置 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
protected UITextField columnRowTextField; |
|
|
|
|
|
|
|
protected TemplateCellElement cellElement; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 占位label |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
protected final Dimension LABEL_DIMENSION = new Dimension(60, 20); |
|
|
|
|
|
|
|
protected final UILabel EMPTY_LABEL = new UILabel(); |
|
|
|
|
|
|
|
protected static final int VGAP = 10, HGAP = 8, VGAP_INNER = 3; |
|
|
|
protected static final int VGAP = 10, HGAP = 8, VGAP_INNER = 3; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 滚动条相关配置 |
|
|
|
* 滚动条相关配置 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -70,6 +60,15 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> { |
|
|
|
private int maxHeight = 280; |
|
|
|
private int maxHeight = 280; |
|
|
|
private static final int TITLE_HEIGHT = 50; |
|
|
|
private static final int TITLE_HEIGHT = 50; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 面板配置 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
protected UITextField columnRowTextField; |
|
|
|
|
|
|
|
protected TemplateCellElement cellElement; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 占位label
|
|
|
|
|
|
|
|
protected final UILabel EMPTY_LABEL = new UILabel(); |
|
|
|
|
|
|
|
|
|
|
|
private UIComboBox comboBox; |
|
|
|
private UIComboBox comboBox; |
|
|
|
private UpdateAction[] cellInsertActions; |
|
|
|
private UpdateAction[] cellInsertActions; |
|
|
|
private int selectedIndex; |
|
|
|
private int selectedIndex; |
|
|
@ -207,16 +206,15 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> { |
|
|
|
private JPanel initTopContent() { |
|
|
|
private JPanel initTopContent() { |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double[] columnSize = {p, f}; |
|
|
|
double[] columnSize = {60, f}; |
|
|
|
double[] rowSize = {p, p}; |
|
|
|
double[] rowSize = {p, p}; |
|
|
|
UILabel cellLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell")); |
|
|
|
UILabel cellLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell")); |
|
|
|
cellLabel.setPreferredSize(LABEL_DIMENSION); |
|
|
|
|
|
|
|
UILabel insertContentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Insert_Cell_Element")); |
|
|
|
UILabel insertContentLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Insert_Cell_Element")); |
|
|
|
insertContentLabel.setPreferredSize(LABEL_DIMENSION); |
|
|
|
UIComponentUtils.setLineWrap(insertContentLabel); |
|
|
|
initCellElementEditComboBox(); |
|
|
|
initCellElementEditComboBox(); |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{cellLabel, columnRowTextField = initColumnRowTextField()}, |
|
|
|
new Component[]{cellLabel, columnRowTextField = initColumnRowTextField()}, |
|
|
|
new Component[]{insertContentLabel, comboBox}, |
|
|
|
new Component[]{insertContentLabel, UIComponentUtils.wrapWithBorderLayoutPane(comboBox)}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); |
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); |
|
|
|
} |
|
|
|
} |
|
|
|