Browse Source

REPORT-92628 控件支持主题切换-部分控件未实现主题样式设置--格式调整

release/11.0
John.Ying-应志浩 2 years ago
parent
commit
3934830c1b
  1. 4
      designer-base/src/main/java/com/fr/design/widget/btn/ButtonConstants.java
  2. 74
      designer-base/src/main/java/com/fr/design/widget/btn/ButtonDetailPane.java
  3. 14
      designer-base/src/main/java/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java
  4. 151
      designer-form/src/main/java/com/fr/design/widget/btn/ButtonDetailPane.java
  5. 111
      designer-form/src/main/java/com/fr/design/widget/ui/btn/ExtraButtonPane.java
  6. 17
      designer-form/src/main/java/com/fr/design/widget/ui/btn/FormSubmitButtonDetailPane.java
  7. 16
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/AppendRowButtonDefinePane.java
  8. 24
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/DefaultButtonDetailPane.java
  9. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/DeleteRowButtonDefinePane.java
  10. 18
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java
  11. 11
      designer-realize/src/main/java/com/fr/design/widget/ui/btn/TreeNodeToogleButtonDefinePane.java

4
designer-base/src/main/java/com/fr/design/widget/btn/ButtonConstants.java

@ -45,7 +45,7 @@ public class ButtonConstants {
StableFactory.getMarkedClass(BridgeMark.TREE_NODE_TOGGLE_BUTTON, Widget.class) StableFactory.getMarkedClass(BridgeMark.TREE_NODE_TOGGLE_BUTTON, Widget.class)
}; };
public static final String[] TYPES4BUTTON4STRONGEST_CONTROL = { public static final String[] TYPES_BUTTON_NO_FREE = {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Common"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Common"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Insert_Row"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Insert_Row"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Delete_Row"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Delete_Row"),
@ -53,7 +53,7 @@ public class ButtonConstants {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_TreeNode") com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_TreeNode")
}; };
public static final Class[] CLASSES4BUTTON4STRONGEST_CONTROL = { public static final Class[] CLASSES_BUTTON_NO_FREE = {
Button.class, Button.class,
StableFactory.getMarkedClass(BridgeMark.APPEND_ROW_BUTTON, Widget.class), StableFactory.getMarkedClass(BridgeMark.APPEND_ROW_BUTTON, Widget.class),
StableFactory.getMarkedClass(BridgeMark.DELETE_ROW_BUTTON, Widget.class), StableFactory.getMarkedClass(BridgeMark.DELETE_ROW_BUTTON, Widget.class),

74
designer-base/src/main/java/com/fr/design/widget/btn/ButtonDetailPane.java

@ -0,0 +1,74 @@
package com.fr.design.widget.btn;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.DictionaryComboBox;
import com.fr.design.dialog.BasicPane;
import com.fr.form.ui.Button;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* Author : Richer
* Version: 6.5.6
* Date : 11-11-15
* Time : 下午6:21
*/
public abstract class ButtonDetailPane<T extends Button> extends BasicPane {
private List<ChangeListener> ls = new ArrayList<ChangeListener>();
protected final List<BasicBeanPane<T>> extraPaneList = new ArrayList<>();
@Override
public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Button");
}
public void populate(T button) {
}
public abstract T createButton();
public abstract T update();
protected void typeChange(Object obj) {
for (int i = 0, len = ls.size(); i < len; i++) {
ls.get(i).stateChanged(new ChangeEvent(obj));
}
}
public void addTypeChangeListener(ChangeListener l) {
ls.add(l);
}
public abstract Class classType();
protected DictionaryComboBox createButtonTypeComboBox() {
return createButtonTypeComboBox(false);
}
private DictionaryComboBox initDictionaryComboBox(DictionaryComboBox dictionaryComboBox) {
dictionaryComboBox.setSelectedItem(classType());
dictionaryComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
typeChange(dictionaryComboBox.getSelectedItem());
}
});
return dictionaryComboBox;
}
protected DictionaryComboBox createButtonTypeComboBox(Boolean containsExtraPane) {
final DictionaryComboBox dictionaryComboBox;
if (!containsExtraPane) {
dictionaryComboBox = new DictionaryComboBox(ButtonConstants.CLASSES4BUTTON, ButtonConstants.TYPES4BUTTON, false);
} else {
dictionaryComboBox = new DictionaryComboBox(ButtonConstants.CLASSES_BUTTON_NO_FREE, ButtonConstants.TYPES_BUTTON_NO_FREE, false);
}
return initDictionaryComboBox(dictionaryComboBox);
}
}

14
designer-form/src/main/java/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java → designer-base/src/main/java/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java

@ -4,9 +4,9 @@ import java.awt.*;
import javax.swing.*; import javax.swing.*;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.icombobox.DictionaryComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
@ -45,7 +45,7 @@ public abstract class ButtonWithHotkeysDetailPane<T extends Button> extends Butt
labelPane.add(iconPane); labelPane.add(iconPane);
Component comp = createCenterPane(); Component comp = createCenterPane();
Component[][] n_components = { Component[][] n_components = {
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Button_Type")), createButtonTypeComboBox(containsExtraPane)}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Button_Type")), createCustomButtonTypeComboBox()},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name")), buttonNameTextField = new UITextField()}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name")), buttonNameTextField = new UITextField()},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Icon")), iconPane}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Icon")), iconPane},
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Hot_keys")), hotkeysTextField = new UITextField()}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Hot_keys")), hotkeysTextField = new UITextField()},
@ -64,6 +64,10 @@ public abstract class ButtonWithHotkeysDetailPane<T extends Button> extends Butt
protected abstract Component createCenterPane(); protected abstract Component createCenterPane();
protected DictionaryComboBox createCustomButtonTypeComboBox() {
return createButtonTypeComboBox();
}
@Override @Override
public void populate(T button) { public void populate(T button) {
if (button == null) { if (button == null) {
@ -72,9 +76,6 @@ public abstract class ButtonWithHotkeysDetailPane<T extends Button> extends Butt
iconPane.setValue(button.getIconName()); iconPane.setValue(button.getIconName());
buttonNameTextField.setText(button.getText()); buttonNameTextField.setText(button.getText());
hotkeysTextField.setText(button.getHotkeys()); hotkeysTextField.setText(button.getHotkeys());
for (BasicBeanPane<T> pane : extraPaneList) {
pane.populateBean(button);
}
} }
@Override @Override
@ -83,9 +84,6 @@ public abstract class ButtonWithHotkeysDetailPane<T extends Button> extends Butt
button.setIconName((String)iconPane.getValue()); button.setIconName((String)iconPane.getValue());
button.setText(buttonNameTextField.getText()); button.setText(buttonNameTextField.getText());
button.setHotkeys(hotkeysTextField.getText()); button.setHotkeys(hotkeysTextField.getText());
for (BasicBeanPane<T> pane : extraPaneList) {
pane.updateBean(button);
}
return button; return button;
} }
} }

151
designer-form/src/main/java/com/fr/design/widget/btn/ButtonDetailPane.java

@ -1,151 +0,0 @@
package com.fr.design.widget.btn;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.WidgetAdvancedPaneProvider;
import com.fr.design.gui.icombobox.DictionaryComboBox;
import com.fr.design.dialog.BasicPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.form.ui.Button;
import com.fr.general.GeneralContext;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
/**
* Created by IntelliJ IDEA.
* Author : Richer
* Version: 6.5.6
* Date : 11-11-15
* Time : 下午6:21
*/
public abstract class ButtonDetailPane<T extends Button> extends BasicPane {
private List<ChangeListener> ls = new ArrayList<ChangeListener>();
protected final List<BasicBeanPane<T>> extraPaneList = new ArrayList<>();
protected JPanel extraPane;
protected boolean containsExtraPane;
protected static double F = TableLayout.FILL;
protected static double P = TableLayout.PREFERRED;
@Override
public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Button");
}
public void populate(T button) {
}
public abstract T createButton();
public abstract T update();
protected void typeChange(Object obj) {
for (int i = 0, len = ls.size(); i < len; i++) {
ls.get(i).stateChanged(new ChangeEvent(obj));
}
}
public void addTypeChangeListener(ChangeListener l) {
ls.add(l);
}
public abstract Class classType();
protected DictionaryComboBox createButtonTypeComboBox() {
// final DictionaryComboBox dictionaryComboBox = new DictionaryComboBox(ButtonConstants.CLASSES4BUTTON, ButtonConstants.TYPES4BUTTON, false);
// dictionaryComboBox.setSelectedItem(classType());
// dictionaryComboBox.addActionListener(new ActionListener() {
// @Override
// public void actionPerformed(ActionEvent e) {
// typeChange(dictionaryComboBox.getSelectedItem());
// }
// });
// return dictionaryComboBox;
return createButtonTypeComboBox(false);
}
private DictionaryComboBox initDictionaryComboBox(DictionaryComboBox dictionaryComboBox) {
dictionaryComboBox.setSelectedItem(classType());
dictionaryComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
typeChange(dictionaryComboBox.getSelectedItem());
}
});
return dictionaryComboBox;
// return createButtonTypeComboBox();
}
protected DictionaryComboBox createButtonTypeComboBox(Boolean containsExtraPane) {
final DictionaryComboBox dictionaryComboBox;
if (!containsExtraPane) {
dictionaryComboBox = new DictionaryComboBox(ButtonConstants.CLASSES4BUTTON, ButtonConstants.TYPES4BUTTON, false);
} else {
dictionaryComboBox = new DictionaryComboBox(ButtonConstants.CLASSES4BUTTON4STRONGEST_CONTROL, ButtonConstants.TYPES4BUTTON4STRONGEST_CONTROL, false);
}
return initDictionaryComboBox(dictionaryComboBox);
}
protected void initExtraPane() {
initPluginListener();
refreshExtraAdvancedPane();
}
protected void refreshExtraAdvancedPane() {
// do nothing
}
protected void refreshExtraAdvancedPane(Class cls) {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<T> provider : providers) {
if (!provider.accept(cls)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<T> pane : extraPaneList) {
extraPane.add(pane);
}
}
this.containsExtraPane = containsExtraPane;
}
protected void initPluginListener() {
GeneralContext.listenPluginRunningChanged(new PluginEventListener() {
@Override
public void on(PluginEvent event) {
refreshExtraAdvancedPane();
}
}, pluginContext -> pluginContext.getRuntime().contain(WidgetAdvancedPaneProvider.XML_TAG));
}
/**
* 插入配置项面板
*
* @param index 插入的位置
* @param pane 配置项面板
*/
protected void insertShortCut(int index, BasicBeanPane<T> pane) {
int size = extraPaneList.size();
index = Math.min(index, size);
extraPaneList.add(index, pane);
}
}

111
designer-form/src/main/java/com/fr/design/widget/ui/btn/ExtraButtonPane.java

@ -0,0 +1,111 @@
package com.fr.design.widget.ui.btn;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.WidgetAdvancedPaneProvider;
import com.fr.design.gui.icombobox.DictionaryComboBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane;
import com.fr.form.ui.Button;
import com.fr.general.GeneralContext;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import org.jetbrains.annotations.Nullable;
import javax.swing.JPanel;
import java.awt.Component;
import java.util.Set;
public abstract class ExtraButtonPane<T extends Button> extends ButtonWithHotkeysDetailPane<T> {
protected JPanel extraPane;
protected boolean containsExtraPane;
protected static double F = TableLayout.FILL;
protected static double P = TableLayout.PREFERRED;
protected void initExtraPane() {
initPluginListener();
refreshExtraAdvancedPane(classType());
}
protected void refreshExtraAdvancedPane(Class cls) {
extraPaneList.clear();
boolean containsExtraPane = false;
Set<WidgetAdvancedPaneProvider<T>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG);
for (WidgetAdvancedPaneProvider<T> provider : providers) {
if (!provider.accept(cls)) {
continue;
}
insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane());
containsExtraPane = true;
}
if (containsExtraPane) {
extraPane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (BasicBeanPane<T> pane : extraPaneList) {
extraPane.add(pane);
}
}
this.containsExtraPane = containsExtraPane;
}
protected void initPluginListener() {
GeneralContext.listenPluginRunningChanged(new PluginEventListener() {
@Override
public void on(PluginEvent event) {
refreshExtraAdvancedPane(classType());
}
}, pluginContext -> pluginContext.getRuntime().contain(WidgetAdvancedPaneProvider.XML_TAG));
}
/**
* 插入配置项面板
*
* @param index 插入的位置
* @param pane 配置项面板
*/
protected void insertShortCut(int index, BasicBeanPane<T> pane) {
int size = extraPaneList.size();
index = Math.min(index, size);
extraPaneList.add(index, pane);
}
@Override
public void populate(T button) {
super.populate(button);
for (BasicBeanPane<T> pane : extraPaneList) {
pane.populateBean(button);
}
}
@Override
public T update() {
T button = super.update();
for (BasicBeanPane<T> pane : extraPaneList) {
pane.updateBean(button);
}
return button;
}
@Override
protected DictionaryComboBox createCustomButtonTypeComboBox() {
return createButtonTypeComboBox(containsExtraPane);
}
protected Component createExtraPane(@Nullable BasicPane pane) {
initExtraPane();
Component[][] components = new Component[][]{
new Component[]{pane, null},
new Component[]{extraPane, null}
};
double[] rowSize = {P, P};
double[] columnSize = {P, F};
int[][] rowCount = {{1, 1},{1, 1}};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7);
}
}

17
designer-form/src/main/java/com/fr/design/widget/ui/btn/FormSubmitButtonDetailPane.java

@ -1,8 +1,6 @@
package com.fr.design.widget.ui.btn; package com.fr.design.widget.ui.btn;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.parameter.FormSubmitButton; import com.fr.form.parameter.FormSubmitButton;
import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane;
import java.awt.*; import java.awt.*;
@ -13,18 +11,11 @@ import java.awt.*;
* Date : 11-11-15 * Date : 11-11-15
* Time : 下午6:25 * Time : 下午6:25
*/ */
public class FormSubmitButtonDetailPane extends ButtonWithHotkeysDetailPane<FormSubmitButton> { public class FormSubmitButtonDetailPane extends ExtraButtonPane<FormSubmitButton> {
@Override @Override
protected Component createCenterPane() { protected Component createCenterPane() {
initExtraPane(); return createExtraPane(null);
Component[][] components = new Component[][]{
new Component[]{extraPane, null}
};
double[] rowSize = {P};
double[] columnSize = {P, F};
int[][] rowCount = {{1, 1}};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7);
} }
@Override @Override
@ -46,8 +37,4 @@ public class FormSubmitButtonDetailPane extends ButtonWithHotkeysDetailPane<Form
return FormSubmitButton.class; return FormSubmitButton.class;
} }
@Override
protected void refreshExtraAdvancedPane() {
super.refreshExtraAdvancedPane(FormSubmitButton.class);
}
} }

16
designer-realize/src/main/java/com/fr/design/widget/ui/btn/AppendRowButtonDefinePane.java

@ -18,7 +18,7 @@ import java.awt.*;
* Date : 11-11-15 * Date : 11-11-15
* Time : 下午8:02 * Time : 下午8:02
*/ */
public class AppendRowButtonDefinePane<T extends AppendRowButton> extends ButtonWithHotkeysDetailPane<AppendRowButton> { public class AppendRowButtonDefinePane<T extends AppendRowButton> extends ExtraButtonPane<AppendRowButton> {
private DefineAppendColumnRowPane defineColumnRowPane; private DefineAppendColumnRowPane defineColumnRowPane;
// @Override // @Override
@ -30,16 +30,8 @@ public class AppendRowButtonDefinePane<T extends AppendRowButton> extends Button
@Override @Override
protected Component createCenterPane() { protected Component createCenterPane() {
initExtraPane();
defineColumnRowPane = new DefineAppendColumnRowPane(); defineColumnRowPane = new DefineAppendColumnRowPane();
Component[][] components = new Component[][]{ return createExtraPane(defineColumnRowPane);
new Component[]{defineColumnRowPane, null},
new Component[]{extraPane, null}
};
double[] rowSize = {P, P};
double[] columnSize = {P, F};
int[][] rowCount = {{1, 1},{1, 1}};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7);
} }
@Override @Override
@ -69,8 +61,4 @@ public class AppendRowButtonDefinePane<T extends AppendRowButton> extends Button
return AppendRowButton.class; return AppendRowButton.class;
} }
@Override
protected void refreshExtraAdvancedPane() {
super.refreshExtraAdvancedPane(AppendRowButton.class);
}
} }

24
designer-realize/src/main/java/com/fr/design/widget/ui/btn/DefaultButtonDetailPane.java

@ -1,31 +1,22 @@
package com.fr.design.widget.ui.btn; package com.fr.design.widget.ui.btn;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.Button; import com.fr.form.ui.Button;
import com.fr.form.ui.FreeButton; import com.fr.form.ui.FreeButton;
import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane;
import java.awt.*; import java.awt.*;
/** /**
* Created by IntelliJ IDEA. Author : Richer Version: 6.5.6 Date : 11-11-15 Time * Created by IntelliJ IDEA. Author : Richer Version: 6.5.6 Date : 11-11-15 Time
* : 下午6:24 * : 下午6:24
*/ */
public class DefaultButtonDetailPane extends ButtonWithHotkeysDetailPane<Button> { public class DefaultButtonDetailPane extends ExtraButtonPane<Button> {
@Override @Override
protected Component createCenterPane() { protected Component createCenterPane() {
initExtraPane(); return createExtraPane(null);
if (containsExtraPane) {
Component[][] components = new Component[][]{
new Component[]{extraPane, null}
};
double[] rowSize = {P};
double[] columnSize = {P, F};
int[][] rowCount = {{1, 1}};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7);
}
return null;
} }
@Override @Override
@ -39,9 +30,4 @@ public class DefaultButtonDetailPane extends ButtonWithHotkeysDetailPane<Button>
return Button.class; return Button.class;
} }
@Override
protected void refreshExtraAdvancedPane() {
super.refreshExtraAdvancedPane(Button.class);
}
} }

18
designer-realize/src/main/java/com/fr/design/widget/ui/btn/DeleteRowButtonDefinePane.java

@ -2,9 +2,7 @@ package com.fr.design.widget.ui.btn;
import com.fr.base.IconManager; import com.fr.base.IconManager;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.report.web.button.write.DeleteRowButton; import com.fr.report.web.button.write.DeleteRowButton;
import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane;
import java.awt.*; import java.awt.*;
@ -15,21 +13,13 @@ import java.awt.*;
* Date : 11-11-15 * Date : 11-11-15
* Time : 下午8:04 * Time : 下午8:04
*/ */
public class DeleteRowButtonDefinePane<T extends DeleteRowButton> extends ButtonWithHotkeysDetailPane<DeleteRowButton> { public class DeleteRowButtonDefinePane<T extends DeleteRowButton> extends ExtraButtonPane<DeleteRowButton> {
private DefineDeleteColumnRowPane ddcp; private DefineDeleteColumnRowPane ddcp;
@Override @Override
protected Component createCenterPane() { protected Component createCenterPane() {
initExtraPane();
ddcp = new DefineDeleteColumnRowPane(); ddcp = new DefineDeleteColumnRowPane();
Component[][] components = new Component[][]{ return createExtraPane(ddcp);
new Component[]{ddcp, null},
new Component[]{extraPane, null}
};
double[] rowSize = {P, P};
double[] columnSize = {P, F};
int[][] rowCount = {{1, 1},{1, 1}};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7);
} }
@Override @Override
@ -59,8 +49,4 @@ public class DeleteRowButtonDefinePane<T extends DeleteRowButton> extends Button
return btn; return btn;
} }
@Override
protected void refreshExtraAdvancedPane() {
super.refreshExtraAdvancedPane(DeleteRowButton.class);
}
} }

18
designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java

@ -2,26 +2,16 @@ package com.fr.design.widget.ui.btn;
import java.awt.Component; import java.awt.Component;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.FreeButton; import com.fr.form.ui.FreeButton;
import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane;
public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton> { public class FreeButtonDetailPane extends ExtraButtonPane<FreeButton> {
private ButtonSytleDefinedPane buttonSytleDefinedPane; private ButtonSytleDefinedPane buttonSytleDefinedPane;
@Override @Override
protected Component createCenterPane() { protected Component createCenterPane() {
buttonSytleDefinedPane = new ButtonSytleDefinedPane(); buttonSytleDefinedPane = new ButtonSytleDefinedPane();
initExtraPane(); return createExtraPane(buttonSytleDefinedPane);
Component[][] components = new Component[][]{
new Component[]{buttonSytleDefinedPane, null},
new Component[]{extraPane, null}
};
double[] rowSize = {P, P};
double[] columnSize = {P, F};
int[][] rowCount = {{1, 1},{1, 1}};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7);
} }
@Override @Override
@ -46,8 +36,4 @@ public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton
return FreeButton.class; return FreeButton.class;
} }
@Override
protected void refreshExtraAdvancedPane() {
super.refreshExtraAdvancedPane(FreeButton.class);
}
} }

11
designer-realize/src/main/java/com/fr/design/widget/ui/btn/TreeNodeToogleButtonDefinePane.java

@ -9,7 +9,6 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.Button; import com.fr.form.ui.Button;
import com.fr.report.web.button.form.TreeNodeToggleButton; import com.fr.report.web.button.form.TreeNodeToggleButton;
import com.fr.design.widget.btn.ButtonDetailPane;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -21,7 +20,7 @@ import java.awt.*;
* Date : 11-11-15 * Date : 11-11-15
* Time : 下午7:45 * Time : 下午7:45
*/ */
public class TreeNodeToogleButtonDefinePane<T extends TreeNodeToggleButton> extends ButtonDetailPane<Button> { public class TreeNodeToogleButtonDefinePane<T extends TreeNodeToggleButton> extends ExtraButtonPane<Button> {
public TreeNodeToogleButtonDefinePane() { public TreeNodeToogleButtonDefinePane() {
initComponents(); initComponents();
@ -33,8 +32,9 @@ public class TreeNodeToogleButtonDefinePane<T extends TreeNodeToggleButton> exte
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double rowSize[] = {p}; double rowSize[] = {p};
double columnSize[] = {p, f}; double columnSize[] = {p, f};
initExtraPane();
Component[][] n_components = { Component[][] n_components = {
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Button_Type")), createButtonTypeComboBox()}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Button_Type")), createCustomButtonTypeComboBox()},
}; };
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, IntervalConstants.INTERVAL_L2, 8); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, IntervalConstants.INTERVAL_L2, 8);
JPanel borderPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel borderPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -45,6 +45,11 @@ public class TreeNodeToogleButtonDefinePane<T extends TreeNodeToggleButton> exte
} }
@Override
protected Component createCenterPane() {
return null;
}
@Override @Override
public TreeNodeToggleButton update() { public TreeNodeToggleButton update() {
return createButton(); return createButton();

Loading…
Cancel
Save