Browse Source

Merge branch 'release/10.0' into final/10.0

# Conflicts:
#	designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java
final/10.0
jeo 5 years ago
parent
commit
e54eb9283a
  1. 89
      designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java
  2. 1
      designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java
  3. 38
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  4. 29
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  5. 28
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java
  6. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java
  7. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java
  8. 9
      designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java
  9. 8
      designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java
  10. 11
      designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java
  11. 14
      designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java
  12. 57
      designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java
  13. 29
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  14. 3
      designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java
  15. 10
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractPreviewProvider.java
  16. 25
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java
  17. 2
      designer-base/src/main/java/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java
  18. 36
      designer-base/src/main/java/com/fr/design/gui/ibutton/ModeButtonGroup.java
  19. 11
      designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java
  20. 13
      designer-base/src/main/java/com/fr/design/gui/ispinner/UIBasicSpinner.java
  21. 5
      designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java
  22. 3
      designer-base/src/main/java/com/fr/design/locale/impl/UserInfoMark.java
  23. 6
      designer-base/src/main/java/com/fr/design/locale/impl/VideoMark.java
  24. 4
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  25. 18
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  26. 45
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java
  27. 5
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java
  28. 3
      designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java
  29. 3
      designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java
  30. 7
      designer-base/src/main/java/com/fr/design/present/DictPresentPane.java
  31. 8
      designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java
  32. 8
      designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java
  33. 28
      designer-base/src/main/java/com/fr/design/remote/action/RemoteDesignAuthManagerAction.java
  34. 58
      designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java
  35. 36
      designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java
  36. 5
      designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java
  37. 1
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java
  38. 100
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  39. 27
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java
  40. 9
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java
  41. 24
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java
  42. 5
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java
  43. 5
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java
  44. 1
      designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java
  45. 35
      designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java
  46. 3
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  47. 36
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java
  48. 4
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java
  49. 3
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java
  50. 4
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
  51. 44
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java
  52. 3
      designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java
  53. 3
      designer-realize/src/main/java/com/fr/design/condition/WHPane.java
  54. 16
      designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java
  55. 13
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java
  56. 1
      designer-realize/src/main/java/com/fr/design/present/PresentPane.java
  57. 9
      designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java
  58. 9
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java
  59. 42
      designer-realize/src/main/java/com/fr/design/widget/ui/mobile/ScanCodeMobilePane.java
  60. 9
      designer-realize/src/main/java/com/fr/grid/GridUI.java
  61. 8
      designer-realize/src/main/java/com/fr/start/common/SplashWindow.java

89
designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java

@ -7,7 +7,14 @@ package com.fr.design;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.common.annotations.Open; import com.fr.common.annotations.Open;
import com.fr.design.data.datapane.TableDataNameObjectCreator; import com.fr.design.data.datapane.TableDataNameObjectCreator;
import com.fr.design.fun.*; import com.fr.design.fun.CellWidgetOptionProvider;
import com.fr.design.fun.FormWidgetOptionProvider;
import com.fr.design.fun.MobileWidgetStyleProvider;
import com.fr.design.fun.ParameterWidgetOptionProvider;
import com.fr.design.fun.PreviewProvider;
import com.fr.design.fun.ServerTableDataDefineProvider;
import com.fr.design.fun.TableDataDefineProvider;
import com.fr.design.fun.ToolbarItemProvider;
import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.core.WidgetOptionFactory; import com.fr.design.gui.core.WidgetOptionFactory;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
@ -24,6 +31,7 @@ import com.fr.stable.Filter;
import com.fr.stable.plugin.ExtraDesignClassManagerProvider; import com.fr.stable.plugin.ExtraDesignClassManagerProvider;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
@ -127,21 +135,25 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement
} }
public WidgetOption[] getWebWidgetOptions(Set<ToolbarItemProvider> set, Filter<ToolbarItemProvider> filter) { public WidgetOption[] getWebWidgetOptions(Set<ToolbarItemProvider> set, Filter<ToolbarItemProvider> filter) {
if (set == null || set.isEmpty()) { return new DesignExtraBridge<WidgetOption, ToolbarItemProvider>() {
return new WidgetOption[0];
} @Override
List<WidgetOption> list = new ArrayList<>(); WidgetOption createT(ToolbarItemProvider provider) {
for (ToolbarItemProvider provider : set) { return WidgetOptionFactory.createByWidgetClass(
if (filter != null && filter.accept(provider)) {
WidgetOption option = WidgetOptionFactory.createByWidgetClass(
provider.nameForWidget(), provider.nameForWidget(),
IOUtils.readIcon(provider.iconPathForWidget()), IOUtils.readIcon(provider.iconPathForWidget()),
provider.classForWidget() provider.classForWidget()
); );
list.add(option);
} }
}
return list.toArray(new WidgetOption[list.size()]); @Override
WidgetOption[] toArray(Collection<?> sCollection) {
if (sCollection == null) {
return new WidgetOption[0];
}
return sCollection.toArray(new WidgetOption[sCollection.size()]);
}
}.filterSAndTransformT(set, filter);
} }
@ -224,8 +236,8 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement
return new MobileWidgetStyleProvider[0]; return new MobileWidgetStyleProvider[0];
} }
List<MobileWidgetStyleProvider> providers = new ArrayList<>(); List<MobileWidgetStyleProvider> providers = new ArrayList<>();
for (MobileWidgetStyleProvider provider: set) { for (MobileWidgetStyleProvider provider : set) {
if(ComparatorUtils.equalsIgnoreCase(provider.xTypeForWidget(), xType)) { if (ComparatorUtils.equalsIgnoreCase(provider.xTypeForWidget(), xType)) {
providers.add(provider); providers.add(provider);
} }
} }
@ -256,4 +268,55 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement
return Collections.unmodifiableSet(shortCuts); return Collections.unmodifiableSet(shortCuts);
} }
public PreviewProvider[] getTemplatePreviews(Filter<PreviewProvider> filter) {
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING);
return new DesignExtraBridge<PreviewProvider, PreviewProvider>() {
@Override
PreviewProvider createT(PreviewProvider previewProvider) {
return previewProvider;
}
@Override
PreviewProvider[] toArray(Collection<?> sCollection) {
if (sCollection == null) {
return new PreviewProvider[0];
}
return sCollection.toArray(new PreviewProvider[sCollection.size()]);
}
}.filterSAndTransformT(set, filter);
}
/**
* 抽了一个可能用到的公用逻辑出来通过filter过滤接口实现Set<s>并将对外接口实例转成内部实例S转成T,比如ToolItemProvider转成WidgetOption,当然也可以不转
*
* @param <T> 你想要得到的类型可以跟S相同
* @param <S> 待转换的目标类型
*/
abstract class DesignExtraBridge<T, S> {
T[] filterSAndTransformT(Set<S> set, Filter<S> filter) {
if (set == null || set.isEmpty()) {
return toArray(set);
}
List<T> list = new ArrayList<>();
for (S provider : set) {
if (filter == null || filter.accept(provider)) {
list.add(createT(provider));
}
}
return toArray(list);
}
/**
* S转T
* @param s
* @return
*/
abstract T createT(S s);
abstract T[] toArray(Collection<?> sCollection);
}
} }

1
designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java

@ -64,6 +64,7 @@ public class TableDataSourceAction extends TemplateComponentAction<JTemplate<?,
* 撤销 * 撤销
*/ */
public void prepare4Undo() { public void prepare4Undo() {
//do nothing
} }
/** /**

38
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -1,7 +1,5 @@
package com.fr.design.actions.file; package com.fr.design.actions.file;
import com.fr.cluster.ClusterBridge;
import com.fr.cluster.engine.base.FineClusterConfig;
import com.fr.config.Configuration; import com.fr.config.Configuration;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -47,10 +45,36 @@ import com.fr.workspace.WorkContext;
import com.fr.workspace.server.vcs.VcsOperator; import com.fr.workspace.server.vcs.VcsOperator;
import com.fr.workspace.server.vcs.git.config.GcConfig; import com.fr.workspace.server.vcs.git.config.GcConfig;
import javax.swing.*; import javax.swing.BorderFactory;
import javax.swing.event.*; import javax.swing.BoxLayout;
import java.awt.*; import javax.swing.JDialog;
import java.awt.event.*; import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import javax.swing.Timer;
import javax.swing.UIManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File; import java.io.File;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.Locale; import java.util.Locale;
@ -663,7 +687,7 @@ public class PreferencePane extends BasicPane {
defaultStringToFormulaBox.setSelected(false); defaultStringToFormulaBox.setSelected(false);
} }
VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager(); VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager();
if (FineClusterConfig.getInstance().isCluster()) { if (WorkContext.getCurrent().isCluster()) {
vcsEnableCheckBox.setEnabled(false); vcsEnableCheckBox.setEnabled(false);
gcEnableCheckBox.setEnabled(false); gcEnableCheckBox.setEnabled(false);
} }

29
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -20,7 +20,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataFactory;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.gui.iprogressbar.AutoProgressBar;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
@ -73,7 +73,7 @@ public abstract class DesignTableDataManager {
*/ */
private static java.util.Map<String, TableDataWrapper> globalDsCache = new java.util.HashMap<String, TableDataWrapper>(); private static java.util.Map<String, TableDataWrapper> globalDsCache = new java.util.HashMap<String, TableDataWrapper>();
private static java.util.Map<String, String> dsNameChangedMap = new HashMap<String, String>(); private static java.util.Map<String, String> dsNameChangedMap = new HashMap<String, String>();
// private static List<ChangeListener> dsListeners = new ArrayList<ChangeListener>(); private static List<ChangeListener> globalDsListeners = new ArrayList<>();
private static Map<String, List<ChangeListener>> dsListenersMap = new HashMap<String, List<ChangeListener>>(); private static Map<String, List<ChangeListener>> dsListenersMap = new HashMap<String, List<ChangeListener>>();
@ -95,15 +95,19 @@ public abstract class DesignTableDataManager {
* 响应数据集改变. * 响应数据集改变.
*/ */
private static void fireDsChanged() { private static void fireDsChanged() {
fireDsChanged(globalDsListeners);
for (Entry<String, List<ChangeListener>> listenerEntry : dsListenersMap.entrySet()) { for (Entry<String, List<ChangeListener>> listenerEntry : dsListenersMap.entrySet()) {
List<ChangeListener> dsListeners = listenerEntry.getValue(); List<ChangeListener> dsListeners = listenerEntry.getValue();
for (int i = 0; i < dsListeners.size(); i++) { fireDsChanged(dsListeners);
//增强for循环用的iterator实现的, 如果中间哪个listener修改或删除了(如ChartEditPane.dsChangeListener), }
// 由于dsListeners是arraylist, 此时会ConcurrentModifyException }
// for (ChangeListener l : dsListeners) {
ChangeEvent e = null; private static void fireDsChanged(List<ChangeListener> dsListeners) {
dsListeners.get(i).stateChanged(e); for (int i = 0; i < dsListeners.size(); i++) {
} //增强for循环用的iterator实现的, 如果中间哪个listener修改或删除了(如ChartEditPane.dsChangeListener),
// 由于dsListeners是arraylist, 此时会ConcurrentModifyException
ChangeEvent e = null;
dsListeners.get(i).stateChanged(e);
} }
} }
@ -160,13 +164,17 @@ public abstract class DesignTableDataManager {
} }
} }
public static void addGlobalDsChangeListener(ChangeListener l) {
globalDsListeners.add(l);
}
/** /**
* 添加模板数据集改变 监听事件. * 添加模板数据集改变 监听事件.
* *
* @param l ChangeListener监听器 * @param l ChangeListener监听器
*/ */
public static void addDsChangeListener(ChangeListener l) { public static void addDsChangeListener(ChangeListener l) {
JTemplate<?, ?> template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
String key = StringUtils.EMPTY; String key = StringUtils.EMPTY;
if (template != null) { if (template != null) {
key = template.getPath(); key = template.getPath();
@ -178,7 +186,6 @@ public abstract class DesignTableDataManager {
} }
dsListeners.add(l); dsListeners.add(l);
} }
/** /**
* 获取数据源source中dsName的所有字段 * 获取数据源source中dsName的所有字段
* *

28
designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java

@ -34,6 +34,7 @@ public class TableDataComboBox extends UIComboBox implements Prepare4DataSourceC
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private boolean refresModel = false; private boolean refresModel = false;
private String treeName; //树数据集本身的名字 private String treeName; //树数据集本身的名字
private ChangeListener changeListener;
public TableDataComboBox(TableDataSource source){ public TableDataComboBox(TableDataSource source){
this(source,StringUtils.EMPTY); this(source,StringUtils.EMPTY);
@ -136,15 +137,22 @@ public class TableDataComboBox extends UIComboBox implements Prepare4DataSourceC
} }
} }
/** /**
*注册listener,相应数据集改变 *注册listener,相应数据集改变
*/ */
public void registerDSChangeListener() { @Override
DesignTableDataManager.addDsChangeListener(new ChangeListener() { public void registerDSChangeListener() {
public void stateChanged(ChangeEvent e) { changeListener = new ChangeListener() {
TableDataComboBox.this.refresh(DesignTableDataManager.getEditingTableDataSource()); @Override
} public void stateChanged(ChangeEvent e) {
}); TableDataComboBox.this.refresh(DesignTableDataManager.getEditingTableDataSource());
} }
};
DesignTableDataManager.addDsChangeListener(changeListener);
}
public void registerGlobalDSChangeListener() {
DesignTableDataManager.addGlobalDsChangeListener(changeListener);
}
} }

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java

@ -64,7 +64,7 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{
// 行号显示 // 行号显示
TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0); TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0);
tableColumn.setCellRenderer(new CellRenderer()); tableColumn.setCellRenderer(new CellRenderer());
tableColumn.setMaxWidth(30); tableColumn.setMaxWidth(dataJTable.getColumnCount());
// 控制按钮 // 控制按钮
add = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add")); add = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add"));

2
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java

@ -220,7 +220,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane<EmbeddedTableDa
// 行号显示,每次dateJTable的表结构发生变化时都要调用 // 行号显示,每次dateJTable的表结构发生变化时都要调用
TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0); TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0);
tableColumn.setCellRenderer(new CellRenderer()); tableColumn.setCellRenderer(new CellRenderer());
tableColumn.setMaxWidth(30); tableColumn.setMaxWidth(dataJTable.getColumnCount());
} }
private class DoubleRenderer extends DefaultTableCellRenderer { private class DoubleRenderer extends DefaultTableCellRenderer {

9
designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java

@ -5,6 +5,7 @@ package com.fr.design.designer.creator;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import com.fr.stable.core.PropertyChangeListener;
import java.beans.IntrospectionException; import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
@ -17,7 +18,7 @@ public final class CRPropertyDescriptor extends PropertyDescriptor {
public static final String RENDERER = "renderer"; public static final String RENDERER = "renderer";
private boolean isSubProperty = false; private boolean isSubProperty = false;
private PropertyChangeAdapter l; private PropertyChangeListener l;
public CRPropertyDescriptor(String name, Class<?> beanClass) throws IntrospectionException { public CRPropertyDescriptor(String name, Class<?> beanClass) throws IntrospectionException {
super(name, beanClass); super(name, beanClass);
@ -35,6 +36,12 @@ public final class CRPropertyDescriptor extends PropertyDescriptor {
return this; return this;
} }
public CRPropertyDescriptor setPropertyChangeListener(PropertyChangeListener l) {
this.l = l;
return this;
}
@Deprecated
public CRPropertyDescriptor setPropertyChangeListener(PropertyChangeAdapter l) { public CRPropertyDescriptor setPropertyChangeListener(PropertyChangeAdapter l) {
this.l = l; this.l = l;
return this; return this;

8
designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java vendored

@ -1,5 +1,6 @@
package com.fr.design.env; package com.fr.design.env;
import com.fr.cluster.engine.base.FineClusterConfig;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.stable.AssistUtils; import com.fr.stable.AssistUtils;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
@ -66,7 +67,12 @@ public class RemoteWorkspace implements Workspace {
} }
return isRoot; return isRoot;
} }
@Override
public boolean isCluster() {
return FineClusterConfig.getInstance().isCluster();
}
@Override @Override
public WorkspaceConnection getConnection() { public WorkspaceConnection getConnection() {

11
designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java

@ -13,6 +13,7 @@ import com.fr.workspace.WorkContext;
import com.fr.workspace.server.authority.AuthorityOperator; import com.fr.workspace.server.authority.AuthorityOperator;
import com.fr.workspace.server.authority.decision.DecisionOperator; import com.fr.workspace.server.authority.decision.DecisionOperator;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.ArrayList; import java.util.ArrayList;
public class NodeAuthProcessor { public class NodeAuthProcessor {
@ -41,9 +42,15 @@ public class NodeAuthProcessor {
if (!WorkContext.getCurrent().isLocal()) { if (!WorkContext.getCurrent().isLocal()) {
try { try {
String userName = WorkContext.getCurrent().getConnection().getUserName(); String userName = WorkContext.getCurrent().getConnection().getUserName();
String userId = WorkContext.getCurrent().get(DecisionOperator.class).getUserIdByName(userName); DesignAuthority[] authorities = null;
try {
String userId = WorkContext.getCurrent().get(DecisionOperator.class).getUserIdByName(userName);
authorities = WorkContext.getCurrent().get(AuthorityOperator.class).getAuthorities(userId);
} catch(UndeclaredThrowableException e) {
// 兼容旧版本的服务器
authorities = WorkContext.getCurrent().get(AuthorityOperator.class).getAuthorities();
}
// 远程设计获取设计成员的权限列表 // 远程设计获取设计成员的权限列表
DesignAuthority[] authorities = WorkContext.getCurrent().get(AuthorityOperator.class).getAuthorities(userId);
DesignAuthority authority = null; DesignAuthority authority = null;
if (authorities != null) { if (authorities != null) {

14
designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java

@ -44,6 +44,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Objects;
import static javax.swing.JOptionPane.WARNING_MESSAGE; import static javax.swing.JOptionPane.WARNING_MESSAGE;
import static javax.swing.JOptionPane.YES_NO_OPTION; import static javax.swing.JOptionPane.YES_NO_OPTION;
@ -299,7 +300,18 @@ public class TemplateTreePane extends JPanel implements FileOperations {
} }
} }
} }
reportletsTree.refresh(); refreshAfterDelete();
}
private void refreshAfterDelete() {
TreePath[] paths = reportletsTree.getSelectionPaths();
if (paths == null) {
reportletsTree.refresh();
} else {
for (TreePath path : Objects.requireNonNull(reportletsTree.getSelectionPaths())) {
reportletsTree.refreshParent(path);
}
}
} }
private boolean deleteNodes(Collection<ExpandMutableTreeNode> nodes) { private boolean deleteNodes(Collection<ExpandMutableTreeNode> nodes) {

57
designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java

@ -0,0 +1,57 @@
package com.fr.design.formula;
import com.fr.stable.StringUtils;
/**
* @author Joe
* @version 10.0
* Created by Joe on 10/30/2019
*/
public enum FormulaConstants {
PAGE_NUMBER("$$page_number", "Page_Number"),
TOTAL_PAGE_NUMBER("$$totalPage_number", "Total_Page_Number"),
FINE_USERNAME("$fine_username", "Fine_Username"),
FINE_ROLE("$fine_role", "Fine_Role"),
FINE_POSITION("$fine_position", "Fine_Position"),
NULL("NULL", "Null"),
NOFILTER("NOFILTER", "No_Filter"),
REPORT_NAME("reportName", "Report_Name"),
FORMLET_NAME("formletName", "Formlet_Name"),
SERVLET_URL("servletURL", "Servlet_URL"),
SERVER_SCHEMA("serverSchema", "Server_Schema"),
SERVER_NAME("serverName", "Server_Name"),
SERVER_PORT("serverPort", "Server_Port"),
SERVER_URL("serverURL", "Server_URL"),
CONTEXT_PATH("contextPath", "Context_Path"),
SESSION_ID("sessionID", "SessionID");
private String key;
private String value;
private static final String KEY_PREFIX = "Fine-Design_CurReport_Variable_";
private FormulaConstants(String key, String value) {
this.key = key;
this.value = KEY_PREFIX + value;
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
public static String getValueByKey(String key) {
for (FormulaConstants formulaConstant : values()) {
if (formulaConstant.getKey().equals(key)) {
return formulaConstant.getValue();
}
}
return StringUtils.EMPTY;
}
}

29
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -19,6 +19,7 @@ import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.parser.FRLexer; import com.fr.parser.FRLexer;
import com.fr.parser.FRParser; import com.fr.parser.FRParser;
@ -779,31 +780,31 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
private void initVariablesTreeSelectionListener() { private void initVariablesTreeSelectionListener() {
variablesTree.addTreeSelectionListener(new TreeSelectionListener() { variablesTree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) { public void valueChanged(TreeSelectionEvent e) {
Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject(); DefaultMutableTreeNode selectedTreeNode = (DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent();
Object selectedValue = selectedTreeNode.getUserObject();
Object selectedParentValue = ((DefaultMutableTreeNode)selectedTreeNode.getParent()).getUserObject();
if (selectedValue == null) { if (selectedValue == null) {
return; return;
} }
StringBuilder desBuf = new StringBuilder();
try { if (selectedValue instanceof TextUserObject) {
String path; //有公式说明的条件:1.属于TextUserObject 2.parent是系统参数
Locale locale = FRContext.getLocale(); if (ComparatorUtils.equals(((TextFolderUserObject) selectedParentValue).getText(),
if (locale.equals(Locale.CHINA)) { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Variables"))) {
path = "/com/fr/design/insert/formula/variable/cn/"; descriptionTextArea.setText(com.fr.design.i18n.Toolkit.i18nText(FormulaConstants.getValueByKey(((TextUserObject) selectedValue).getText())));
} else { } else {
path = "/com/fr/design/insert/formula/variable/en/"; descriptionTextArea.setText(StringUtils.EMPTY);
} }
if (selectedValue instanceof TextUserObject) { } else if (selectedValue instanceof TextFolderUserObject) {
desBuf = getText((TextUserObject) selectedValue, path); descriptionTextArea.setText(StringUtils.EMPTY);
}
} catch (IOException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} }
descriptionTextArea.setText(desBuf.toString());
descriptionTextArea.moveCaretPosition(0); descriptionTextArea.moveCaretPosition(0);
} }
}); });
} }
private void initVariablesTree() { private void initVariablesTree() {
// vairable. // vairable.
variablesTree = new JTree(); variablesTree = new JTree();

3
designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java

@ -1,6 +1,7 @@
package com.fr.design.fun; package com.fr.design.fun;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.stable.Filter;
import com.fr.stable.fun.mark.Mutable; import com.fr.stable.fun.mark.Mutable;
import java.util.Map; import java.util.Map;
@ -11,7 +12,7 @@ import java.util.Map;
* @since 8.0 * @since 8.0
* 自定义预览方式接口 * 自定义预览方式接口
*/ */
public interface PreviewProvider extends Mutable { public interface PreviewProvider extends Mutable, Filter<JTemplate> {
String MARK_STRING = "PreviewProvider"; String MARK_STRING = "PreviewProvider";

10
designer-base/src/main/java/com/fr/design/fun/impl/AbstractPreviewProvider.java

@ -1,7 +1,9 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.PreviewProvider; import com.fr.design.fun.PreviewProvider;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.JVirtualTemplate;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.web.ParameterConstants; import com.fr.general.web.ParameterConstants;
import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.impl.AbstractProvider;
@ -52,4 +54,12 @@ public abstract class AbstractPreviewProvider extends AbstractProvider implement
public String getActionType() { public String getActionType() {
return ParameterConstants.VIEWLET; return ParameterConstants.VIEWLET;
} }
@Override
public boolean accept(JTemplate jTemplate) {
if (jTemplate == null) {
jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
}
return jTemplate == null || jTemplate.isJWorkBook() || jTemplate instanceof JVirtualTemplate;
}
} }

25
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -9,18 +9,9 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.border.EmptyBorder;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Cursor; import java.awt.Cursor;
@ -34,6 +25,14 @@ import java.awt.Point;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.Toolkit; import java.awt.Toolkit;
import java.awt.Window; import java.awt.Window;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.border.EmptyBorder;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
@ -72,7 +71,6 @@ abstract class UIControlPane extends JControlPane {
this.creators = this.createNameableCreators(); this.creators = this.createNameableCreators();
initCardPane(); initCardPane();
if (isNewStyle()) { if (isNewStyle()) {
getPopupEditDialog(cardPane); getPopupEditDialog(cardPane);
this.add(getLeftPane(), BorderLayout.CENTER); this.add(getLeftPane(), BorderLayout.CENTER);
@ -148,9 +146,7 @@ abstract class UIControlPane extends JControlPane {
topToolBar.setLayout(new BorderLayout()); topToolBar.setLayout(new BorderLayout());
ShortCut addItem = shortCutFactory.addItemShortCut().getShortCut(); ShortCut addItem = shortCutFactory.addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar); addItem.intoJToolBar(topToolBar);
JPanel leftTopPane = getLeftTopPane(topToolBar); JPanel leftTopPane = getLeftTopPane(topToolBar);
leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0)); leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0));
leftPane.add(leftTopPane, BorderLayout.NORTH); leftPane.add(leftTopPane, BorderLayout.NORTH);
@ -171,7 +167,6 @@ abstract class UIControlPane extends JControlPane {
JPanel leftTopPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel leftTopPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
leftTopPane.add(toolBarPane, BorderLayout.EAST); leftTopPane.add(toolBarPane, BorderLayout.EAST);
leftTopPane.add(addItemLabel, BorderLayout.CENTER); leftTopPane.add(addItemLabel, BorderLayout.CENTER);
return leftTopPane; return leftTopPane;
} }
@ -202,7 +197,6 @@ abstract class UIControlPane extends JControlPane {
topToolBar.validate(); topToolBar.validate();
this.controlUpdatePane = createControlUpdatePane();//REPORT-4841 刷新一下编辑面板 this.controlUpdatePane = createControlUpdatePane();//REPORT-4841 刷新一下编辑面板
cardPane.add(controlUpdatePane, "EDIT"); cardPane.add(controlUpdatePane, "EDIT");
this.repaint(); this.repaint();
} }
@ -248,7 +242,6 @@ abstract class UIControlPane extends JControlPane {
return; return;
} }
} }
// 要隐藏 先检查有没有非法输入 // 要隐藏 先检查有没有非法输入
// 非法输入检查放在最后,因为可能出现面板弹出新弹框而失去焦点的情况,比如 输入公式时,弹出公式编辑对话框 // 非法输入检查放在最后,因为可能出现面板弹出新弹框而失去焦点的情况,比如 输入公式时,弹出公式编辑对话框
try { try {
@ -268,6 +261,8 @@ abstract class UIControlPane extends JControlPane {
addWindowFocusListener(new WindowAdapter() { addWindowFocusListener(new WindowAdapter() {
@Override @Override
public void windowLostFocus(WindowEvent e) { public void windowLostFocus(WindowEvent e) {
//在Linux上拉回焦点,不然导致一些面板关不掉
requestFocus();
hideDialog(); hideDialog();
} }
}); });

2
designer-base/src/main/java/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java

@ -65,7 +65,7 @@ public abstract class AbstractAttrNoScrollPane extends BasicPane {
} }
protected void initListener(Container parentComponent) { public void initListener(Container parentComponent) {
for (int i = 0; i < parentComponent.getComponentCount(); i++) { for (int i = 0; i < parentComponent.getComponentCount(); i++) {
Component tmpComp = parentComponent.getComponent(i); Component tmpComp = parentComponent.getComponent(i);

36
designer-base/src/main/java/com/fr/design/gui/ibutton/ModeButtonGroup.java

@ -0,0 +1,36 @@
package com.fr.design.gui.ibutton;
import javax.swing.*;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 互斥的按钮
* @author hades
* @version 10.0
* Created by hades on 2019/11/12
*/
public class ModeButtonGroup<T> extends ButtonGroup {
private Map<T, AbstractButton> buttonMap = new LinkedHashMap<>();
public void put(T t, AbstractButton button) {
add(button);
buttonMap.put(t, button);
}
public void setSelectButton(T t) {
buttonMap.get(t).setSelected(true);
}
public T getCurrentSelected() {
for (Map.Entry<T, AbstractButton> entry : buttonMap.entrySet()) {
if (entry.getValue().isSelected()) {
return entry.getKey();
}
}
return buttonMap.entrySet().iterator().next().getKey();
}
}

11
designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java

@ -23,6 +23,8 @@ import java.awt.FlowLayout;
import java.awt.FontMetrics; import java.awt.FontMetrics;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
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;
@ -141,8 +143,15 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam
attributeChange(); attributeChange();
} }
}); });
this.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
attributeChange();
}
});
} }
}; editor.setEditable(false); };
editor.setEditable(false);
editor.setPreferredSize(new Dimension(110, 20)); editor.setPreferredSize(new Dimension(110, 20));
addPopupListener(editor); addPopupListener(editor);

13
designer-base/src/main/java/com/fr/design/gui/ispinner/UIBasicSpinner.java

@ -7,6 +7,9 @@ import javax.swing.*;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import java.awt.*; import java.awt.*;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.text.ParseException;
/** /**
* Created by IntelliJ IDEA. * Created by IntelliJ IDEA.
@ -56,7 +59,17 @@ public class UIBasicSpinner extends JSpinner implements UIObserver {
} }
}); });
} }
final JFormattedTextField textField = ((JSpinner.DefaultEditor) this.getEditor()).getTextField();
textField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
try {
textField.commitEdit();
} catch (ParseException ignore) {
}
}
});
} }

5
designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java

@ -145,6 +145,11 @@ public abstract class RefreshableJTree extends CheckBoxTree {
refresh((ExpandMutableTreeNode) this.getModel().getRoot(), StringUtils.EMPTY); refresh((ExpandMutableTreeNode) this.getModel().getRoot(), StringUtils.EMPTY);
} }
//REPORT-24085,只刷新父节点
public void refreshParent(TreePath path) {
refresh((ExpandMutableTreeNode) path.getParentPath().getLastPathComponent(), StringUtils.EMPTY);
}
public void refreshChildByName(String childName) { public void refreshChildByName(String childName) {
refresh((ExpandMutableTreeNode) this.getModel().getRoot(), childName); refresh((ExpandMutableTreeNode) this.getModel().getRoot(), childName);
} }

3
designer-base/src/main/java/com/fr/design/locale/impl/UserInfoMark.java

@ -19,10 +19,11 @@ public class UserInfoMark implements LocaleMark<String> {
private static final String EN_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.en"); private static final String EN_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.en");
private static final String TW_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.tw"); private static final String TW_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.tw");
private static final String JP_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.jp"); private static final String JP_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.jp");
private static final String KR_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.kr");
public UserInfoMark() { public UserInfoMark() {
map.put(Locale.CHINA, CN_LOGIN_HTML); map.put(Locale.CHINA, CN_LOGIN_HTML);
map.put(Locale.KOREA, EN_LOGIN_HTML); map.put(Locale.KOREA, KR_LOGIN_HTML);
map.put(Locale.JAPAN, JP_LOGIN_HTML); map.put(Locale.JAPAN, JP_LOGIN_HTML);
map.put(Locale.US, EN_LOGIN_HTML); map.put(Locale.US, EN_LOGIN_HTML);
map.put(Locale.TAIWAN, TW_LOGIN_HTML); map.put(Locale.TAIWAN, TW_LOGIN_HTML);

6
designer-base/src/main/java/com/fr/design/locale/impl/VideoMark.java

@ -15,9 +15,9 @@ import java.util.Map;
public class VideoMark implements LocaleMark<String> { public class VideoMark implements LocaleMark<String> {
private Map<Locale, String> map = new HashMap<>(); private Map<Locale, String> map = new HashMap<>();
private static final String VIDEO_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.video.en"); private static final String VIDEO_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.video.en_US");
private static final String VIDEO_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.video"); private static final String VIDEO_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.video.zh_CN");
private static final String VIDEO_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.video.tw"); private static final String VIDEO_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.video.zh_TW");
public VideoMark() { public VideoMark() {
map.put(Locale.CHINA, VIDEO_CN); map.put(Locale.CHINA, VIDEO_CN);

4
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -3,8 +3,6 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.cluster.ClusterBridge;
import com.fr.cluster.engine.base.FineClusterConfig;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -369,7 +367,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
private void fireVcsActionChange() { private void fireVcsActionChange() {
if (!DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() if (!DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable()
|| VcsHelper.getInstance().isUnSelectedTemplate() || VcsHelper.getInstance().isUnSelectedTemplate()
|| FineClusterConfig.getInstance().isCluster()) { || WorkContext.getCurrent().isCluster()) {
setEnabled(false); setEnabled(false);
return; return;
} }

18
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -4,7 +4,6 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.extension.FileExtension;
import com.fr.base.io.BaseBook; import com.fr.base.io.BaseBook;
import com.fr.base.iofile.attr.DesignBanCopyAttrMark; import com.fr.base.iofile.attr.DesignBanCopyAttrMark;
import com.fr.base.iofile.attr.TemplateIdAttrMark; import com.fr.base.iofile.attr.TemplateIdAttrMark;
@ -27,8 +26,8 @@ import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.TemplateTreePane; import com.fr.design.file.TemplateTreePane;
import com.fr.design.fun.DesignerFrameUpButtonProvider; import com.fr.design.fun.DesignerFrameUpButtonProvider;
import com.fr.design.fun.MenuHandler; import com.fr.design.fun.MenuHandler;
import com.fr.design.fun.ReportSupportedFileUIProvider;
import com.fr.design.fun.PreviewProvider; import com.fr.design.fun.PreviewProvider;
import com.fr.design.fun.ReportSupportedFileUIProvider;
import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -50,7 +49,6 @@ import com.fr.design.write.submit.DBManipulationPane;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FILEChooserPane; import com.fr.file.FILEChooserPane;
import com.fr.file.MemFILE; import com.fr.file.MemFILE;
import com.fr.file.filter.ChooseFileFilter;
import com.fr.form.ui.NoneWidget; import com.fr.form.ui.NoneWidget;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -58,6 +56,7 @@ import com.fr.log.FineLoggerFactory;
import com.fr.report.cell.Elem; import com.fr.report.cell.Elem;
import com.fr.report.cell.cellattr.CellImage; import com.fr.report.cell.cellattr.CellImage;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Filter;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.core.UUID; import com.fr.stable.core.UUID;
@ -628,7 +627,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
} }
} }
protected void addChooseFILEFilter(FILEChooserPane fileChooser){ protected void addChooseFILEFilter(FILEChooserPane fileChooser) {
} }
@ -651,13 +650,13 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
return result; return result;
} }
protected boolean saveToNewFile(String oldName){ protected boolean saveToNewFile(String oldName) {
boolean result = false; boolean result = false;
Set<ReportSupportedFileUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ReportSupportedFileUIProvider.XML_TAG); Set<ReportSupportedFileUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ReportSupportedFileUIProvider.XML_TAG);
for (ReportSupportedFileUIProvider provider : providers) { for (ReportSupportedFileUIProvider provider : providers) {
result = result || provider.saveToNewFile(this.editingFILE.getPath(), this); result = result || provider.saveToNewFile(this.editingFILE.getPath(), this);
} }
if(!result){ if (!result) {
result = result || this.saveFile(); result = result || this.saveFile();
//更换最近打开 //更换最近打开
DesignerEnvManager.getEnvManager().replaceRecentOpenedFilePath(oldName, this.getPath()); DesignerEnvManager.getEnvManager().replaceRecentOpenedFilePath(oldName, this.getPath());
@ -1154,7 +1153,12 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
* @return 预览模式 * @return 预览模式
*/ */
public PreviewProvider[] supportPreview() { public PreviewProvider[] supportPreview() {
return new PreviewProvider[0]; return ExtraDesignClassManager.getInstance().getTemplatePreviews(new Filter<PreviewProvider>() {
@Override
public boolean accept(PreviewProvider previewProvider) {
return previewProvider.accept(JTemplate.this);
}
});
} }
/** /**

45
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java

@ -5,10 +5,12 @@ import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.widget.UITitleSplitLine; import com.fr.design.mainframe.widget.UITitleSplitLine;
import com.fr.design.mainframe.widget.preview.MobileTemplatePreviewPane; import com.fr.design.mainframe.widget.preview.MobileTemplatePreviewPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.general.FRFont; import com.fr.general.FRFont;
@ -20,21 +22,14 @@ import javax.swing.ButtonGroup;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.BorderLayout; import java.awt.*;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Stroke;
public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
private UIRadioButton gapFix; private UIRadioButton gapFix;
private UIRadioButton titleWidthFix; private UIRadioButton titleWidthFix;
private LinePane bottomBorderPane; private LinePane bottomBorderPane;
private LinePane underLinePane; private LinePane underLinePane;
private UISpinner minTabWidth;
public UpMenuStyleDefinePane(WCardTagLayout tagLayout) { public UpMenuStyleDefinePane(WCardTagLayout tagLayout) {
super(tagLayout); super(tagLayout);
@ -44,6 +39,10 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
JPanel panel = super.createCenterPane(); JPanel panel = super.createCenterPane();
UILabel displayGap = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Display_Gap")); UILabel displayGap = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Display_Gap"));
displayGap.setPreferredSize(new Dimension(55, 20)); displayGap.setPreferredSize(new Dimension(55, 20));
UILabel tabWidthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Tab_Min_Width"));
tabWidthLabel.setPreferredSize(new Dimension(75, 20));
minTabWidth = new UISpinner(0, Integer.MAX_VALUE, 1, 92);
JPanel tabWidthPanel = UIComponentUtils.wrapWithBorderLayoutPane(minTabWidth);
gapFix = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Gap_Fix")); gapFix = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Gap_Fix"));
titleWidthFix = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Title_Width_Fix")); titleWidthFix = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Title_Width_Fix"));
ButtonGroup buttonGroup = new ButtonGroup(); ButtonGroup buttonGroup = new ButtonGroup();
@ -52,29 +51,33 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
gapFix.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); gapFix.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
titleWidthFix.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); titleWidthFix.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
buttonGroup.add(titleWidthFix); buttonGroup.add(titleWidthFix);
JPanel flowLeft = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
flowLeft.add(gapFix);
flowLeft.add(titleWidthFix);
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{displayGap, flowLeft}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20));
centerPane.setPreferredSize(new Dimension(500, 20));
final JPanel wrapTabWidthPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tabWidthLabel, tabWidthPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
wrapTabWidthPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20));
wrapTabWidthPanel.setPreferredSize(new Dimension(200, 20));
gapFix.addChangeListener(new ChangeListener() { gapFix.addChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
updatePreviewPane(); updatePreviewPane();
wrapTabWidthPanel.setVisible(titleWidthFix.isSelected());
} }
}); });
titleWidthFix.addChangeListener(new ChangeListener() { titleWidthFix.addChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
updatePreviewPane(); updatePreviewPane();
wrapTabWidthPanel.setVisible(titleWidthFix.isSelected());
} }
}); });
JPanel outerPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10);
outerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 5, 20));
JPanel flowLeft = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); outerPane.add(centerPane);
flowLeft.add(gapFix); outerPane.add(wrapTabWidthPanel);
flowLeft.add(titleWidthFix);
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{displayGap, flowLeft}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20));
centerPane.setPreferredSize(new Dimension(500, 20));
JPanel outerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
outerPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 15, 0));
outerPane.add(centerPane, BorderLayout.CENTER);
panel.add(outerPane); panel.add(outerPane);
return panel; return panel;
} }
@ -125,6 +128,7 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
UpMenuStyle style = (UpMenuStyle) ob; UpMenuStyle style = (UpMenuStyle) ob;
gapFix.setSelected(style.isGapFix()); gapFix.setSelected(style.isGapFix());
titleWidthFix.setSelected(style.isTitleWidthFix()); titleWidthFix.setSelected(style.isTitleWidthFix());
minTabWidth.setValueWithoutEvent(style.getMinTabWidth());
bottomBorderPane.populate(style.getBottomBorder()); bottomBorderPane.populate(style.getBottomBorder());
underLinePane.populate(style.getUnderline()); underLinePane.populate(style.getUnderline());
} }
@ -140,6 +144,7 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
UpMenuStyle style = new UpMenuStyle(); UpMenuStyle style = new UpMenuStyle();
style.setGapFix(gapFix.isSelected()); style.setGapFix(gapFix.isSelected());
style.setTitleWidthFix(titleWidthFix.isSelected()); style.setTitleWidthFix(titleWidthFix.isSelected());
style.setMinTabWidth((int) minTabWidth.getValue());
style.setBottomBorder(bottomBorderPane.update()); style.setBottomBorder(bottomBorderPane.update());
style.setUnderline(underLinePane.update()); style.setUnderline(underLinePane.update());
return style; return style;

5
designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java

@ -1,7 +1,5 @@
package com.fr.design.mainframe.vcs.common; package com.fr.design.mainframe.vcs.common;
import com.fr.cluster.ClusterBridge;
import com.fr.cluster.engine.base.FineClusterConfig;
import com.fr.concurrent.NamedThreadFactory; import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
@ -27,7 +25,6 @@ import com.fr.workspace.server.vcs.git.config.GcConfig;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import java.awt.Color; import java.awt.Color;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
@ -174,7 +171,7 @@ public class VcsHelper implements JTemplateActionListener {
public void templateSaved(JTemplate<?, ?> jt) { public void templateSaved(JTemplate<?, ?> jt) {
if (needInit() if (needInit()
&& DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() && DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable()
&& !FineClusterConfig.getInstance().isCluster()) { && !WorkContext.getCurrent().isCluster()) {
fireVcs(jt); fireVcs(jt);
} }
} }

3
designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java

@ -21,13 +21,12 @@ public class DemoAction implements OSBasedAction {
} }
String executorPath; String executorPath;
if (OperatingSystem.isMacos()) { if (OperatingSystem.isMacos()) {
executorPath = StableUtils.pathJoin(installHome, "bin", "designer.app"); executorPath = StableUtils.pathJoin(installHome, "bin", "designer.app");
} else if(OperatingSystem.isWindows()){ } else if(OperatingSystem.isWindows()){
executorPath = StableUtils.pathJoin(installHome, "bin", "designer.exe demo"); executorPath = StableUtils.pathJoin(installHome, "bin", "designer.exe demo");
}else{ }else{
executorPath = StableUtils.pathJoin(installHome, "bin", "designer.sh demo"); executorPath = StableUtils.pathJoin(installHome, "bin", "designer demo");
} }
if (OperatingSystem.isMacos()) { if (OperatingSystem.isMacos()) {

3
designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java

@ -65,8 +65,7 @@ public class RestartAction implements OSBasedAction {
private static void restartInLinux(String installHome, String[] filesToBeDelete) throws Exception { private static void restartInLinux(String installHome, String[] filesToBeDelete) throws Exception {
ProcessBuilder builder = new ProcessBuilder(); ProcessBuilder builder = new ProcessBuilder();
List<String> commands = new ArrayList<String>(); List<String> commands = new ArrayList<String>();
//现在先写的是restart.sh commands.add(installHome + File.separator + "bin" + File.separator + "restart");
commands.add(installHome + File.separator + "bin" + File.separator + "restart.sh");
if (ArrayUtils.isNotEmpty(filesToBeDelete)) { if (ArrayUtils.isNotEmpty(filesToBeDelete)) {
commands.add(StableUtils.join(filesToBeDelete, "+")); commands.add(StableUtils.join(filesToBeDelete, "+"));
} }

7
designer-base/src/main/java/com/fr/design/present/DictPresentPane.java

@ -5,6 +5,7 @@ import java.awt.event.ItemListener;
import com.fr.base.present.DictPresent; import com.fr.base.present.DictPresent;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.present.dict.DictionaryPane; import com.fr.design.present.dict.DictionaryPane;
@ -13,7 +14,7 @@ import com.fr.design.present.dict.DictionaryPane;
* @author zhou * @author zhou
* @since 2012-5-31上午10:54:20 * @since 2012-5-31上午10:54:20
*/ */
public class DictPresentPane extends FurtherBasicBeanPane<DictPresent> { public class DictPresentPane extends FurtherBasicBeanPane<DictPresent> implements Prepare4DataSourceChange {
private DictionaryPane dictionaryPane; private DictionaryPane dictionaryPane;
public DictPresentPane() { public DictPresentPane() {
@ -50,4 +51,8 @@ public class DictPresentPane extends FurtherBasicBeanPane<DictPresent> {
dictionaryPane.reset(); dictionaryPane.reset();
} }
@Override
public void registerDSChangeListener() {
dictionaryPane.registerDSChangeListener();
}
} }

8
designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java

@ -5,6 +5,7 @@ import com.fr.data.impl.DynamicSQLDict;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -20,7 +21,7 @@ import java.util.List;
* @author zhou * @author zhou
* @since 2012-5-31下午12:20:41 * @since 2012-5-31下午12:20:41
*/ */
public class DictionaryPane extends UIComboBoxPane<Dictionary> implements DataCreatorUI { public class DictionaryPane extends UIComboBoxPane<Dictionary> implements DataCreatorUI, Prepare4DataSourceChange {
private TableDataDictPane tableDataDictPane; private TableDataDictPane tableDataDictPane;
@Override @Override
@ -77,4 +78,9 @@ public class DictionaryPane extends UIComboBoxPane<Dictionary> implements DataCr
paneList.add(new FormulaDictPane()); paneList.add(new FormulaDictPane());
return paneList; return paneList;
} }
@Override
public void registerDSChangeListener() {
tableDataDictPane.registerDSChangeListener();
}
} }

8
designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java

@ -16,6 +16,7 @@ import com.fr.design.data.datapane.TableDataComboBox;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.data.datapane.preview.PreviewLabel; import com.fr.design.data.datapane.preview.PreviewLabel;
import com.fr.design.data.datapane.preview.PreviewLabel.Previewable; import com.fr.design.data.datapane.preview.PreviewLabel.Previewable;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper;
import com.fr.design.editor.DoubleDeckValueEditorPane; import com.fr.design.editor.DoubleDeckValueEditorPane;
@ -48,7 +49,7 @@ import java.util.List;
* @editor zhou * @editor zhou
* @since 2012-3-29下午1:49:24 * @since 2012-3-29下午1:49:24
*/ */
public class TableDataDictPane extends FurtherBasicBeanPane<TableDataDictionary> implements Previewable, UIObserver { public class TableDataDictPane extends FurtherBasicBeanPane<TableDataDictionary> implements Previewable, UIObserver, Prepare4DataSourceChange {
private static final int BEGIN = 1; private static final int BEGIN = 1;
private static final int END = 10; private static final int END = 10;
private static final int VGAP = 24; private static final int VGAP = 24;
@ -368,4 +369,9 @@ public class TableDataDictPane extends FurtherBasicBeanPane<TableDataDictionary>
public boolean shouldResponseChangeListener() { public boolean shouldResponseChangeListener() {
return true; return true;
} }
@Override
public void registerDSChangeListener() {
tableDataNameComboBox.registerGlobalDSChangeListener();
}
} }

28
designer-base/src/main/java/com/fr/design/remote/action/RemoteDesignAuthManagerAction.java

@ -9,11 +9,14 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.remote.ui.AuthorityManagerPane; import com.fr.design.remote.ui.AuthorityManagerPane;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.report.DesignAuthority; import com.fr.report.DesignAuthority;
import com.fr.report.constant.RoleType;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import com.fr.workspace.server.authority.AuthorityOperator; import com.fr.workspace.server.authority.AuthorityOperator;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.List;
/** /**
* @author yaohwu * @author yaohwu
@ -38,13 +41,24 @@ public class RemoteDesignAuthManagerAction extends UpdateAction {
if (!WorkContext.getCurrent().isLocal()) { if (!WorkContext.getCurrent().isLocal()) {
try { try {
// 远程设计获取全部设计成员的权限列表 // 远程设计获取全部设计成员的权限列表
DesignAuthority[] userAuthorities = WorkContext.getCurrent().get(AuthorityOperator.class).getUserAuthorities(); DesignAuthority[] authorities = WorkContext.getCurrent().get(AuthorityOperator.class).getAuthorities();
DesignAuthority[] customAuthorities = WorkContext.getCurrent().get(AuthorityOperator.class).getCustomRoleAuthorities(); List<DesignAuthority> userAuthorities = new ArrayList<DesignAuthority>();
if (userAuthorities != null && userAuthorities.length != 0) { List<DesignAuthority> customAuthorities = new ArrayList<DesignAuthority>();
managerPane.populateByUser(userAuthorities); if (authorities != null) {
} for (DesignAuthority authority : authorities) {
if (customAuthorities != null && customAuthorities.length != 0) { if (authority.getRoleType() == RoleType.CUSTOM) {
managerPane.populateByCustom(customAuthorities); customAuthorities.add(authority);
}
else {
userAuthorities.add(authority);
}
}
if (userAuthorities.size() != 0) {
managerPane.populateByUser(userAuthorities.toArray(new DesignAuthority[userAuthorities.size()]));
}
if (customAuthorities.size() != 0) {
managerPane.populateByCustom(customAuthorities.toArray(new DesignAuthority[customAuthorities.size()]));
}
} }
} catch (Exception exception) { } catch (Exception exception) {
FineLoggerFactory.getLogger().error(exception.getMessage(), exception); FineLoggerFactory.getLogger().error(exception.getMessage(), exception);

58
designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java

@ -142,13 +142,13 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
*/ */
private static final UILabel B = new UILabel("B"); private static final UILabel B = new UILabel("B");
private static final int H_MAX = 365; private static final int H_MAX = 360;
private static final int S_MAX = 100; private static final int S_MAX = 100;
private static final int L_MAX = 100; private static final int B_MAX = 100;
private static final float HSPINNER_VALUE = 360f; private static final float HSPINNER_VALUE = 360f;
private static final float SSPINNER_VALUE = 100f; private static final float SSPINNER_VALUE = 100f;
private static final float LSPINNER_VALUE = 100f; private static final float BSPINNER_VALUE = 100f;
private static final int BINARY_FOR_EIGHT = 255; private static final int BINARY_FOR_EIGHT = 255;
private static final int BINARY_FOR_FOUR = 16; private static final int BINARY_FOR_FOUR = 16;
@ -321,7 +321,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
internalChange = true; internalChange = true;
sSpinner.setValue(new Integer((int) (s * S_MAX))); sSpinner.setValue(new Integer((int) (s * S_MAX)));
internalChange = false; internalChange = false;
bSpinner.setValue(new Integer((int) (b * L_MAX))); bSpinner.setValue(new Integer((int) (b * B_MAX)));
revalidate(); revalidate();
} }
@ -338,7 +338,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
internalChange = true; internalChange = true;
hSpinner.setValue(new Integer((int) (h * H_MAX))); hSpinner.setValue(new Integer((int) (h * H_MAX)));
internalChange = false; internalChange = false;
bSpinner.setValue(new Integer((int) (b * L_MAX))); bSpinner.setValue(new Integer((int) (b * B_MAX)));
revalidate(); revalidate();
} }
@ -431,7 +431,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
} }
/** /**
* hsl 监听 * hsb 监听
*/ */
class ImageScrollListener implements ChangeListener { class ImageScrollListener implements ChangeListener {
/** /**
@ -506,7 +506,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
null); null);
internalChange = true; internalChange = true;
adjustHSLValue(hsbVals); adjustHSBValue(hsbVals);
internalChange = false; internalChange = false;
@ -521,11 +521,11 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
updateHexFields(); updateHexFields();
} }
private void adjustHSLValue(float[] hsbVals) { private void adjustHSBValue(float[] hsbVals) {
if (!spinnerTrigger) { if (!spinnerTrigger) {
hSpinner.setValue(new Integer((int) (hsbVals[0] * HSPINNER_VALUE))); hSpinner.setValue(new Integer((int) (hsbVals[0] * HSPINNER_VALUE)));
sSpinner.setValue(new Integer((int) (hsbVals[1] * SSPINNER_VALUE))); sSpinner.setValue(new Integer((int) (hsbVals[1] * SSPINNER_VALUE)));
bSpinner.setValue(new Integer((int) (hsbVals[2] * LSPINNER_VALUE))); bSpinner.setValue(new Integer((int) (hsbVals[2] * BSPINNER_VALUE)));
} }
switch (locked) { switch (locked) {
case HLOCKED: case HLOCKED:
@ -536,7 +536,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
gradientPoint.x = (int) ((1 gradientPoint.x = (int) ((1
- ((Number) sSpinner.getValue()).intValue() / SSPINNER_VALUE) * IMG_WIDTH); - ((Number) sSpinner.getValue()).intValue() / SSPINNER_VALUE) * IMG_WIDTH);
gradientPoint.y = (int) ((1 gradientPoint.y = (int) ((1
- ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE) * IMG_HEIGHT); - ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE) * IMG_HEIGHT);
} }
break; break;
case SLOCKED: case SLOCKED:
@ -546,7 +546,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
if (!handlingMouse) { if (!handlingMouse) {
gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / HSPINNER_VALUE * IMG_WIDTH); gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / HSPINNER_VALUE * IMG_WIDTH);
gradientPoint.y = (int) ((1 gradientPoint.y = (int) ((1
- ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE) * IMG_HEIGHT); - ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE) * IMG_HEIGHT);
} }
break; break;
case BLOCKED: case BLOCKED:
@ -565,7 +565,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
private void updateImageAndTrack() { private void updateImageAndTrack() {
float h = ((Number) hSpinner.getValue()).intValue() / HSPINNER_VALUE; float h = ((Number) hSpinner.getValue()).intValue() / HSPINNER_VALUE;
float s = ((Number) sSpinner.getValue()).intValue() / SSPINNER_VALUE; float s = ((Number) sSpinner.getValue()).intValue() / SSPINNER_VALUE;
float b = ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE; float b = ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE;
spinnerTrigger = true; spinnerTrigger = true;
getColorSelectionModel().setSelectedColor(new Color(Color.HSBtoRGB(h, s, b))); getColorSelectionModel().setSelectedColor(new Color(Color.HSBtoRGB(h, s, b)));
@ -691,11 +691,11 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
container.add(label); container.add(label);
container.add(mainPanel); container.add(mainPanel);
// hsl和rgb面板 // hsb和rgb面板
JPanel hslAndRgbPanel = new JPanel(); JPanel hsbAndRgbPanel = new JPanel();
hslAndRgbPanel.setLayout(new BorderLayout(0, 16)); hsbAndRgbPanel.setLayout(new BorderLayout(0, 16));
hslAndRgbPanel.add(initialHSLPanel(), BorderLayout.CENTER); hsbAndRgbPanel.add(initialHSBPanel(), BorderLayout.CENTER);
hslAndRgbPanel.add(initialRGBPanel(), BorderLayout.SOUTH); hsbAndRgbPanel.add(initialRGBPanel(), BorderLayout.SOUTH);
// 十六进制面板 // 十六进制面板
JPanel hexPanel = new JPanel(); JPanel hexPanel = new JPanel();
@ -703,7 +703,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
hexPanel.add(new UILabel("#")); hexPanel.add(new UILabel("#"));
hexPanel.add(field); hexPanel.add(field);
mainPanel.add(hslAndRgbPanel, BorderLayout.CENTER); mainPanel.add(hsbAndRgbPanel, BorderLayout.CENTER);
mainPanel.add(hexPanel, BorderLayout.SOUTH); mainPanel.add(hexPanel, BorderLayout.SOUTH);
JPanel rightPane = new JPanel(new BorderLayout()); JPanel rightPane = new JPanel(new BorderLayout());
@ -719,11 +719,11 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
return container; return container;
} }
//初始化HSL部分 //初始化HSB部分
private JPanel initialHSLPanel() { private JPanel initialHSBPanel() {
hRadio = new UIRadioButton("H"); hRadio = new UIRadioButton("H");
sRadio = new UIRadioButton("S"); sRadio = new UIRadioButton("S");
bRadio = new UIRadioButton("L"); bRadio = new UIRadioButton("B");
ButtonGroup group = new ButtonGroup(); ButtonGroup group = new ButtonGroup();
group.add(hRadio); group.add(hRadio);
group.add(sRadio); group.add(sRadio);
@ -748,27 +748,27 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
sSpinner.addChangeListener(scroll); sSpinner.addChangeListener(scroll);
bSpinner.addChangeListener(scroll); bSpinner.addChangeListener(scroll);
JPanel hslPanel = new JPanel(); JPanel hsbPanel = new JPanel();
hslPanel.setLayout(new GridLayout(3, 0, 0, 5)); hsbPanel.setLayout(new GridLayout(3, 0, 0, 5));
JPanel hPanel = new JPanel(); JPanel hPanel = new JPanel();
hPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0)); hPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0));
hPanel.add(hRadio); hPanel.add(hRadio);
hPanel.add(hSpinner); hPanel.add(hSpinner);
hslPanel.add(hPanel); hsbPanel.add(hPanel);
JPanel sPanel = new JPanel(); JPanel sPanel = new JPanel();
sPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0)); sPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0));
sPanel.add(sRadio); sPanel.add(sRadio);
sPanel.add(sSpinner); sPanel.add(sSpinner);
hslPanel.add(sPanel); hsbPanel.add(sPanel);
JPanel lPanel = new JPanel(); JPanel lPanel = new JPanel();
lPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0)); lPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0));
lPanel.add(bRadio); lPanel.add(bRadio);
lPanel.add(bSpinner); lPanel.add(bSpinner);
hslPanel.add(lPanel); hsbPanel.add(lPanel);
return hslPanel; return hsbPanel;
} }
private JPanel initialRGBPanel() { private JPanel initialRGBPanel() {
@ -856,7 +856,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
*/ */
private void updateBLockImage() { private void updateBLockImage() {
int[] pix = new int[IMG_WIDTH * IMG_HEIGHT]; int[] pix = new int[IMG_WIDTH * IMG_HEIGHT];
float bValue = ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE; float bValue = ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE;
int index = 0; int index = 0;
for (int j = 0; j < IMG_HEIGHT; j++) { for (int j = 0; j < IMG_HEIGHT; j++) {
@ -1028,7 +1028,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
int[] trackPix = new int[TRACK_WIDTH * IMG_HEIGHT]; int[] trackPix = new int[TRACK_WIDTH * IMG_HEIGHT];
float hValue = ((Number) hSpinner.getValue()).intValue() / HSPINNER_VALUE; float hValue = ((Number) hSpinner.getValue()).intValue() / HSPINNER_VALUE;
float bValue = ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE; float bValue = ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE;
int trackIndex = 0; int trackIndex = 0;
for (int j = 0; j < IMG_HEIGHT; j++) { for (int j = 0; j < IMG_HEIGHT; j++) {

36
designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java

@ -0,0 +1,36 @@
package com.fr.design.utils.gui;
import com.fr.stable.os.OperatingSystem;
import java.awt.*;
/**
* @author hades
* @version 10.0
* Created by hades on 2019/10/29
*/
public enum FineDesignScreen {
/**
* 一个临界dpi
* 设计器(windows/linux)大于等于该dpi界面ui变得很小 (jdk bug 在jdk9修复: http://openjdk.java.net/jeps/263)
*/
DPI_144(144);
private int value;
FineDesignScreen(int value) {
this.value = value;
}
/**
* 判断win/linux下的dpi macos不做处理
* @return
*/
public static boolean isHighDPI() {
if (OperatingSystem.isMacos()) {
return false;
}
return Toolkit.getDefaultToolkit().getScreenResolution() >= DPI_144.value;
}
}

5
designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java

@ -9,7 +9,6 @@ import com.fr.design.gui.core.WidgetOption;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.JVirtualTemplate; import com.fr.design.mainframe.JVirtualTemplate;
import com.fr.general.ModuleContext; import com.fr.general.ModuleContext;
import com.fr.log.FineLoggerFactory;
import com.fr.report.restriction.CellCountRestriction; import com.fr.report.restriction.CellCountRestriction;
import com.fr.report.restriction.ReportRestrictionScene; import com.fr.report.restriction.ReportRestrictionScene;
import com.fr.restriction.Restrictions; import com.fr.restriction.Restrictions;
@ -62,9 +61,11 @@ public class ExtraDesignClassManagerTest extends TestCase {
return toolbarItemProvider.accept(jTemplate); return toolbarItemProvider.accept(jTemplate);
} }
}); });
WidgetOption[] widgetOptions1 = ExtraDesignClassManager.getInstance().getWebWidgetOptions(set, null);
Assert.assertEquals(1, widgetOptions.length); Assert.assertEquals(1, widgetOptions.length);
Assert.assertEquals(2, widgetOptions1.length);
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); Assert.fail(e.getMessage());
} }
} }
} }

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

@ -133,6 +133,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4
@Deprecated @Deprecated
public void reLayout(Chart currentChart) { public void reLayout(Chart currentChart) {
//do nothing
} }
/** /**

100
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.designer.style.label; package com.fr.van.chart.designer.style.label;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chartx.TwoTuple;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
@ -11,6 +12,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.style.color.ColorSelectBox; import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.attr.plot.VanChartLabelPositionPlot; import com.fr.plugin.chart.attr.plot.VanChartLabelPositionPlot;
import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrLabelDetail;
import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipContent;
@ -47,11 +49,16 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
protected ColorSelectBox backgroundColor; protected ColorSelectBox backgroundColor;
private JPanel tractionLinePane; private JPanel tractionLinePane;
private JPanel positionPane;
private Integer[] oldPositionValues;
protected VanChartStylePane parent; protected VanChartStylePane parent;
private Plot plot;
public VanChartPlotLabelDetailPane(Plot plot, VanChartStylePane parent) { public VanChartPlotLabelDetailPane(Plot plot, VanChartStylePane parent) {
this.parent = parent; this.parent = parent;
this.plot = plot;
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
initToolTipContentPane(plot); initToolTipContentPane(plot);
JPanel contentPane = createLabelPane(plot); JPanel contentPane = createLabelPane(plot);
@ -105,42 +112,85 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel); return TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel);
} }
protected JPanel createLabelPositionPane(double[] row, double[] col, Plot plot) { private TwoTuple<String[], Integer[]> getPositionNamesAndValues() {
if(plot instanceof VanChartLabelPositionPlot){ if (plot instanceof VanChartLabelPositionPlot) {
String[] names = ((VanChartLabelPositionPlot) plot).getLabelLocationNameArray(); String[] names = ((VanChartLabelPositionPlot) plot).getLabelLocationNameArray();
Integer[] values = ((VanChartLabelPositionPlot) plot).getLabelLocationValueArray(); Integer[] values = ((VanChartLabelPositionPlot) plot).getLabelLocationValueArray();
if(names == null || names.length == 0){ if (names == null || names.length == 0) {
return new JPanel(); return null;
} }
if(values == null || values.length == 0){ if (values == null || values.length == 0) {
return new JPanel(); return null;
} }
position = new UIButtonGroup<Integer>(names, values); return new TwoTuple<>(names, values);
autoAdjust = new UIButtonGroup<Boolean>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_On"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false}); }
return null;
}
private JPanel createLabelPositionPane(double[] row, double[] col, Plot plot) {
Component[][] comps = new Component[2][2]; if (getPositionNamesAndValues() == null) {
return new JPanel();
}
comps[0] = new Component[]{null,null}; autoAdjust = new UIButtonGroup<Boolean>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_On"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false});
comps[1] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), SwingConstants.LEFT), position};
JPanel panel =new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.add(getLabelPositionPane(comps,row,col),BorderLayout.CENTER);
if(plot.isSupportLeadLine()){ positionPane = new JPanel();
tractionLine = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Show_Guideline")); checkPositionPane();
tractionLinePane = TableLayout4VanChartHelper.createGapTableLayoutPane("",tractionLine); panel.add(positionPane, BorderLayout.CENTER);
panel.add(tractionLinePane, BorderLayout.SOUTH);
initPositionListener();
} else if(PlotFactory.plotAutoAdjustLabelPosition(plot)){ if (plot.isSupportLeadLine()) {
panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Auto_Adjust"),autoAdjust), BorderLayout.SOUTH); tractionLine = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Show_Guideline"));
} tractionLinePane = TableLayout4VanChartHelper.createGapTableLayoutPane("", tractionLine);
return panel; panel.add(tractionLinePane, BorderLayout.SOUTH);
initPositionListener();
} else if (PlotFactory.plotAutoAdjustLabelPosition(plot)) {
panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Auto_Adjust"), autoAdjust), BorderLayout.SOUTH);
}
return panel;
}
private void checkPositionPane() {
if (positionPane == null) {
return;
}
TwoTuple<String[], Integer[]> result = getPositionNamesAndValues();
if (result == null) {
return;
}
Integer[] values = result.getSecond();
if (ComparatorUtils.equals(values, oldPositionValues)) {
return;
}
oldPositionValues = values;
position = new UIButtonGroup<Integer>(result.getFirst(), values);
Component[][] comps = new Component[2][2];
comps[0] = new Component[]{null, null};
comps[1] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), SwingConstants.LEFT), position};
double[] row = new double[]{TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED};
double[] col = new double[]{TableLayout.FILL, TableLayout4VanChartHelper.EDIT_AREA_WIDTH};
positionPane.removeAll();
positionPane.setLayout(new BorderLayout());
positionPane.add(getLabelPositionPane(comps, row, col), BorderLayout.CENTER);
if (parent != null) {
parent.initListener(positionPane);
} }
return new JPanel();
} }
protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){ protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){
JPanel panel = TableLayoutHelper.createTableLayoutPane(comps,row,col); JPanel panel = TableLayoutHelper.createTableLayoutPane(comps,row,col);
return createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Attr_Layout"), panel); return createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Attr_Layout"), panel);
@ -228,6 +278,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
} }
public void populate(AttrLabelDetail detail) { public void populate(AttrLabelDetail detail) {
checkPositionPane();
dataLabelContentPane.populateBean(detail.getContent()); dataLabelContentPane.populateBean(detail.getContent());
if(position != null){ if(position != null){
position.setSelectedItem(detail.getPosition()); position.setSelectedItem(detail.getPosition());

27
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -3,6 +3,8 @@ package com.fr.van.chart.map.designer.type;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.decision.webservice.v10.map.WMSFactory; import com.fr.decision.webservice.v10.map.WMSFactory;
import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
@ -15,10 +17,12 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.plugin.chart.base.GisLayer; import com.fr.plugin.chart.base.GisLayer;
import com.fr.plugin.chart.base.ViewCenter; import com.fr.plugin.chart.base.ViewCenter;
@ -34,6 +38,7 @@ import com.fr.plugin.chart.type.ZoomLevel;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.drillmap.designer.data.comp.MapDataTree; import com.fr.van.chart.drillmap.designer.data.comp.MapDataTree;
import com.fr.workspace.WorkContext;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
@ -223,17 +228,33 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
sourceTitleLabel = createSourceTitleLabel(); sourceTitleLabel = createSourceTitleLabel();
boolean hasRefreshButton = !WorkContext.getCurrent().isLocal();
UIButton button = new UIButton(IOUtils.readIcon("/com/fr/design/images/control/refresh.png"));
button.setToolTipText(Toolkit.i18nText("Fine-Design_Chart_Update_Remote_Map_JSON"));
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
GEOJSONHelper.reset();
GEOJSONHelper.getInstance();
}
});
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {d, e};
double[] rowSize = {p, p}; double[] rowSize = {p, p};
double[] columnSize = hasRefreshButton ? new double[]{d + 10, e - 20, 20} : new double[]{d, e};
Component[] comps = hasRefreshButton ? new Component[]{sourceTitleLabel, sourceComboBox, button} : new Component[]{sourceTitleLabel, sourceComboBox};
double hGap = hasRefreshButton ? 0 : TableLayout4VanChartHelper.COMPONENT_INTERVAL;
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null,null}, new Component[]{null,null},
new Component[]{sourceTitleLabel,sourceComboBox}, comps,
}; };
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize, columnSize); return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, hGap, LayoutConstants.VGAP_LARGE);
} }
private JPanel createGISLayerPane() { private JPanel createGISLayerPane() {

9
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java

@ -38,7 +38,7 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
public HoverPainter getPainter() { public HoverPainter getPainter() {
return painter; return painter;
} }
/** /**
* 是否能在指定位置添加组件 * 是否能在指定位置添加组件
* @param creator 组件 * @param creator 组件
@ -240,7 +240,8 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
updateCreatorBackBound(); updateCreatorBackBound();
LayoutUtils.layoutRootContainer(container); LayoutUtils.layoutRootContainer(container);
}else{ }else{
fixAbsolute(creator, x, y); //添加到其父组件布局中的时候,要用其父组件布局添加
container.getLayoutAdapter().addBean(creator, x, y);
if (creator.shouldScaleCreator() || creator.hasTitleStyle()) { if (creator.shouldScaleCreator() || creator.hasTitleStyle()) {
addParentCreator(creator); addParentCreator(creator);
} else { } else {
@ -303,7 +304,7 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
XWAbsoluteLayout layout = (XWAbsoluteLayout) container; XWAbsoluteLayout layout = (XWAbsoluteLayout) container;
layout.updateBoundsWidget(creator); layout.updateBoundsWidget(creator);
} }
/** /**
* 调整组件大小到合适尺寸位置 * 调整组件大小到合适尺寸位置
* @param creator 组件 * @param creator 组件
@ -338,4 +339,4 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
XWAbsoluteLayout xwAbsoluteLayout = (XWAbsoluteLayout) container; XWAbsoluteLayout xwAbsoluteLayout = (XWAbsoluteLayout) container;
return new FRAbsoluteLayoutPropertiesGroupModel(xwAbsoluteLayout); return new FRAbsoluteLayoutPropertiesGroupModel(xwAbsoluteLayout);
} }
} }

24
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java

@ -593,26 +593,26 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter {
switch (position) { switch (position) {
case COMP_TOP: case COMP_TOP:
dim.width = maxWidth; dim.width = maxWidth;
dim.height = maxHeight / 2; dim.height = maxHeight / 2 - actualVal / 2;
finalY = yL + dim.height; finalY = yL + dim.height + actualVal;
finalH = maxHeight - dim.height; finalH = maxHeight - dim.height - actualVal;
break; break;
case COMP_BOTTOM: case COMP_BOTTOM:
dim.height = maxHeight / 2; dim.height = maxHeight / 2 - actualVal / 2;
dim.width = maxWidth; dim.width = maxWidth;
finalH = maxHeight - dim.height; finalH = maxHeight - dim.height - actualVal;
yL = yL + finalH; yL = yL + finalH + actualVal;
break; break;
case COMP_LEFT: case COMP_LEFT:
dim.width = maxWidth / 2; dim.width = maxWidth / 2 - actualVal / 2;
dim.height = maxHeight; dim.height = maxHeight;
finalX = xL + dim.width; finalX = xL + dim.width + actualVal;
finalW = maxWidth - dim.width; finalW = maxWidth - dim.width - actualVal;
break; break;
default: default:
finalW = maxWidth / 2; finalW = maxWidth / 2 - actualVal / 2;
xL = xL + finalW; xL = xL + finalW + actualVal;
dim.width = maxWidth - finalW; dim.width = maxWidth - finalW - actualVal;
dim.height = maxHeight; dim.height = maxHeight;
} }
if (isCalculateChildPos) { if (isCalculateChildPos) {

5
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

@ -10,6 +10,7 @@ import com.fr.design.designer.beans.painters.FRFitLayoutPainter;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.cardlayout.XWCardLayout; import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
@ -151,7 +152,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
//布局控件要先判断是不是可编辑 //布局控件要先判断是不是可编辑
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout(); XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout();
if (topLayout != null && !isMatchEdge && !topLayout.isEditable()) { if (topLayout != null && !isMatchEdge && !topLayout.isEditable() && !topLayout.acceptType(XWAbsoluteLayout.class)) {
return false; return false;
} }
@ -1222,4 +1223,4 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
public ConstraintsGroupModel getLayoutConstraints(XCreator creator) { public ConstraintsGroupModel getLayoutConstraints(XCreator creator) {
return new FRFitLayoutConstraints((XWFitLayout) container, creator); return new FRFitLayoutConstraints((XWFitLayout) container, creator);
} }
} }

5
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java

@ -72,7 +72,8 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter {
XWTabFitLayout tabLayout = (XWTabFitLayout) backUpContainer; XWTabFitLayout tabLayout = (XWTabFitLayout) backUpContainer;
y = adjustY(y, tabLayout); y = adjustY(y, tabLayout);
} }
addComp(creator, x, y); //这时候应该要用计算后的父fit布局添加
this.container.getLayoutAdapter().addBean(creator, x, y);
((XWidgetCreator) creator).recalculateChildrenSize(); ((XWidgetCreator) creator).recalculateChildrenSize();
return true; return true;
} }
@ -100,4 +101,4 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter {
return ComponentUtils.getRelativeBounds(mainLayout); return ComponentUtils.getRelativeBounds(mainLayout);
} }
} }

1
designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java

@ -98,6 +98,7 @@ public class EventPropertyTable extends UIListControlPane {
Widget widget = creator.toData(); Widget widget = creator.toData();
refreshNameableCreator(EventCreator.createEventCreator(widget.supportedEvents(), WidgetEventListenerUpdatePane.class)); refreshNameableCreator(EventCreator.createEventCreator(widget.supportedEvents(), WidgetEventListenerUpdatePane.class));
populateNameObjects();
} }
public void populateNameObjects() { public void populateNameObjects() {

35
designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java

@ -12,14 +12,11 @@ import java.awt.Rectangle;
import java.awt.Toolkit; import java.awt.Toolkit;
import java.awt.event.AWTEventListener; import java.awt.event.AWTEventListener;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JWindow; import javax.swing.JWindow;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.designer.beans.location.Location;
import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOption;
import com.fr.stable.OperatingSystem; import com.fr.stable.os.OperatingSystem;
//august: //august:
public class FormWidgetPopWindow extends JWindow { public class FormWidgetPopWindow extends JWindow {
@ -52,24 +49,28 @@ public class FormWidgetPopWindow extends JWindow {
if (event instanceof MouseEvent) { if (event instanceof MouseEvent) {
MouseEvent mv = (MouseEvent) event; MouseEvent mv = (MouseEvent) event;
if (mv.getClickCount() > 0) { if (mv.getClickCount() > 0) {
Point point = new Point((int) (mv.getLocationOnScreen().getX()), (int) mv.getLocationOnScreen().getY()); hideWindow(mv);
if (OperatingSystem.isWindows()) {
if(!FormWidgetPopWindow.this.contains(point)) {
FormWidgetPopWindow.this.setVisible(false);
}
} else if (OperatingSystem.isMacOS()) {
Dimension d = FormWidgetPopWindow.this.getSize();
Point p = FormWidgetPopWindow.this.getLocation();
Rectangle rect = new Rectangle(p, d);
if (!rect.contains(point)) {
FormWidgetPopWindow.this.setVisible(false);
}
}
} }
} }
} }
}; };
private void hideWindow(MouseEvent mv){
Point point = new Point((int) (mv.getLocationOnScreen().getX()), (int) mv.getLocationOnScreen().getY());
if (OperatingSystem.isWindows()) {
if (!FormWidgetPopWindow.this.contains(point)) {
FormWidgetPopWindow.this.setVisible(false);
}
}else if(OperatingSystem.isMacos() || OperatingSystem.isLinux()){
Dimension d = FormWidgetPopWindow.this.getSize();
Point p = FormWidgetPopWindow.this.getLocation();
Rectangle rect = new Rectangle(p, d);
if (!rect.contains(point)) {
FormWidgetPopWindow.this.setVisible(false);
}
}
}
private class EditorChoosePane extends JPanel { private class EditorChoosePane extends JPanel {
public EditorChoosePane() { public EditorChoosePane() {
super(); super();

3
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -937,7 +937,8 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
*/ */
@Override @Override
public PreviewProvider[] supportPreview() { public PreviewProvider[] supportPreview() {
return new PreviewProvider[]{new FormPreview(), new MobilePreview()}; PreviewProvider[] templatePreviews = super.supportPreview();
return ArrayUtils.addAll(new PreviewProvider[]{new FormPreview(), new MobilePreview()}, templatePreviews);
} }
/** /**

36
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java

@ -0,0 +1,36 @@
package com.fr.design.widget.ui.designer.layout;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.form.ui.container.WSortLayout;
/**
* @author hades
* @version 9.0
* Created by hades on 2019/11/18
*/
public abstract class AbstractFRLayoutDefinePane<T extends WSortLayout> extends AbstractDataModify<T> {
public AbstractFRLayoutDefinePane(XCreator xCreator) {
super(xCreator);
}
public AbstractFRLayoutDefinePane(XCreator xCreator, FormDesigner designer) {
super(xCreator, designer);
}
protected void copyLayoutAttr(WSortLayout srcLayout, WSortLayout destLayout) {
destLayout.clearListeners();
destLayout.clearMobileWidgetList();
for (int i = 0, len = srcLayout.getMobileWidgetListSize(); i < len; i++) {
destLayout.addMobileWidget(srcLayout.getMobileWidget(i));
}
destLayout.setSorted(true);
for (int i = 0, len = srcLayout.getListenerSize(); i < len; i++) {
destLayout.addListener(srcLayout.getListener(i));
}
}
}

4
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

@ -131,7 +131,9 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
if (layoutType == WBodyLayoutType.ABSOLUTE) { if (layoutType == WBodyLayoutType.ABSOLUTE) {
((XWFitLayout) creator.getBackupParent()).toData().resetStyle(); ((XWFitLayout) creator.getBackupParent()).toData().resetStyle();
if (state == WBodyLayoutType.FIT.getTypeValue()) { if (state == WBodyLayoutType.FIT.getTypeValue()) {
((XWFitLayout)creator.getBackupParent()).switch2FitBodyLayout(creator); XWFitLayout xwFitLayout = ((XWFitLayout)creator.getBackupParent());
xwFitLayout.switch2FitBodyLayout(creator);
copyLayoutAttr(layout, xwFitLayout.toData());
} }
} }
layout.setBorderStyle((LayoutBorderStyle) borderStyleEditor.getValue()); layout.setBorderStyle((LayoutBorderStyle) borderStyleEditor.getValue());

3
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java

@ -11,7 +11,6 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WAbsoluteLayout;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -23,7 +22,7 @@ import java.awt.Component;
/** /**
* Created by ibm on 2017/8/2. * Created by ibm on 2017/8/2.
*/ */
public class FRAbsoluteLayoutDefinePane extends AbstractDataModify<WAbsoluteLayout> { public class FRAbsoluteLayoutDefinePane extends AbstractFRLayoutDefinePane<WAbsoluteLayout> {
protected UIComboBox comboBox; protected UIComboBox comboBox;
public FRAbsoluteLayoutDefinePane(XCreator xCreator) { public FRAbsoluteLayoutDefinePane(XCreator xCreator) {

4
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -26,7 +26,6 @@ import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor;
import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor; import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor;
import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.design.widget.ui.designer.component.PaddingBoundPane; import com.fr.design.widget.ui.designer.component.PaddingBoundPane;
import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
@ -48,7 +47,7 @@ import java.awt.Dimension;
/** /**
* Created by ibm on 2017/8/2. * Created by ibm on 2017/8/2.
*/ */
public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> { public class FRFitLayoutDefinePane extends AbstractFRLayoutDefinePane<WFitLayout> {
private static final int ADAPT_LABEL_MAX_WIDTH = 80; private static final int ADAPT_LABEL_MAX_WIDTH = 80;
private XWFitLayout xWFitLayout; private XWFitLayout xWFitLayout;
private WFitLayout wFitLayout; private WFitLayout wFitLayout;
@ -208,6 +207,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
} }
xwAbsoluteBodyLayout.add(component); xwAbsoluteBodyLayout.add(component);
} }
copyLayoutAttr(wFitLayout, wAbsoluteBodyLayout);
xWFitLayout.setBackupParent(xwAbsoluteBodyLayout); xWFitLayout.setBackupParent(xwAbsoluteBodyLayout);
FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner(); FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner();
formDesigner.getSelectionModel().setSelectedCreators( formDesigner.getSelectionModel().setSelectedCreators(

44
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java

@ -1,24 +1,24 @@
package com.fr.design.widget.ui.designer.mobile; package com.fr.design.widget.ui.designer.mobile;
import com.fr.base.mobile.MobileScanCodeAttr; import com.fr.base.mobile.MobileScanCodeAttr;
import com.fr.base.mobile.ScanCodeState; import com.fr.base.mobile.TextInputMode;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ibutton.ModeButtonGroup;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.TextEditor; import com.fr.form.ui.TextEditor;
import javax.swing.BorderFactory; import javax.swing.*;
import javax.swing.JPanel; import java.awt.*;
import java.awt.BorderLayout;
public class ScanCodeMobileDefinePane extends MobileWidgetDefinePane { public class ScanCodeMobileDefinePane extends MobileWidgetDefinePane {
private XCreator xCreator; private XCreator xCreator;
private UICheckBox appScanCodeCheck; private ModeButtonGroup<TextInputMode> buttonGroup;
public ScanCodeMobileDefinePane(XCreator xCreator) { public ScanCodeMobileDefinePane(XCreator xCreator) {
this.xCreator = xCreator; this.xCreator = xCreator;
@ -33,14 +33,31 @@ public class ScanCodeMobileDefinePane extends MobileWidgetDefinePane {
} }
private UIExpandablePane getMobileSettingsPane() { private UIExpandablePane getMobileSettingsPane() {
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel panel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10);
appScanCodeCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Support_Scan_Code"), true); buttonGroup = new ModeButtonGroup<>();
appScanCodeCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); UIRadioButton scanCodeAndManualInput = new UIRadioButton(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design__Mobile_Support_Scan_Code_And_Manual_Input"), true);
UIRadioButton onlyManualInput = new UIRadioButton(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Only_Support_Manual_Input"), false);
UIRadioButton onlyScanCodeInput = new UIRadioButton(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Only_Support_Scan_Code_Input"), false);
scanCodeAndManualInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
onlyManualInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
onlyScanCodeInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
buttonGroup.put(TextInputMode.SUPPORT_SCAN_CODE_And_MANUAL, scanCodeAndManualInput);
buttonGroup.put(TextInputMode.ONLY_SUPPORT_MANUAL, onlyManualInput);
buttonGroup.put(TextInputMode.ONLY_SUPPORT_SCAN_CODE, onlyScanCodeInput);
buttonGroup.add(scanCodeAndManualInput);
buttonGroup.add(onlyManualInput);
buttonGroup.add(onlyScanCodeInput);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
panel.add(appScanCodeCheck); panel.add(scanCodeAndManualInput);
panel.add(onlyManualInput);
panel.add(onlyScanCodeInput);
final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane();
panelWrapper.add(panel, BorderLayout.NORTH); panelWrapper.add(panel, BorderLayout.NORTH);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, panelWrapper); return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20,
panelWrapper);
} }
private void bindListeners2Widgets() { private void bindListeners2Widgets() {
@ -61,15 +78,14 @@ public class ScanCodeMobileDefinePane extends MobileWidgetDefinePane {
@Override @Override
public void populate(FormDesigner designer) { public void populate(FormDesigner designer) {
MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr(); MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr();
ScanCodeState scanCodeState = mobileScanCodeAttr.getScanCodeState(); buttonGroup.setSelectButton(mobileScanCodeAttr.getTextInputMode());
appScanCodeCheck.setSelected(scanCodeState.getState());
this.bindListeners2Widgets(); this.bindListeners2Widgets();
} }
@Override @Override
public void update() { public void update() {
MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr(); MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr();
mobileScanCodeAttr.setScanCodeState(ScanCodeState.parse(appScanCodeCheck.isSelected())); mobileScanCodeAttr.setTextInputMode(buttonGroup.getCurrentSelected());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
} }

3
designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java

@ -10,6 +10,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.gui.FineDesignScreen;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.grid.Grid; import com.fr.grid.Grid;
import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.TemplateCellElement;
@ -35,7 +36,7 @@ import java.awt.event.ActionListener;
public class BiasTextPainterCellEditor extends AbstractCellEditor { public class BiasTextPainterCellEditor extends AbstractCellEditor {
private BiasTextPainterPane biasTextPainterPane = null; private BiasTextPainterPane biasTextPainterPane = null;
private static final double MULTIPLE = 1.5; private static final double MULTIPLE = FineDesignScreen.isHighDPI() ? 2 : 1.5;
/** /**
* Constructor. * Constructor.

3
designer-realize/src/main/java/com/fr/design/condition/WHPane.java

@ -10,7 +10,10 @@ import com.fr.stable.Constants;
import com.fr.stable.unit.*; import com.fr.stable.unit.*;
import javax.swing.*; import javax.swing.*;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.ParseException;
/** /**
* @author richie * @author richie

16
designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java

@ -3,7 +3,7 @@ package com.fr.design.mainframe;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.actions.utils.ReportActionUtils;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import com.fr.general.FRFont; import com.fr.general.FRFont;
@ -24,7 +24,7 @@ import java.awt.Color;
*/ */
public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionProvider { public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionProvider {
private static HyperlinkGroupPaneActionProvider instance; private static HyperlinkGroupPaneActionProvider instance;
private static Selection selection ;
private HyperlinkGroupPaneActionImpl() { private HyperlinkGroupPaneActionImpl() {
} }
@ -40,7 +40,9 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro
ElementCasePane reportPane = (ElementCasePane)elementCasePane; ElementCasePane reportPane = (ElementCasePane)elementCasePane;
final TemplateElementCase report = reportPane.getEditingElementCase(); final TemplateElementCase report = reportPane.getEditingElementCase();
NameJavaScriptGroup nameHyperlinks = getNameJSGroup(reportPane, report); NameJavaScriptGroup nameHyperlinks = getNameJSGroup(reportPane, report);
selection = reportPane.getSelection();
hyperlinkGroupPane.populate(nameHyperlinks); hyperlinkGroupPane.populate(nameHyperlinks);
} }
private NameJavaScriptGroup getNameJSGroup(ElementCasePane reportPane, final TemplateElementCase report) { private NameJavaScriptGroup getNameJSGroup(ElementCasePane reportPane, final TemplateElementCase report) {
@ -67,13 +69,12 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro
} }
ElementCasePane reportPane = (ElementCasePane)jt.getCurrentElementCasePane(); ElementCasePane reportPane = (ElementCasePane)jt.getCurrentElementCasePane();
final TemplateElementCase report = reportPane.getEditingElementCase(); final TemplateElementCase report = reportPane.getEditingElementCase();
final Selection sel = reportPane.getSelection();
final NameJavaScriptGroup updateNameHyperlinks = hyperlinkGroupPane.updateJSGroup(); final NameJavaScriptGroup updateNameHyperlinks = hyperlinkGroupPane.updateJSGroup();
if (sel instanceof FloatSelection) { if (selection instanceof FloatSelection) {
FloatElement selectedFloatElement = report.getFloatElement(((FloatSelection)sel).getSelectedFloatName()); FloatElement selectedFloatElement = report.getFloatElement(((FloatSelection)selection).getSelectedFloatName());
selectedFloatElement.setNameHyperlinkGroup(updateNameHyperlinks); selectedFloatElement.setNameHyperlinkGroup(updateNameHyperlinks);
} else { } else {
ReportActionUtils.actionIterateWithCellSelection((CellSelection)sel, report, new ReportActionUtils.IterAction() { ReportActionUtils.actionIterateWithCellSelection((CellSelection)selection, report, new ReportActionUtils.IterAction() {
public void dealWith(CellElement editCellElement) { public void dealWith(CellElement editCellElement) {
Style elementStyle = editCellElement.getStyle(); Style elementStyle = editCellElement.getStyle();
FRFont frFont = elementStyle.getFRFont(); FRFont frFont = elementStyle.getFRFont();
@ -94,7 +95,6 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro
} }
}); });
} }
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTargetModified();
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified();
} }
} }

13
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -35,8 +35,8 @@ import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.MutilTempalteTabPane;
import com.fr.design.fun.ReportSupportedFileUIProvider;
import com.fr.design.fun.PreviewProvider; import com.fr.design.fun.PreviewProvider;
import com.fr.design.fun.ReportSupportedFileUIProvider;
import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -102,6 +102,10 @@ import com.fr.stable.module.Module;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.web.controller.ViewRequestConstants; import com.fr.web.controller.ViewRequestConstants;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JPanel;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@ -109,9 +113,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JPanel;
/** /**
* JWorkBook used to edit WorkBook. * JWorkBook used to edit WorkBook.
@ -900,10 +901,10 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/ */
@Override @Override
public PreviewProvider[] supportPreview() { public PreviewProvider[] supportPreview() {
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); PreviewProvider[] templatePreviews = super.supportPreview();
return ArrayUtils.addAll(new PreviewProvider[]{ return ArrayUtils.addAll(new PreviewProvider[]{
new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview() new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview()
}, set.toArray(new PreviewProvider[set.size()])); }, templatePreviews);
} }
/** /**

1
designer-realize/src/main/java/com/fr/design/present/PresentPane.java

@ -75,6 +75,7 @@ public class PresentPane extends UIComboBoxPane<Present> {
displays.add(none.title4PopupWindow()); displays.add(none.title4PopupWindow());
dictPresentPane = new DictPresentPane(); dictPresentPane = new DictPresentPane();
dictPresentPane.registerDSChangeListener();
paneList.add(dictPresentPane); paneList.add(dictPresentPane);
keys.add(DictPresent.class.getName()); keys.add(DictPresent.class.getName());
displays.add(dictPresentPane.title4PopupWindow()); displays.add(dictPresentPane.title4PopupWindow());

9
designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java

@ -214,14 +214,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
JPanel repeatPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); JPanel repeatPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
repeatPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); repeatPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
JPanel freezePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel freezePanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
//自适应插件
if (shouldShowTip()) {
JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attention"));
BoxCenterAligmentPane actionLabel = getURLActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Form_Fit_Tip"));
infoPane.add(actionLabel, BorderLayout.SOUTH);
this.add(infoPane, BorderLayout.SOUTH);
}
outfreezePanel.add(freezePanel); outfreezePanel.add(freezePanel);
// 重复打印部分 // 重复打印部分
// 重复打印标题的起始行 // 重复打印标题的起始行

9
designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java

@ -227,6 +227,15 @@ public class ToolBarDragPane extends WidgetToolBarPane {
GUICoreUtils.setEnabled(this, b); GUICoreUtils.setEnabled(this, b);
isEnabled = b; isEnabled = b;
removeAllListener(northToolBar.getToolBarButtons()); removeAllListener(northToolBar.getToolBarButtons());
removeAllListener(southToolBar.getToolBarButtons());
removeToolBarListener(northToolBar);
removeToolBarListener(southToolBar);
}
private void removeToolBarListener(ToolBarPane toolBarPane) {
if (!isEnabled) {
toolBarPane.removeDefaultMouseListener();
}
} }
private void removeAllListener(List<ToolBarButton> toolBarButtons) { private void removeAllListener(List<ToolBarButton> toolBarButtons) {

42
designer-realize/src/main/java/com/fr/design/widget/ui/mobile/ScanCodeMobilePane.java

@ -1,49 +1,63 @@
package com.fr.design.widget.ui.mobile; package com.fr.design.widget.ui.mobile;
import com.fr.base.mobile.MobileScanCodeAttr; import com.fr.base.mobile.MobileScanCodeAttr;
import com.fr.base.mobile.ScanCodeState; import com.fr.base.mobile.TextInputMode;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ibutton.ModeButtonGroup;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.widget.mobile.WidgetMobilePane; import com.fr.design.widget.mobile.WidgetMobilePane;
import com.fr.form.ui.TextEditor; import com.fr.form.ui.TextEditor;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import javax.swing.BorderFactory; import javax.swing.*;
import javax.swing.JPanel; import java.awt.*;
import java.awt.BorderLayout;
public class ScanCodeMobilePane extends WidgetMobilePane { public class ScanCodeMobilePane extends WidgetMobilePane {
private UICheckBox appScanCodeCheck; private ModeButtonGroup<TextInputMode> buttonGroup;
@Override
protected void init() { protected void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.add(getMobileSettingPane(), BorderLayout.NORTH); this.add(getMobileSettingPane(), BorderLayout.NORTH);
} }
private UIExpandablePane getMobileSettingPane() { private UIExpandablePane getMobileSettingPane() {
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel panel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10);
appScanCodeCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Support_Scan_Code"), true); buttonGroup = new ModeButtonGroup<>();
appScanCodeCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); UIRadioButton scanCodeAndManualInput = new UIRadioButton(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design__Mobile_Support_Scan_Code_And_Manual_Input"), true);
UIRadioButton onlyManualInput = new UIRadioButton(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Only_Support_Manual_Input"), false);
UIRadioButton onlyScanCodeInput = new UIRadioButton(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Only_Support_Scan_Code_Input"), false);
scanCodeAndManualInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
onlyManualInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
onlyScanCodeInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
buttonGroup.put(TextInputMode.SUPPORT_SCAN_CODE_And_MANUAL, scanCodeAndManualInput);
buttonGroup.put(TextInputMode.ONLY_SUPPORT_MANUAL, onlyManualInput);
buttonGroup.put(TextInputMode.ONLY_SUPPORT_SCAN_CODE, onlyScanCodeInput);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
panel.add(appScanCodeCheck); panel.add(scanCodeAndManualInput);
panel.add(onlyManualInput);
panel.add(onlyScanCodeInput);
final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane();
panelWrapper.add(panel, BorderLayout.NORTH); panelWrapper.add(panel, BorderLayout.NORTH);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, panelWrapper); return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20,
panelWrapper);
} }
@Override @Override
public void populate(Widget widget) { public void populate(Widget widget) {
MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) widget).getMobileScanCodeAttr(); MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) widget).getMobileScanCodeAttr();
ScanCodeState scanCodeState = mobileScanCodeAttr.getScanCodeState(); buttonGroup.setSelectButton(mobileScanCodeAttr.getTextInputMode());
appScanCodeCheck.setSelected(scanCodeState.getState());
} }
@Override @Override
public void update(Widget widget) { public void update(Widget widget) {
MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) widget).getMobileScanCodeAttr(); MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) widget).getMobileScanCodeAttr();
mobileScanCodeAttr.setScanCodeState(ScanCodeState.parse(appScanCodeCheck.isSelected())); mobileScanCodeAttr.setTextInputMode(buttonGroup.getCurrentSelected());
} }

9
designer-realize/src/main/java/com/fr/grid/GridUI.java

@ -482,7 +482,14 @@ public class GridUI extends ComponentUI {
this.tmpRectangle.getHeight() - 1); this.tmpRectangle.getHeight() - 1);
// peter:对于合并的单元格,需要先白色的背景来清除背景. // peter:对于合并的单元格,需要先白色的背景来清除背景.
if (tmpCellElement.getColumnSpan() > 1 || tmpCellElement.getRowSpan() > 1) { if (tmpCellElement.getColumnSpan() > 1 || tmpCellElement.getRowSpan() > 1) {
WHITE_Backgorund.paint(g2d, this.cell_back_rect); // REPORT-23492 要看下是否设置了纸张背景 如果设置了按照背景来画
ReportSettingsProvider reportSettings = getReportSettings(report);
Background currentBackground = reportSettings.getBackground();
if (currentBackground != null) {
currentBackground.paint(g2d, this.cell_back_rect);
} else {
WHITE_Backgorund.paint(g2d, this.cell_back_rect);
}
//daniel:上面这里就有问题了啊....报表的背景在这个之前画的 会覆盖报表背景....不过只是设计器中看到预览浏览没问题 //daniel:上面这里就有问题了啊....报表的背景在这个之前画的 会覆盖报表背景....不过只是设计器中看到预览浏览没问题
} }
// peter:将这个元素添加到需要paint的元素列表当中去,留着画边框线.. // peter:将这个元素添加到需要paint的元素列表当中去,留着画边框线..

8
designer-realize/src/main/java/com/fr/start/common/SplashWindow.java

@ -1,14 +1,12 @@
package com.fr.start.common; package com.fr.start.common;
import com.fr.base.BaseUtils;
import com.fr.design.fun.OemProcessor; import com.fr.design.fun.OemProcessor;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.image4j.codec.ico.ICODecoder; import com.fr.stable.image4j.codec.ico.ICODecoder;
import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.OperatingSystem;
import com.fr.start.OemHandler; import com.fr.start.OemHandler;
import com.sun.awt.AWTUtilities;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.image.*; import java.awt.image.*;
@ -41,8 +39,6 @@ public class SplashWindow extends JFrame {
this.setAlwaysOnTop(false); this.setAlwaysOnTop(false);
this.setUndecorated(true); this.setUndecorated(true);
AWTUtilities.setWindowOpaque(this, false);
//使窗体背景透明 //使窗体背景透明
if (OperatingSystem.isWindows()) { if (OperatingSystem.isWindows()) {
this.setBackground(new Color(0, 0, 0, 0)); this.setBackground(new Color(0, 0, 0, 0));
@ -73,7 +69,7 @@ public class SplashWindow extends JFrame {
this.setIconImages(image); this.setIconImages(image);
} catch (IOException e) { } catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); this.setIconImage(IOUtils.readImage("/com/fr/base/images/oem/logo.png"));
} }
} }

Loading…
Cancel
Save