Browse Source

REPORT-51678 同步部分插件修复代码

feature/10.0
kuangshuai 4 years ago
parent
commit
4f70159da5
  1. 2
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/ToolbarPane.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java
  3. 2
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java
  4. 10
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterPane.java
  5. 2
      designer-realize/src/main/java/com/fr/design/share/ui/config/ShareConfigPane.java
  6. 5
      designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java

2
designer-form/src/main/java/com/fr/design/mainframe/share/ui/local/ToolbarPane.java

@ -119,7 +119,7 @@ class ToolbarPane extends JPanel {
private FilterPane createFilterPane() { private FilterPane createFilterPane() {
filterPanel = FilterPane.createLocalFilterPane(); filterPanel = FilterPane.createLocalFilterPane();
filterPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); filterPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
filterPanel.registerChangeListerner(e -> LocalWidgetRepoPane.getInstance().refreshShowPanel()); filterPanel.registerChangeListener(e -> LocalWidgetRepoPane.getInstance().refreshShowPanel());
return filterPanel; return filterPanel;
} }

2
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java

@ -138,7 +138,7 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel {
} }
public void initFilterPaneListener(FilterPane filterPane) { public void initFilterPaneListener(FilterPane filterPane) {
filterPane.registerChangeListerner(new ChangeListener() { filterPane.registerChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(final ChangeEvent e) { public void stateChanged(final ChangeEvent e) {
String filterStr = e.getSource().toString(); String filterStr = e.getSource().toString();

2
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java

@ -90,7 +90,7 @@ public class OnlineWidgetShowPane extends AbstractOnlineWidgetShowPane {
@Override @Override
public void initFilterPaneListener(FilterPane filterPane) { public void initFilterPaneListener(FilterPane filterPane) {
super.initFilterPaneListener(filterPane); super.initFilterPaneListener(filterPane);
filterPane.registerChangeListerner(new ChangeListener() { filterPane.registerChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
lastFilter = e.getSource().toString(); lastFilter = e.getSource().toString();

10
designer-form/src/main/java/com/fr/design/mainframe/share/ui/widgetfilter/FilterPane.java

@ -46,7 +46,7 @@ public class FilterPane extends JPanel {
private Popup popup; private Popup popup;
private boolean showPopup = false; private boolean showPopup = false;
private FilterPopupPane filterPopupPane; private FilterPopupPane filterPopupPane;
private ChangeListener changeListener; private List<ChangeListener> changeListenerList = new ArrayList<>();
private final AWTEventListener awtEventListener; private final AWTEventListener awtEventListener;
List<PopStateChangeListener> listenerList = new ArrayList<>(); List<PopStateChangeListener> listenerList = new ArrayList<>();
@ -191,12 +191,14 @@ public class FilterPane extends JPanel {
&& !ComparatorUtils.equals(mv.getSource(), filterLabel); && !ComparatorUtils.equals(mv.getSource(), filterLabel);
} }
public void registerChangeListerner(ChangeListener changeListener) { public void registerChangeListener(ChangeListener changeListener) {
this.changeListener = changeListener; changeListenerList.add(changeListener);
} }
public void fireChangeListener(ChangeEvent e) { public void fireChangeListener(ChangeEvent e) {
this.changeListener.stateChanged(e); for (ChangeListener changeListener : changeListenerList) {
changeListener.stateChanged(e);
}
} }
public void reset() { public void reset() {

2
designer-realize/src/main/java/com/fr/design/share/ui/config/ShareConfigPane.java

@ -155,7 +155,7 @@ public class ShareConfigPane extends BasicPane {
private JPanel createInfoPane() { private JPanel createInfoPane() {
JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Share_Introduce")); JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Share_Introduce"));
PlaceholderTextArea textArea = new PlaceholderTextArea(); PlaceholderTextArea textArea = new PlaceholderTextArea();
textArea.setText(this.widget.getDescription()); textArea.setText(getDescription());
textArea.setPlaceholder(Toolkit.i18nText("Fine-Design_Share_No_Introduction")); textArea.setPlaceholder(Toolkit.i18nText("Fine-Design_Share_No_Introduction"));
textArea.setEditable(false); textArea.setEditable(false);
UIScrollPane scrollPane = new UIScrollPane(textArea); UIScrollPane scrollPane = new UIScrollPane(textArea);

5
designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java

@ -17,6 +17,7 @@ import com.fr.locale.InterProviderFactory;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable; import javax.swing.JTable;
import javax.swing.JTree; import javax.swing.JTree;
import javax.swing.event.TreeSelectionListener; import javax.swing.event.TreeSelectionListener;
@ -144,8 +145,8 @@ public class EffectContent extends JPanel {
} }
private void setPaneDisabled(Component component) { private void setPaneDisabled(Component component) {
if (component instanceof UIScrollPane) { if (component instanceof JScrollPane) {
UIScrollPane pane = (UIScrollPane) component; JScrollPane pane = (JScrollPane) component;
setPaneDisabled(pane.getViewport().getView()); setPaneDisabled(pane.getViewport().getView());
return; return;
} }

Loading…
Cancel
Save