|
|
@ -5,12 +5,12 @@ import com.fr.design.constants.LayoutConstants; |
|
|
|
import com.fr.design.expand.ExpandLeftFatherPane; |
|
|
|
import com.fr.design.expand.ExpandLeftFatherPane; |
|
|
|
import com.fr.design.expand.ExpandUpFatherPane; |
|
|
|
import com.fr.design.expand.ExpandUpFatherPane; |
|
|
|
import com.fr.design.expand.SortExpandAttrPane; |
|
|
|
import com.fr.design.expand.SortExpandAttrPane; |
|
|
|
|
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
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.foldablepane.UIExpandablePane; |
|
|
|
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
@ -27,216 +27,227 @@ import java.awt.*; |
|
|
|
* 单元格扩展属性面板,是属性表面板的一个种类 |
|
|
|
* 单元格扩展属性面板,是属性表面板的一个种类 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class CellExpandAttrPane extends AbstractCellAttrPane { |
|
|
|
public class CellExpandAttrPane extends AbstractCellAttrPane { |
|
|
|
private UIButtonGroup<Byte> expandDirectionButton; |
|
|
|
private static final int SENIOR_HORIZONTAL_GAP = 12; |
|
|
|
private ExpandLeftFatherPane leftFatherPane; |
|
|
|
private static final int BASIC_HORIZONTAL_GAP = 20; |
|
|
|
private ExpandUpFatherPane rightFatherPane; |
|
|
|
private UIButtonGroup<Byte> expandDirectionButton; |
|
|
|
private UICheckBox horizontalExpandableCheckBox; |
|
|
|
private ExpandLeftFatherPane leftFatherPane; |
|
|
|
private UICheckBox verticalExpandableCheckBox; |
|
|
|
private ExpandUpFatherPane rightFatherPane; |
|
|
|
private SortExpandAttrPane sortAfterExpand; |
|
|
|
private UICheckBox horizontalExpandableCheckBox; |
|
|
|
private JPanel layoutPane; |
|
|
|
private UICheckBox verticalExpandableCheckBox; |
|
|
|
private JPanel basicPane; |
|
|
|
private SortExpandAttrPane sortAfterExpand; |
|
|
|
private JPanel seniorPane; |
|
|
|
private JPanel layoutPane; |
|
|
|
|
|
|
|
private JPanel basicPane; |
|
|
|
/** |
|
|
|
private JPanel seniorPane; |
|
|
|
* |
|
|
|
|
|
|
|
* @return |
|
|
|
/** |
|
|
|
*/ |
|
|
|
* @return |
|
|
|
public JPanel createContentPane() { |
|
|
|
*/ |
|
|
|
String[] nameArray = {Inter.getLocText("ExpandD-Not_Expand"), Inter.getLocText("Utils-Top_to_Bottom"), Inter.getLocText("Utils-Left_to_Right")}; |
|
|
|
public JPanel createContentPane() { |
|
|
|
Icon[] iconArray = { |
|
|
|
String[] nameArray = {Inter.getLocText("ExpandD-Not_Expand"), Inter.getLocText("Utils-Top_to_Bottom"), Inter.getLocText("Utils-Left_to_Right")}; |
|
|
|
BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), |
|
|
|
Icon[] iconArray = { |
|
|
|
BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"), |
|
|
|
BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), |
|
|
|
BaseUtils.readIcon("/com/fr/design/images/expand/landspace.png") |
|
|
|
BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"), |
|
|
|
}; |
|
|
|
BaseUtils.readIcon("/com/fr/design/images/expand/landspace.png") |
|
|
|
Byte[] valueArray = {Constants.NONE, Constants.TOP_TO_BOTTOM, Constants.LEFT_TO_RIGHT}; |
|
|
|
}; |
|
|
|
expandDirectionButton = new UIButtonGroup<Byte>(iconArray, valueArray); |
|
|
|
Byte[] valueArray = {Constants.NONE, Constants.TOP_TO_BOTTOM, Constants.LEFT_TO_RIGHT}; |
|
|
|
expandDirectionButton.setAllToolTips(nameArray); |
|
|
|
expandDirectionButton = new UIButtonGroup<Byte>(iconArray, valueArray); |
|
|
|
leftFatherPane = new ExpandLeftFatherPane(); |
|
|
|
expandDirectionButton.setAllToolTips(nameArray); |
|
|
|
rightFatherPane = new ExpandUpFatherPane(); |
|
|
|
leftFatherPane = new ExpandLeftFatherPane(); |
|
|
|
horizontalExpandableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable")); |
|
|
|
rightFatherPane = new ExpandUpFatherPane(); |
|
|
|
verticalExpandableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Vertical_Extendable")); |
|
|
|
horizontalExpandableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Horizontal_Extendable")); |
|
|
|
sortAfterExpand = new SortExpandAttrPane(); |
|
|
|
verticalExpandableCheckBox = new UICheckBox(Inter.getLocText("ExpandD-Vertical_Extendable")); |
|
|
|
initAllNames(); |
|
|
|
sortAfterExpand = new SortExpandAttrPane(); |
|
|
|
return layoutPane(); |
|
|
|
initAllNames(); |
|
|
|
} |
|
|
|
return layoutPane(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args){ |
|
|
|
|
|
|
|
// JFrame jf = new JFrame("test");
|
|
|
|
public static void main(String[] args) { |
|
|
|
// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
JFrame jf = new JFrame("test"); |
|
|
|
// JPanel content = (JPanel) jf.getContentPane();
|
|
|
|
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
|
// content.setLayout(new BorderLayout());
|
|
|
|
JPanel content = (JPanel) jf.getContentPane(); |
|
|
|
// content.add(new CellExpandAttrPane().layoutPane(), BorderLayout.CENTER);
|
|
|
|
content.setLayout(new BorderLayout()); |
|
|
|
// GUICoreUtils.centerWindow(jf);
|
|
|
|
content.add(new CellExpandAttrPane().layoutPane(), BorderLayout.CENTER); |
|
|
|
// jf.setSize(290, 400);
|
|
|
|
GUICoreUtils.centerWindow(jf); |
|
|
|
// jf.setVisible(true);
|
|
|
|
jf.setSize(290, 400); |
|
|
|
} |
|
|
|
jf.setVisible(true); |
|
|
|
|
|
|
|
} |
|
|
|
private void initAllNames() { |
|
|
|
|
|
|
|
expandDirectionButton.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expand_Direction")); |
|
|
|
private void initAllNames() { |
|
|
|
leftFatherPane.setGlobalName(Inter.getLocText("FR-Designer_LeftParent")); |
|
|
|
expandDirectionButton.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expand_Direction")); |
|
|
|
rightFatherPane.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Up_Father_Cell")); |
|
|
|
leftFatherPane.setGlobalName(Inter.getLocText("FR-Designer_LeftParent")); |
|
|
|
horizontalExpandableCheckBox.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expandable")); |
|
|
|
rightFatherPane.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Up_Father_Cell")); |
|
|
|
verticalExpandableCheckBox.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expandable")); |
|
|
|
horizontalExpandableCheckBox.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expandable")); |
|
|
|
} |
|
|
|
verticalExpandableCheckBox.setGlobalName(Inter.getLocText("FR-Designer_ExpandD_Expandable")); |
|
|
|
|
|
|
|
} |
|
|
|
private JPanel layoutPane() { |
|
|
|
|
|
|
|
layoutPane = new JPanel(new BorderLayout()); |
|
|
|
private JPanel layoutPane() { |
|
|
|
basicPane = new JPanel(); |
|
|
|
layoutPane = new JPanel(new BorderLayout()); |
|
|
|
seniorPane = new JPanel(); |
|
|
|
basicPane = new JPanel(); |
|
|
|
basicPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"),290,24,basicPane()); |
|
|
|
seniorPane = new JPanel(); |
|
|
|
seniorPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"),290,24,seniorPane()); |
|
|
|
basicPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 290, 24, basicPane()); |
|
|
|
layoutPane.add(basicPane,BorderLayout.NORTH); |
|
|
|
seniorPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 290, 24, seniorPane()); |
|
|
|
layoutPane.add(seniorPane,BorderLayout.CENTER); |
|
|
|
layoutPane.add(basicPane, BorderLayout.NORTH); |
|
|
|
return layoutPane; |
|
|
|
layoutPane.add(seniorPane, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
return layoutPane; |
|
|
|
|
|
|
|
} |
|
|
|
private JPanel basicPane(){ |
|
|
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
private JPanel basicPane() { |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
new Component[]{null,null}, |
|
|
|
UILabel direction = new UILabel(Inter.getLocText("FR-Designer_ExpandD_Expand_Direction"), SwingConstants.LEFT); |
|
|
|
new Component[]{new UILabel(" "+Inter.getLocText("FR-Designer_ExpandD_Expand_Direction")+" ", SwingConstants.LEFT), expandDirectionButton}, |
|
|
|
// JPanel directionPane = new JPanel(new BorderLayout());
|
|
|
|
new Component[]{new UILabel(" "+Inter.getLocText("FR-Designer_LeftParent"), SwingConstants.LEFT), leftFatherPane}, |
|
|
|
// directionPane.add(direction, BorderLayout.NORTH);
|
|
|
|
new Component[]{new UILabel(" "+Inter.getLocText("FR-Designer_ExpandD_Up_Father_Cell"), SwingConstants.LEFT), rightFatherPane}, |
|
|
|
UILabel left = new UILabel(Inter.getLocText("FR-Designer_LeftParent"), SwingConstants.LEFT); |
|
|
|
}; |
|
|
|
JPanel leftPane = new JPanel(new BorderLayout()); |
|
|
|
double[] rowSize = {p, p, p, p, p, p}; |
|
|
|
leftPane.add(left, BorderLayout.NORTH); |
|
|
|
double[] columnSize = {p, f}; |
|
|
|
UILabel up = new UILabel(Inter.getLocText("FR-Designer_ExpandD_Up_Father_Cell"), SwingConstants.LEFT); |
|
|
|
int[][] rowCount = {{1, 1},{1, 1}, {1, 3}, {1, 3}}; |
|
|
|
JPanel upPane = new JPanel(new BorderLayout()); |
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); |
|
|
|
upPane.add(up, BorderLayout.NORTH); |
|
|
|
} |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{null, null}, |
|
|
|
private JPanel seniorPane() { |
|
|
|
new Component[]{direction, expandDirectionButton}, |
|
|
|
double f = TableLayout.FILL; |
|
|
|
new Component[]{leftPane, leftFatherPane}, |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
new Component[]{upPane, rightFatherPane}, |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
}; |
|
|
|
new Component[]{null,null}, |
|
|
|
double[] rowSize = {p, p, p, p, p}; |
|
|
|
new Component[]{horizontalExpandableCheckBox, null}, |
|
|
|
double[] columnSize = {p, f}; |
|
|
|
new Component[]{verticalExpandableCheckBox, null}, |
|
|
|
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; |
|
|
|
new Component[]{new UILabel(" "+Inter.getLocText("FR-Designer_ExpendSort"), SwingConstants.RIGHT), sortAfterExpand}, |
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, BASIC_HORIZONTAL_GAP, LayoutConstants.VGAP_LARGE); |
|
|
|
}; |
|
|
|
} |
|
|
|
double[] rowSize = {p, p, p, p, p, p, p, p}; |
|
|
|
|
|
|
|
double[] columnSize = {p, f}; |
|
|
|
private JPanel seniorPane() { |
|
|
|
int[][] rowCount = {{1, 1}, {1, 1}, {1, 3}, {1, 3}}; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
} |
|
|
|
UILabel expendSort = new UILabel(Inter.getLocText("FR-Designer_ExpendSort"), SwingConstants.LEFT); |
|
|
|
|
|
|
|
JPanel expendSortPane = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
expendSortPane.add(expendSort, BorderLayout.NORTH); |
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
@Override |
|
|
|
new Component[]{null, null}, |
|
|
|
protected void populateBean() { |
|
|
|
new Component[]{horizontalExpandableCheckBox, null}, |
|
|
|
this.leftFatherPane.setElementCasePane(elementCasePane); |
|
|
|
new Component[]{verticalExpandableCheckBox, null}, |
|
|
|
this.rightFatherPane.setElementCasePane(elementCasePane); |
|
|
|
new Component[]{expendSortPane, sortAfterExpand}, |
|
|
|
CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); |
|
|
|
}; |
|
|
|
if (cellExpandAttr == null) { |
|
|
|
double[] rowSize = {p, p, p, p, p, p, p, p}; |
|
|
|
cellExpandAttr = new CellExpandAttr(); |
|
|
|
double[] columnSize = {p, f}; |
|
|
|
cellElement.setCellExpandAttr(cellExpandAttr); |
|
|
|
int[][] rowCount = {{1, 1}, {1, 1}, {1, 3}, {1, 3}}; |
|
|
|
} |
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, SENIOR_HORIZONTAL_GAP, LayoutConstants.VGAP_LARGE); |
|
|
|
expandDirectionButton.setSelectedItem(cellExpandAttr.getDirection()); |
|
|
|
} |
|
|
|
this.leftFatherPane.populate(cellExpandAttr); |
|
|
|
|
|
|
|
this.rightFatherPane.populate(cellExpandAttr); |
|
|
|
|
|
|
|
switch (cellExpandAttr.getExtendable()) { |
|
|
|
@Override |
|
|
|
case CellExpandAttr.Both_EXTENDABLE: |
|
|
|
protected void populateBean() { |
|
|
|
horizontalExpandableCheckBox.setSelected(true); |
|
|
|
this.leftFatherPane.setElementCasePane(elementCasePane); |
|
|
|
verticalExpandableCheckBox.setSelected(true); |
|
|
|
this.rightFatherPane.setElementCasePane(elementCasePane); |
|
|
|
break; |
|
|
|
CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); |
|
|
|
case CellExpandAttr.Vertical_EXTENDABLE: |
|
|
|
if (cellExpandAttr == null) { |
|
|
|
horizontalExpandableCheckBox.setSelected(false); |
|
|
|
cellExpandAttr = new CellExpandAttr(); |
|
|
|
verticalExpandableCheckBox.setSelected(true); |
|
|
|
cellElement.setCellExpandAttr(cellExpandAttr); |
|
|
|
break; |
|
|
|
} |
|
|
|
case CellExpandAttr.Horizontal_EXTENDABLE: |
|
|
|
expandDirectionButton.setSelectedItem(cellExpandAttr.getDirection()); |
|
|
|
horizontalExpandableCheckBox.setSelected(true); |
|
|
|
this.leftFatherPane.populate(cellExpandAttr); |
|
|
|
verticalExpandableCheckBox.setSelected(false); |
|
|
|
this.rightFatherPane.populate(cellExpandAttr); |
|
|
|
break; |
|
|
|
switch (cellExpandAttr.getExtendable()) { |
|
|
|
default: { |
|
|
|
case CellExpandAttr.Both_EXTENDABLE: |
|
|
|
horizontalExpandableCheckBox.setSelected(false); |
|
|
|
horizontalExpandableCheckBox.setSelected(true); |
|
|
|
verticalExpandableCheckBox.setSelected(false); |
|
|
|
verticalExpandableCheckBox.setSelected(true); |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
case CellExpandAttr.Vertical_EXTENDABLE: |
|
|
|
|
|
|
|
horizontalExpandableCheckBox.setSelected(false); |
|
|
|
sortAfterExpand.populate(cellExpandAttr); |
|
|
|
verticalExpandableCheckBox.setSelected(true); |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
case CellExpandAttr.Horizontal_EXTENDABLE: |
|
|
|
|
|
|
|
horizontalExpandableCheckBox.setSelected(true); |
|
|
|
@Override |
|
|
|
verticalExpandableCheckBox.setSelected(false); |
|
|
|
public String getIconPath() { |
|
|
|
break; |
|
|
|
|
|
|
|
default: { |
|
|
|
|
|
|
|
horizontalExpandableCheckBox.setSelected(false); |
|
|
|
|
|
|
|
verticalExpandableCheckBox.setSelected(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sortAfterExpand.populate(cellExpandAttr); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public String getIconPath() { |
|
|
|
// return "com/fr/design/images/expand/cellAttr.gif";
|
|
|
|
// return "com/fr/design/images/expand/cellAttr.gif";
|
|
|
|
return Inter.getLocText("FR-Designer_Expand"); |
|
|
|
return Inter.getLocText("FR-Designer_Expand"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void updateBean(TemplateCellElement cellElement) { |
|
|
|
public void updateBean(TemplateCellElement cellElement) { |
|
|
|
CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); |
|
|
|
CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); |
|
|
|
if (cellExpandAttr == null) { |
|
|
|
if (cellExpandAttr == null) { |
|
|
|
cellExpandAttr = new CellExpandAttr(); |
|
|
|
cellExpandAttr = new CellExpandAttr(); |
|
|
|
cellElement.setCellExpandAttr(cellExpandAttr); |
|
|
|
cellElement.setCellExpandAttr(cellExpandAttr); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Expand_Direction"))) { |
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Expand_Direction"))) { |
|
|
|
cellExpandAttr.setDirection(expandDirectionButton.getSelectedItem()); |
|
|
|
cellExpandAttr.setDirection(expandDirectionButton.getSelectedItem()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_LeftParent"))) { |
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_LeftParent"))) { |
|
|
|
this.leftFatherPane.update(cellExpandAttr); |
|
|
|
this.leftFatherPane.update(cellExpandAttr); |
|
|
|
} |
|
|
|
} |
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Up_Father_Cell"))) { |
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Up_Father_Cell"))) { |
|
|
|
this.rightFatherPane.update(cellExpandAttr); |
|
|
|
this.rightFatherPane.update(cellExpandAttr); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// extendable
|
|
|
|
// extendable
|
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD-Expandable"))) { |
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD-Expandable"))) { |
|
|
|
if (horizontalExpandableCheckBox.isSelected()) { |
|
|
|
if (horizontalExpandableCheckBox.isSelected()) { |
|
|
|
if (verticalExpandableCheckBox.isSelected()) { |
|
|
|
if (verticalExpandableCheckBox.isSelected()) { |
|
|
|
cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE); |
|
|
|
cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
cellExpandAttr.setExtendable(CellExpandAttr.Horizontal_EXTENDABLE); |
|
|
|
cellExpandAttr.setExtendable(CellExpandAttr.Horizontal_EXTENDABLE); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (verticalExpandableCheckBox.isSelected()) { |
|
|
|
if (verticalExpandableCheckBox.isSelected()) { |
|
|
|
cellExpandAttr.setExtendable(CellExpandAttr.Vertical_EXTENDABLE); |
|
|
|
cellExpandAttr.setExtendable(CellExpandAttr.Vertical_EXTENDABLE); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
cellExpandAttr.setExtendable(CellExpandAttr.None_EXTENDABLE); |
|
|
|
cellExpandAttr.setExtendable(CellExpandAttr.None_EXTENDABLE); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("ExpandD-Sort_After_Expand"))) { |
|
|
|
if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("ExpandD-Sort_After_Expand"))) { |
|
|
|
sortAfterExpand.update(cellExpandAttr); |
|
|
|
sortAfterExpand.update(cellExpandAttr); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void updateBeans() { |
|
|
|
public void updateBeans() { |
|
|
|
TemplateElementCase elementCase = elementCasePane.getEditingElementCase(); |
|
|
|
TemplateElementCase elementCase = elementCasePane.getEditingElementCase(); |
|
|
|
int cellRectangleCount = cs.getCellRectangleCount(); |
|
|
|
int cellRectangleCount = cs.getCellRectangleCount(); |
|
|
|
for (int rect = 0; rect < cellRectangleCount; rect++) { |
|
|
|
for (int rect = 0; rect < cellRectangleCount; rect++) { |
|
|
|
Rectangle cellRectangle = cs.getCellRectangle(rect); |
|
|
|
Rectangle cellRectangle = cs.getCellRectangle(rect); |
|
|
|
// 需要先行后列地增加新元素。
|
|
|
|
// 需要先行后列地增加新元素。
|
|
|
|
for (int j = 0; j < cellRectangle.height; j++) { |
|
|
|
for (int j = 0; j < cellRectangle.height; j++) { |
|
|
|
for (int i = 0; i < cellRectangle.width; i++) { |
|
|
|
for (int i = 0; i < cellRectangle.width; i++) { |
|
|
|
int column = i + cellRectangle.x; |
|
|
|
int column = i + cellRectangle.x; |
|
|
|
int row = j + cellRectangle.y; |
|
|
|
int row = j + cellRectangle.y; |
|
|
|
TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); |
|
|
|
TemplateCellElement cellElement = elementCase.getTemplateCellElement(column, row); |
|
|
|
if (cellElement == null) { |
|
|
|
if (cellElement == null) { |
|
|
|
cellElement = new DefaultTemplateCellElement(column, row); |
|
|
|
cellElement = new DefaultTemplateCellElement(column, row); |
|
|
|
elementCase.addCellElement(cellElement); |
|
|
|
elementCase.addCellElement(cellElement); |
|
|
|
} |
|
|
|
} |
|
|
|
updateBean(cellElement); |
|
|
|
updateBean(cellElement); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public String title4PopupWindow() { |
|
|
|
public String title4PopupWindow() { |
|
|
|
return Inter.getLocText("ExpandD-Expand_Attribute"); |
|
|
|
return Inter.getLocText("ExpandD-Expand_Attribute"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |