Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

feature/big-screen
Bruce.Deng 5 years ago
parent
commit
86f516ecb5
  1. 8
      designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java
  2. 2
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  3. 6
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java
  4. 38
      designer-base/src/main/java/com/fr/design/remote/ui/AbstractManagerPane.java
  5. 2
      designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java
  6. 2
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  7. 10
      designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java
  8. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java
  9. 12
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  10. 16
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  11. 2
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

8
designer-base/src/main/java/com/fr/design/gui/itextfield/UINumberField.java

@ -35,6 +35,7 @@ public class UINumberField extends UITextField {
private double maxValue = Double.MAX_VALUE;
private boolean isContentChanged = false;
private boolean fillNegativeNumber = true;
public UINumberField() {
this(MAX_INTEGERLENGTH_32, MAX_DECIMALLENGTH);
@ -62,6 +63,10 @@ public class UINumberField extends UITextField {
initListener();
}
public void canFillNegativeNumber(boolean fillNegativeNumber) {
this.fillNegativeNumber = fillNegativeNumber;
}
public int getMaxIntegerLength() {
return maxIntegerLength;
}
@ -185,6 +190,9 @@ public class UINumberField extends UITextField {
// kunsnat: 这种限制输入 有个不好的地方, 比如删除时: 10.1 最大值限定100, 那么就删除中间的小数点之后变为101, 超出了100.
// 但是直接限制不能删除中间类似小数点, 那么也可能遇到: 最小值10 , 从100变化到其中的19, 就很难..
private boolean notChange(String strNew) {
if (!fillNegativeNumber && strNew.contains("-")) {
return true;
}
boolean noChange = false;
boolean isMinus = strNew.startsWith("-");
strNew = strNew.replaceFirst("-", StringUtils.EMPTY); // 控制能输入负数

2
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java

@ -368,6 +368,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
sizeJPanel.add(heightLabel);
UINumberField heightTextFiled = new UINumberField();
heightTextFiled.setMinValue(0);
heightTextFiled.canFillNegativeNumber(false);
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE));
heightTextFiled.setPreferredSize(new Dimension(40, 20));
sizeJPanel.add(heightTextFiled);
@ -377,6 +378,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
sizeJPanel.add(widthLabel);
UINumberField widthTextFiled = new UINumberField();
widthTextFiled.setMinValue(0);
widthTextFiled.canFillNegativeNumber(false);
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE));
widthTextFiled.setPreferredSize(new Dimension(40, 20));
sizeJPanel.add(widthTextFiled);

6
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileStyleDefinePane.java

@ -5,7 +5,7 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.Widget;
import com.fr.form.ui.mobile.MobileStyle;
@ -23,7 +23,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
private Widget widget;
private MobileStyleCustomDefinePane customBeanPane;
private Class<? extends MobileStyle> mobileStyleClazz;
private NewColorSelectBox colorSelectBox;
private ColorSelectBox colorSelectBox;
private Color titleColor = new Color(47, 142, 241);
MobileStyleDefinePane(Widget widget, Class<? extends MobileStyleCustomDefinePane> customBeanPaneClass,
@ -91,7 +91,7 @@ public class MobileStyleDefinePane extends BasicBeanPane<MobileStyle> {
UILabel colorSelectLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Widget_Background"), UILabel.RIGHT);
colorSelectLabel.setPreferredSize(new Dimension(65, 20));
colorSelectBox = new NewColorSelectBox(152);
colorSelectBox = new ColorSelectBox(152);
colorSelectBox.addSelectChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {

38
designer-base/src/main/java/com/fr/design/remote/ui/AbstractManagerPane.java

@ -67,6 +67,12 @@ public abstract class AbstractManagerPane extends BasicPane {
*/
private List<RemoteDesignMember> addedMembers = new ArrayList<>();
/**
* 具有设计权限的角色/用户
*/
private List<RemoteDesignMember> authorityMembers = new ArrayList<>();
/**
* 决策平台用户列表model
*/
@ -211,6 +217,9 @@ public abstract class AbstractManagerPane extends BasicPane {
resetAddedMembers();
this.addedMembers.addAll(addedMembers);
resetAuthorityMembers();
this.authorityMembers.addAll(addedMembers);
// 刷新右侧面板
addToAddedMemberList();
@ -314,15 +323,15 @@ public abstract class AbstractManagerPane extends BasicPane {
private void addToMemberList() {
addingListModel.clear();
for (RemoteDesignMember addingMember : addingMembers) {
for (RemoteDesignMember member : addingMembers) {
// 如果包含在右侧列表中,那么左侧列表默认选中
for (RemoteDesignMember addedMember : addedMembers){
if (addingMember.equals(addedMember)){
addingMember.setAuthority(addedMember.hasAuthority());
addingMember.setSelected(true);
}
if (addedMembers.contains(member)) {
member.setSelected(true);
}
else {
member.setSelected(false);
}
addingListModel.addElement(addingMember);
addingListModel.addElement(member);
}
addingList.revalidate();
addingList.repaint();
@ -350,6 +359,10 @@ public abstract class AbstractManagerPane extends BasicPane {
addedMembers.clear();
}
private void resetAuthorityMembers() {
authorityMembers.clear();
}
protected abstract Collection<RemoteDesignMember> getMembers(String userName, String keyWord);
protected abstract Collection<RemoteDesignMember> getMembers(String userName, String keyWord, int pageNum, int count);
@ -376,6 +389,7 @@ public abstract class AbstractManagerPane extends BasicPane {
@Override
protected void done() {
referAddingMemberList();
addToMemberList();
}
};
@ -403,12 +417,22 @@ public abstract class AbstractManagerPane extends BasicPane {
@Override
protected void done() {
referAddingMemberList();
addToMemberList();
}
};
loadMoreWorker.execute();
}
// 检查左侧列表角色/用户是否有权限
private void referAddingMemberList() {
for (RemoteDesignMember member : addingMembers) {
if (authorityMembers.contains(member)){
member.setAuthority(true);
}
}
}
private void sync2AddedMembersFromAdding() {
RemoteDesignMember[] members = new RemoteDesignMember[addingListModel.getSize()];

2
designer-chart/src/main/java/com/fr/design/chart/ChartCommonWizardPane.java

@ -12,7 +12,7 @@ public abstract class ChartCommonWizardPane extends ChartWizardPane {
return;
}
populate(cc.getSelectedChartProvider());
populate(cc.getSelectedChart(ChartProvider.class));
}
public abstract void populate(ChartProvider chart);

2
designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java

@ -123,7 +123,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
return;
}
ChartProvider chart4Update = cc.getSelectedChartProvider();
ChartProvider chart4Update = cc.getSelectedChart(ChartProvider.class);
if (chart4Update == null) {
String plotID = this.chartIDs[mainTypeList.getSelectedIndex()];
ChartProvider chart = ChartTypeManager.getInstance().getCharts(plotID)[iconViewList.getSelectedIndex()];

10
designer-chart/src/main/java/com/fr/design/mainframe/MiddleChartPropertyPane.java

@ -6,6 +6,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.designer.TargetComponent;
import com.fr.design.gui.chart.BaseChartPropertyPane;
@ -14,11 +15,12 @@ import com.fr.design.gui.frpane.UITitlePanel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itabpane.TitleChangeListener;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.stable.StableUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JComponent;
import java.awt.BorderLayout;
public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
@ -91,7 +93,7 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
* @param ePane 面板
*/
public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) {
addChartEditPane(collection.getSelectedChartProvider().getID());
addChartEditPane(collection.getSelectedChart(ChartProvider.class).getID());
setSupportCellData(true);
this.container.setEPane(ePane);
chartEditPane.populate(collection);

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java

@ -230,7 +230,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
return;
}
ChartProvider chartProvider = collection.getSelectedChartProvider();
ChartProvider chartProvider = collection.getSelectedChart(ChartProvider.class);
if (checkNeedsReLayout(chartProvider)) {
String chartID = chartProvider.getID();
if ("WaferChipChart".equals(chartID) || "BoxPlotChart".equals(chartID)) {

12
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -176,7 +176,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
* @return
*/
public ChartProvider getChangeStateNewChart() {
ChartProvider chart = editingCollection.getSelectedChartProvider();
ChartProvider chart = editingCollection.getSelectedChart(ChartProvider.class);
String chartID = chart.getID();
String priority = ChartTypeManager.getInstanceWithCheck().getPriority(chartID);
return ChartTypeManager.getInstanceWithCheck().getFirstChart(priority);
@ -199,7 +199,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
}
private boolean supportChange() {
return supportChangeConfigChartClassSet.contains(editingCollection.getSelectedChartProvider().getClass());
return supportChangeConfigChartClassSet.contains(editingCollection.getSelectedChart(ChartProvider.class).getClass());
}
ActionListener configListener = new ActionListener() {
@ -354,9 +354,9 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
}
private void checkConfigButtonVisible() {
addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChartProvider().getID()));
addButton.setVisible(ChartTypeManager.enabledChart(editingCollection.getSelectedChart(ChartProvider.class).getID()));
//新建一个collection
if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChartProvider() != null) {
if (editingCollection.getChartCount() == 1 && editingCollection.getSelectedChart(ChartProvider.class) != null) {
//Chart 不支持图表切换
configButton.setVisible(supportChange());
}
@ -484,7 +484,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
private void deleteAButton() {
//先重构属性,在重构面板,否则面板在重构过程中,会重新将属性中的切换图表加到indexList中,导致面板无法删除
//记录改变前的plotID
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChartProvider().getID();
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChart(ChartProvider.class).getID();
if (editingCollection != null) {
int count = editingCollection.getChartCount();
for (int i = 0; i < count; i++) {
@ -564,7 +564,7 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
if (isEnabled()) {
noSelected();
//记录改变前的plotID
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChartProvider().getID();
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChart(ChartProvider.class).getID();
changeCollectionSelected(getButtonName());
setSelectedWithFireListener(true);
fireSelectedChanged();

16
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -19,15 +19,15 @@ import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
/**
* 图表 属性表, 类型选择 界面.
@ -208,7 +208,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
//处理办法:这边除了重构 下拉项选项和cardNames 还需要把cards重构下(不需要init pane,只需要我需要的拿出来就好了)
private void relayout(ChartCollection collection){
//重构需要重构下拉框选项和cardNames
ChartProvider chart = collection.getSelectedChartProvider();
ChartProvider chart = collection.getSelectedChart(ChartProvider.class);
String chartID = chart.getID();
String priority = ChartTypeManager.getInstanceWithCheck().getPriority(chartID);
boolean enabledChart = ChartTypeManager.enabledChart(chartID);
@ -294,7 +294,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
* @param collection
*/
public void reLayoutEditPane(String lastPlotID, ChartCollection collection){
ChartProvider chart = collection.getSelectedChartProvider();
ChartProvider chart = collection.getSelectedChart(ChartProvider.class);
String plotID = chart.getID();
boolean isUseDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(plotID);
if (editPane != null && editPane.isDefaultPane() != isUseDefault || (!isUseDefault && !ComparatorUtils.equals(lastPlotID, plotID))){
@ -315,7 +315,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
public void populate(ChartCollection collection) {
editingCollection = collection;
ChartProvider chart = collection.getSelectedChartProvider();
ChartProvider chart = collection.getSelectedChart(ChartProvider.class);
this.remove(leftContentPane);
initContentPane();
@ -333,7 +333,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
public void update(ChartCollection collection) {
editingCollection = collection;
buttonPane.update(collection);// 内部操作时 已经做过处理.
ChartProvider chart = collection.getSelectedChartProvider();
ChartProvider chart = collection.getSelectedChart(ChartProvider.class);
chartTypeComBox.updateBean(chart);
}

2
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

@ -863,7 +863,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
// those that are interested in this event
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == SelectionListener.class) {
((SelectionListener) listeners[i + 1]).selectionChanged(new SelectionEvent(this));
((SelectionListener) listeners[i + 1]).selectionChanged(new SelectionEvent(ElementCasePane.this));
}
}
}

Loading…
Cancel
Save