Browse Source

REPORT-83259 & REPORT-83263 【最强控件】控件样式跟随主题&开放自定义

new-design
Bruce.Deng 2 years ago
parent
commit
44f40a77f0
  1. 18
      designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java

18
designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java

@ -48,19 +48,19 @@ public abstract class ButtonDefinePane<T extends Button> extends AbstractDataMod
labelNameTextField = new UITextField();
UILabel backgroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background"));
backgroundLabel.setVerticalAlignment(SwingConstants.TOP);
initExtraPane();
initAdvancedPane();
JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
boundsPane.add(extraPane);
UIExpandablePane advancedPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, boundsPane);
this.add(advancedPane);
}
private void initExtraPane() {
private void initAdvancedPane() {
initPluginListener();
refreshExtraAdvancedPane();
refreshAdvancedPane();
}
private void refreshExtraAdvancedPane() {
private void refreshAdvancedPane() {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
@ -71,12 +71,16 @@ public abstract class ButtonDefinePane<T extends Button> extends AbstractDataMod
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
refreshAdvancedPane(containsExtraPane);
}
private void refreshAdvancedPane(boolean containsExtraPane) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
Component[] backgroundCompPane = createBackgroundComp();
Component[] frFont = createFontPane();
double rowSize[];
double columnSize[];
double[] rowSize;
double[] columnSize;
int[][] rowCount;
Component[][] n_components;
if (containsExtraPane) {
@ -116,7 +120,7 @@ public abstract class ButtonDefinePane<T extends Button> extends AbstractDataMod
GeneralContext.listenPluginRunningChanged(new PluginEventListener() {
@Override
public void on(PluginEvent event) {
refreshExtraAdvancedPane();
refreshAdvancedPane();
}
}, pluginContext -> pluginContext.getRuntime().contain(WidgetAdvancedPaneProvider.XML_TAG));
}

Loading…
Cancel
Save