Browse Source

Merge branch 'final/11.0' of ssh://code.fineres.com:7999/~tommy/design into final/11.0

final/11.0
kuangshuai 3 years ago
parent
commit
ec99e25755
  1. 16
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  2. 4
      designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java
  3. 7
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java
  4. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java
  5. 6
      designer-base/src/main/java/com/fr/design/style/background/gradient/FixedGradientBar.java

16
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -53,6 +53,7 @@ import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.manage.PluginFilter; import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener; import com.fr.plugin.observer.PluginEventListener;
import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -74,6 +75,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
@ -180,16 +182,20 @@ public class TableDataTreePane extends BasicTableDataTreePane {
} }
private void initServerDatasetAuthTipJPanel() { private void initServerDatasetAuthTipJPanel() {
String[] lineTips = Toolkit.i18nText("Fine-Design_Server_Dataset_Auth_Tip").split("\n"); String datasetAuthTip = Toolkit.i18nText("Fine-Design_Server_Dataset_Auth_Tip");
List<String> lineTips = new ArrayList(Arrays.asList(datasetAuthTip.split("\n")));
if (datasetAuthTip.endsWith("\n")) {
lineTips.add(StringUtils.EMPTY);
}
serverDatasetAuthTipJPanel = new JPanel(); serverDatasetAuthTipJPanel = new JPanel();
serverDatasetAuthTipJPanel.setLayout(new GridLayout(lineTips.length, 1)); serverDatasetAuthTipJPanel.setLayout(new GridLayout(lineTips.size(), 1));
for (int i = 0; i < lineTips.length; i++) { for (int i = 0; i < lineTips.size(); i++) {
String lineTip = lineTips[i]; String lineTip = lineTips.get(i);
List<JLabel> jLabels = new ArrayList<>(); List<JLabel> jLabels = new ArrayList<>();
JLabel lineJLabel = new JLabel(lineTip); JLabel lineJLabel = new JLabel(lineTip);
lineJLabel.setForeground(Color.lightGray); lineJLabel.setForeground(Color.lightGray);
jLabels.add(lineJLabel); jLabels.add(lineJLabel);
if (i == (lineTips.length - 1)) { if (i == (lineTips.size() - 1)) {
JLabel jLabel = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Alphafine_No_Remind")); JLabel jLabel = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Alphafine_No_Remind"));
jLabel.setForeground(Color.blue); jLabel.setForeground(Color.blue);
jLabel.addMouseListener(new MouseAdapter() { jLabel.addMouseListener(new MouseAdapter() {

4
designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java

@ -696,7 +696,9 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
return; return;
} }
SingleJavaScript js = getList().get(table.getSelectedRow()); SingleJavaScript js = getList().get(table.getSelectedRow());
js.setParameters(parameterArr); if (parameterArr != null) {
js.setParameters(parameterArr);
}
fireTableDataChanged(); fireTableDataChanged();
} }
}); });

7
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java

@ -220,7 +220,12 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
saveButton.setEnabled(false); saveButton.setEnabled(false);
saveAsButton.setEnabled(true); saveAsButton.setEnabled(true);
actionListener.onSaved(config.cachedFetch(getName())); actionListener.onSaved(config.cachedFetch(getName()));
DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save_Successfully")); SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
DesignerToastMsgUtil.toastPrompt(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Profile_Pane_Save_Successfully"));
}
});
} }
}); });
} }

5
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartSeriesStylePane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.edit.chart; package com.fr.design.mainframe.theme.edit.chart;
import com.fr.base.FineColor;
import com.fr.base.theme.settings.ThemedChartStyle; import com.fr.base.theme.settings.ThemedChartStyle;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -7,12 +8,12 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.theme.dialog.TemplateThemeProfileDialog; import com.fr.design.mainframe.theme.dialog.TemplateThemeProfileDialog;
import com.fr.design.style.background.gradient.FixedGradientBar; import com.fr.design.style.background.gradient.FixedGradientBar;
import java.util.List;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.List;
/** /**
* @author Bjorn * @author Bjorn
@ -66,7 +67,7 @@ public class ChartSeriesStylePane extends AbstractChartStylePane {
if (chartStyle.getThemedChartSeriesColor().isCombineColor()) { if (chartStyle.getThemedChartSeriesColor().isCombineColor()) {
List<Color> editingColorScheme = TemplateThemeProfileDialog.getEditingColorScheme(); List<Color> editingColorScheme = TemplateThemeProfileDialog.getEditingColorScheme();
colorTypeButton.setSelectedIndex(0); colorTypeButton.setSelectedIndex(0);
gradientBar.updateColor(editingColorScheme.get(0), editingColorScheme.get(1)); gradientBar.updateColor(new FineColor(0, 0, editingColorScheme.get(0)), new FineColor(1, 0, editingColorScheme.get(1)));
} else { } else {
colorTypeButton.setSelectedIndex(1); colorTypeButton.setSelectedIndex(1);
gradientBar.updateColor(chartStyle.getThemedChartSeriesColor().getBeginColor(), chartStyle.getThemedChartSeriesColor().getEndColor()); gradientBar.updateColor(chartStyle.getThemedChartSeriesColor().getBeginColor(), chartStyle.getThemedChartSeriesColor().getEndColor());

6
designer-base/src/main/java/com/fr/design/style/background/gradient/FixedGradientBar.java

@ -14,6 +14,12 @@ public class FixedGradientBar extends GradientBar {
super(minvalue, maxvalue); super(minvalue, maxvalue);
} }
@Override
protected void clickButton(int select) {
setColor(getList().get(select).getColorInner());
super.clickButton(select);
}
@Override @Override
protected void addMouseDragListener() { protected void addMouseDragListener() {
//不添加拖拽事件 //不添加拖拽事件

Loading…
Cancel
Save