Browse Source

Merge pull request #3021 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '8ec843fddfd5429c65c6faa74edca8bd927e53ab':
  CHART-17120 增加图表条件属性面板滑动条灵敏度
  REPORT-43864 单元格属性-自定义样式丢失,出现大量重复弹框
  REPORT-44583 部署集成-远程-设计器和服务器在一个电脑上,远程连接失败
research/11.0
superman 4 years ago
parent
commit
01e8042246
  1. 9
      designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
  2. 21
      designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  3. 11
      designer-base/src/main/java/com/fr/design/mainframe/App.java
  4. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java
  5. 10
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java
  6. 8
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java

9
designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java

@ -14,10 +14,10 @@ import javax.swing.BoxLayout;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import java.awt.Dimension;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map;
import java.awt.Dimension;
@Open @Open
public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> { public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
@ -69,7 +69,12 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
selectedItemScrollPane.setViewportView(selectedItemPane); selectedItemScrollPane.setViewportView(selectedItemPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
selectedItemScrollPane.setMinimumSize(new Dimension((int) selectedItemScrollPane.getPreferredSize().getWidth(), MIN_HEIGHT)); selectedItemScrollPane.setMinimumSize(new Dimension((int) selectedItemScrollPane.getPreferredSize().getWidth(), MIN_HEIGHT));
dealScrollPane(selectedItemScrollPane);
propertyChangePane.add(selectedItemScrollPane); propertyChangePane.add(selectedItemScrollPane);
}
protected void dealScrollPane(JScrollPane scrollPane){
} }
public void updateBean(T ob) { public void updateBean(T ob) {

21
designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -25,13 +25,19 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
private static final String HOST_NAME = "127.0.0.1"; private static final String HOST_NAME = "127.0.0.1";
private static final String LOCAL_HOTS_NAME = "localhost"; private static final String LOCAL_HOTS_NAME = "localhost";
private static final String QUOTATION = ":"; private static final String QUOTATION = ":";
private static final String PORT = Integer.toString(DesignerEnvManager.getEnvManager().getEmbedServerPort()); private static String port = Integer.toString(DesignerEnvManager.getEnvManager().getEmbedServerPort());
static { static {
FILTER_SET.add(HTTP + HOST_NAME + QUOTATION + PORT + PATH); initFilerSet(port);
FILTER_SET.add(HTTPS + HOST_NAME + QUOTATION + PORT + PATH); }
FILTER_SET.add(HTTP + LOCAL_HOTS_NAME + QUOTATION + PORT + PATH);
FILTER_SET.add(HTTPS + LOCAL_HOTS_NAME + QUOTATION + PORT + PATH); private static void initFilerSet(String newPort) {
FILTER_SET.clear();
FILTER_SET.add(HTTP + HOST_NAME + QUOTATION + newPort + PATH);
FILTER_SET.add(HTTPS + HOST_NAME + QUOTATION + newPort + PATH);
FILTER_SET.add(HTTP + LOCAL_HOTS_NAME + QUOTATION + newPort + PATH);
FILTER_SET.add(HTTPS + LOCAL_HOTS_NAME + QUOTATION + newPort + PATH);
port = newPort;
} }
private String name; private String name;
@ -164,6 +170,11 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
@Override @Override
public boolean checkValid() { public boolean checkValid() {
boolean result = false; boolean result = false;
String newPort = Integer.toString(DesignerEnvManager.getEnvManager().getEmbedServerPort());
if (!ComparatorUtils.equals(port, newPort)) {
// 使用过程中 更改了内置服务器端口 重新初始化下
initFilerSet(newPort);
}
if (FILTER_SET.contains(connection.getUrl())) { if (FILTER_SET.contains(connection.getUrl())) {
FineLoggerFactory.getLogger().error("url is same with local designer"); FineLoggerFactory.getLogger().error("url is same with local designer");
return result; return result;

11
designer-base/src/main/java/com/fr/design/mainframe/App.java

@ -41,4 +41,15 @@ public interface App<T extends BaseBook> extends Mutable, Aftermath {
* @return 报表 * @return 报表
*/ */
T asIOFile(FILE tplFile); T asIOFile(FILE tplFile);
/**
* 输出workbook等对象
* @param tplFile 文件
* @param needCheck 是否需要check
* @return
*/
default T asIOFile(FILE tplFile, boolean needCheck) {
return asIOFile(tplFile);
}
} }

2
designer-base/src/main/java/com/fr/design/mainframe/JTemplateFactory.java

@ -56,7 +56,7 @@ public final class JTemplateFactory {
String[] defaultAppExtensions = app.defaultExtensions(); String[] defaultAppExtensions = app.defaultExtensions();
for (String defaultAppExtension : defaultAppExtensions) { for (String defaultAppExtension : defaultAppExtensions) {
if (defaultAppExtension.equalsIgnoreCase(fileExtension)) { if (defaultAppExtension.equalsIgnoreCase(fileExtension)) {
BaseBook bb = app.asIOFile(file); BaseBook bb = app.asIOFile(file, false);
if (bb != null) { if (bb != null) {
return (T) bb; return (T) bb;
} }

10
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java

@ -15,9 +15,10 @@ import com.fr.log.FineLoggerFactory;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.util.Iterator;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension; import java.awt.Dimension;
import java.util.Iterator;
/** /**
* Created by IntelliJ IDEA. * Created by IntelliJ IDEA.
@ -27,6 +28,9 @@ import java.util.Iterator;
* Time : 上午9:16 * Time : 上午9:16
*/ */
public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAttr> { public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAttr> {
private static final int SCROLL_BAR_UNIT_INCREMENT = 16;
protected Plot plot; protected Plot plot;
public DataSeriesConditionPane(Plot plot) { public DataSeriesConditionPane(Plot plot) {
@ -43,6 +47,10 @@ public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAt
this(null); this(null);
} }
protected void dealScrollPane(JScrollPane scrollPane){
scrollPane.getVerticalScrollBar().setUnitIncrement(SCROLL_BAR_UNIT_INCREMENT);
}
private void initAvailableActionList() { private void initAvailableActionList() {
addBasicAction(); addBasicAction();
addAxisPositionAction(); addAxisPositionAction();

8
designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java

@ -42,7 +42,11 @@ class CptApp extends AbstractWorkBookApp {
@Override @Override
public WorkBook asIOFile(FILE file) { public WorkBook asIOFile(FILE file) {
return asIOFile(file, true);
}
@Override
public WorkBook asIOFile(FILE file, boolean needCheck) {
if (XMLEncryptUtils.isCptEncoded() && if (XMLEncryptUtils.isCptEncoded() &&
!XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) { !XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) {
if (!new DecodeDialog(file).isPwdRight()) { if (!new DecodeDialog(file).isPwdRight()) {
@ -67,7 +71,9 @@ class CptApp extends AbstractWorkBookApp {
} catch (Exception exp) { } catch (Exception exp) {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Report_NS_Exception_ReadError") + file, exp); FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Report_NS_Exception_ReadError") + file, exp);
} }
checkNameStyle(namestyle); if (needCheck) {
checkNameStyle(namestyle);
}
return tpl; return tpl;
} }

Loading…
Cancel
Save