|
|
|
@ -73,6 +73,7 @@ public class CellExpandExtraAttrPane extends JPanel {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void populate(TemplateCellElement cellElement) { |
|
|
|
|
refreshExtraPanel(); |
|
|
|
|
this.cellElement = cellElement; |
|
|
|
|
if (extras != null) { |
|
|
|
|
for (BasicBeanPane<TemplateCellElement> extra : extras) { |
|
|
|
@ -91,6 +92,13 @@ public class CellExpandExtraAttrPane extends JPanel {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void refresh() { |
|
|
|
|
refreshExtraPanel(); |
|
|
|
|
if (this.cellElement != null) { |
|
|
|
|
this.populate(cellElement); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void refreshExtraPanel() { |
|
|
|
|
this.removeAll(); |
|
|
|
|
if (extras == null) { |
|
|
|
|
extras = new ArrayList<>(); |
|
|
|
@ -99,9 +107,11 @@ public class CellExpandExtraAttrPane extends JPanel {
|
|
|
|
|
Set<CellExpandAttrPanelProvider> attrProviders = ExtraDesignClassManager.getInstance().getArray(CellExpandAttrPanelProvider.MARK_STRING); |
|
|
|
|
if (attrProviders != null) { |
|
|
|
|
for (CellExpandAttrPanelProvider attrProvider : attrProviders) { |
|
|
|
|
BasicBeanPane<TemplateCellElement> extra = attrProvider.createPanel(); |
|
|
|
|
if (extra != null) { |
|
|
|
|
extras.add(extra); |
|
|
|
|
if (attrProvider.isDisplayable()) { |
|
|
|
|
BasicBeanPane<TemplateCellElement> extra = attrProvider.createPanel(); |
|
|
|
|
if (extra != null) { |
|
|
|
|
extras.add(extra); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -115,9 +125,6 @@ public class CellExpandExtraAttrPane extends JPanel {
|
|
|
|
|
double[] columnSize = {TableLayout.PREFERRED, TableLayout.FILL}; |
|
|
|
|
JPanel content = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, H_GAP, V_GAP); |
|
|
|
|
this.add(content, BorderLayout.CENTER); |
|
|
|
|
if (this.cellElement != null) { |
|
|
|
|
this.populate(cellElement); |
|
|
|
|
} |
|
|
|
|
this.validate(); |
|
|
|
|
this.repaint(); |
|
|
|
|
} |
|
|
|
|