Browse Source

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

master
ju 7 years ago
parent
commit
05772f2448
  1. 37
      designer-base/src/com/fr/design/actions/UpdateAction.java
  2. 2
      designer-base/src/com/fr/design/actions/file/PreferenceAction.java
  3. 2
      designer-base/src/com/fr/design/actions/help/alphafine/AlphaFineAction.java
  4. 5
      designer-base/src/com/fr/design/actions/server/ConnectionListAction.java
  5. 2
      designer-base/src/com/fr/design/actions/server/FunctionManagerAction.java
  6. 32
      designer-base/src/com/fr/design/mainframe/toolbar/UpdateActionManager.java
  7. 5
      designer-base/src/com/fr/env/RemoteEnv.java
  8. 5
      designer-chart/src/com/fr/design/module/ChartPreStyleAction.java
  9. 2
      designer-realize/src/com/fr/design/actions/insert/cell/DSColumnCellAction.java
  10. 2
      designer-realize/src/com/fr/design/actions/report/ReportEngineAttrAction.java
  11. 2
      designer-realize/src/com/fr/design/actions/report/ReportExportAttrAction.java
  12. 5
      designer-realize/src/com/fr/design/actions/report/ReportMobileAttrAction.java
  13. 11
      designer-realize/src/com/fr/design/actions/report/ReportPageAttrAction.java
  14. 2
      designer-realize/src/com/fr/design/actions/report/ReportPageSetupAction.java
  15. 3
      designer-realize/src/com/fr/design/actions/report/ReportPrintSettingAction.java
  16. 2
      designer-realize/src/com/fr/design/actions/report/ReportWatermarkAction.java
  17. 2
      designer-realize/src/com/fr/design/actions/report/ReportWebAttrAction.java
  18. 2
      designer-realize/src/com/fr/design/actions/report/ReportWriteAttrAction.java
  19. 2
      designer-realize/src/com/fr/design/actions/server/ServerConfigManagerAction.java
  20. 2
      designer-realize/src/com/fr/design/actions/server/StyleListAction.java
  21. 30
      designer-realize/src/com/fr/design/report/LayerReportPane.java
  22. 3
      designer-realize/src/com/fr/design/webattr/ReportWriteAttrPane.java
  23. 15
      designer-realize/src/com/fr/start/SplashContext.java
  24. 19
      designer-realize/src/com/fr/start/fx/SplashFx.java
  25. 25
      designer-realize/src/com/fr/start/fx/SplashFxWindow.java

37
designer-base/src/com/fr/design/actions/UpdateAction.java

@ -9,7 +9,11 @@ import com.fr.base.Style;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenu.*; import com.fr.design.gui.imenu.UICheckBoxMenuItem;
import com.fr.design.gui.imenu.UIMenuEastAttrItem;
import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.gui.imenu.UIPopupEastAttrMenu;
import com.fr.design.mainframe.toolbar.UpdateActionManager;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.selection.SelectionListener; import com.fr.design.selection.SelectionListener;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -17,10 +21,28 @@ import com.fr.stable.StringUtils;
import com.fr.stable.pinyin.PinyinFormat; import com.fr.stable.pinyin.PinyinFormat;
import com.fr.stable.pinyin.PinyinHelper; import com.fr.stable.pinyin.PinyinHelper;
import javax.swing.*; import javax.swing.AbstractButton;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JToolBar;
import javax.swing.KeyStroke;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import java.awt.*; import java.awt.AWTEvent;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ComponentEvent; import java.awt.event.ComponentEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.util.HashMap; import java.util.HashMap;
@ -454,10 +476,13 @@ public abstract class UpdateAction extends ShortCut implements Action {
return menuItem; return menuItem;
} }
public void setSearchText(JPanel panel) { public void generateAndSetSearchText(String paneClass) {
this.searchText = getComponentTexts(panel, "_", new StringBuffer(), new StringBuffer(), new StringBuffer()); UpdateActionManager.getUpdateActionManager().dealWithSearchText(paneClass, this);
}
} public void setSearchText(String text) {
this.searchText = text;
}
/** /**
* 获取搜索匹配字符串 * 获取搜索匹配字符串

2
designer-base/src/com/fr/design/actions/file/PreferenceAction.java

@ -18,7 +18,7 @@ public class PreferenceAction extends UpdateAction {
this.setMenuKeySet(KeySetUtils.PREFERENCE); this.setMenuKeySet(KeySetUtils.PREFERENCE);
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSearchText(new PreferencePane()); this.generateAndSetSearchText(PreferencePane.class.getName());
} }
/** /**

2
designer-base/src/com/fr/design/actions/help/alphafine/AlphaFineAction.java

@ -23,7 +23,7 @@ public class AlphaFineAction extends UpdateAction {
this.setName(getMenuKeySet().getMenuName()); this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/smallsearch.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/smallsearch.png"));
this.setSearchText(new AlphaFineConfigPane()); this.generateAndSetSearchText(AlphaFineConfigPane.class.getName());
} }
public static final MenuKeySet ALPHAFINE = new MenuKeySet() { public static final MenuKeySet ALPHAFINE = new MenuKeySet() {

5
designer-base/src/com/fr/design/actions/server/ConnectionListAction.java

@ -33,7 +33,7 @@ public class ConnectionListAction extends UpdateAction {
this.setName(getMenuKeySet().getMenuKeySetName()); this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/connection.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/connection.png"));
this.setSearchText(new DatabaseConnectionPane.JDBC()); this.generateAndSetSearchText(DatabaseConnectionPane.JDBC.class.getName());
} }
public static final MenuKeySet DEFINE_DATA_CONNECTION = new MenuKeySet() { public static final MenuKeySet DEFINE_DATA_CONNECTION = new MenuKeySet() {
@ -63,7 +63,8 @@ public class ConnectionListAction extends UpdateAction {
final ConnectionConfig datasourceManager = ConnectionConfig.getInstance(); final ConnectionConfig datasourceManager = ConnectionConfig.getInstance();
final ConnectionManagerPane databaseManagerPane = new ConnectionManagerPane() { final ConnectionManagerPane databaseManagerPane = new ConnectionManagerPane() {
public void complete() { public void complete() {
populate(datasourceManager); ConnectionConfig connectionConfig = datasourceManager.mirror();
populate(connectionConfig);
} }
protected void renameConnection(String oldName, String newName) { protected void renameConnection(String oldName, String newName) {

2
designer-base/src/com/fr/design/actions/server/FunctionManagerAction.java

@ -30,7 +30,7 @@ public class FunctionManagerAction extends UpdateAction {
this.setName(getMenuKeySet().getMenuKeySetName()+"..."); this.setName(getMenuKeySet().getMenuKeySetName()+"...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/function.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/function.png"));
this.setSearchText(new FunctionManagerPane()); this.generateAndSetSearchText(FunctionManagerPane.class.getName());
} }
/** /**

32
designer-base/src/com/fr/design/mainframe/toolbar/UpdateActionManager.java

@ -1,9 +1,18 @@
package com.fr.design.mainframe.toolbar; package com.fr.design.mainframe.toolbar;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.gui.frpane.LoadingBasicPane;
import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StableUtils;
import javax.swing.JPanel;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/** /**
* Created by XiaXiang on 2017/4/13. * Created by XiaXiang on 2017/4/13.
@ -11,6 +20,11 @@ import java.util.List;
public class UpdateActionManager { public class UpdateActionManager {
private static UpdateActionManager updateActionManager = null; private static UpdateActionManager updateActionManager = null;
private List<UpdateActionModel> updateActions; private List<UpdateActionModel> updateActions;
private ExecutorService threadPoolExecutor = new ThreadPoolExecutor(
1, 1,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(),
new ThreadFactoryBuilder().setNameFormat("alphafine-thread-%s").build());//目前测下来一个线程慢慢做处理总共大概也只要两秒,暂时就这样
public synchronized static UpdateActionManager getUpdateActionManager() { public synchronized static UpdateActionManager getUpdateActionManager() {
if (updateActionManager == null) { if (updateActionManager == null) {
@ -41,4 +55,22 @@ public class UpdateActionManager {
} }
return null; return null;
} }
public synchronized void dealWithSearchText(final String paneClass, final UpdateAction updateAction) {
threadPoolExecutor.execute(new Runnable() {
@Override
public void run() {
JPanel panel = null;
try {
panel = (JPanel) StableUtils.classForName(paneClass).newInstance();
if (panel instanceof LoadingBasicPane) {
panel = ((LoadingBasicPane) panel).getAllComponents();
}
updateAction.setSearchText(updateAction.getComponentTexts(panel, "_", new StringBuffer(), new StringBuffer(), new StringBuffer()));
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
});
}
} }

5
designer-base/src/com/fr/env/RemoteEnv.java vendored

@ -4,8 +4,9 @@ import com.fr.base.EnvException;
import com.fr.base.TableData; import com.fr.base.TableData;
import com.fr.base.operator.file.FileOperator; import com.fr.base.operator.file.FileOperator;
import com.fr.base.remote.RemoteDeziConstants; import com.fr.base.remote.RemoteDeziConstants;
import com.fr.common.rpc.RemoteCallServerConfig;
import com.fr.common.rpc.netty.MessageSendExecutor; import com.fr.common.rpc.netty.MessageSendExecutor;
import com.fr.common.rpc.serialize.RpcSerializeProtocol; import com.fr.common.rpc.serialize.SerializeProtocol;
import com.fr.core.env.EnvConstants; import com.fr.core.env.EnvConstants;
import com.fr.core.env.EnvContext; import com.fr.core.env.EnvContext;
import com.fr.core.env.resource.RemoteEnvConfig; import com.fr.core.env.resource.RemoteEnvConfig;
@ -95,7 +96,7 @@ public class RemoteEnv extends AbstractEnv implements DesignAuthorityConfigurabl
@Override @Override
public void connect() { public void connect() {
// FIXME:richie ip地址属于测试的,带实际修改为RemoteEnv配置的地址 // FIXME:richie ip地址属于测试的,带实际修改为RemoteEnv配置的地址
MessageSendExecutor.getInstance().setRpcServerLoader("127.0.0.1:" + 33999, RpcSerializeProtocol.KRYOSERIALIZE); MessageSendExecutor.getInstance().setRpcServerLoader("127.0.0.1", RemoteCallServerConfig.getInstance().getPort(), RemoteCallServerConfig.getInstance().getSerializeProtocol());
} }
@Override @Override

5
designer-chart/src/com/fr/design/module/ChartPreStyleAction.java

@ -1,6 +1,5 @@
package com.fr.design.module; package com.fr.design.module;
import com.fr.base.BaseUtils;
import com.fr.base.ChartPreStyleManagerProvider; import com.fr.base.ChartPreStyleManagerProvider;
import com.fr.base.ChartPreStyleServerManager; import com.fr.base.ChartPreStyleServerManager;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
@ -12,7 +11,7 @@ import com.fr.design.menu.MenuKeySet;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*; import javax.swing.KeyStroke;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
/** /**
@ -27,7 +26,7 @@ public class ChartPreStyleAction extends UpdateAction {
this.setName(getMenuKeySet().getMenuKeySetName()+ "..."); this.setName(getMenuKeySet().getMenuKeySetName()+ "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/chart/ChartType.png")); this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/chart/ChartType.png"));
this.setSearchText(new ChartPreStyleManagerPane()); this.generateAndSetSearchText(ChartPreStyleManagerPane.class.getName());
} }
/** /**

2
designer-realize/src/com/fr/design/actions/insert/cell/DSColumnCellAction.java

@ -15,7 +15,7 @@ public class DSColumnCellAction extends AbstractCellAction implements WorkBookSu
public DSColumnCellAction(ElementCasePane t) { public DSColumnCellAction(ElementCasePane t) {
super(t); super(t);
initAction(); initAction();
this.setSearchText(new DSColumnPane()); this.generateAndSetSearchText(DSColumnPane.class.getName());
} }
private void initAction() { private void initAction() {

2
designer-realize/src/com/fr/design/actions/report/ReportEngineAttrAction.java

@ -18,7 +18,7 @@ public class ReportEngineAttrAction extends ReportComponentAction<WorkSheetDesig
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/reportEngineAttr.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/reportEngineAttr.png"));
this.setSearchText(new LayerReportPane(null)); this.generateAndSetSearchText(LayerReportPane.class.getName());
} }

2
designer-realize/src/com/fr/design/actions/report/ReportExportAttrAction.java

@ -19,7 +19,7 @@ public class ReportExportAttrAction extends JWorkBookAction {
this.setName(getMenuKeySet().getMenuKeySetName()+"..."); this.setName(getMenuKeySet().getMenuKeySetName()+"...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/exportAttr.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/exportAttr.png"));
this.setSearchText(new ReportExportAttrPane()); this.generateAndSetSearchText(ReportExportAttrPane.class.getName());
} }
/** /**

5
designer-realize/src/com/fr/design/actions/report/ReportMobileAttrAction.java

@ -1,6 +1,5 @@
package com.fr.design.actions.report; package com.fr.design.actions.report;
import com.fr.base.BaseUtils;
import com.fr.design.actions.JWorkBookAction; import com.fr.design.actions.JWorkBookAction;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
@ -16,7 +15,7 @@ import com.fr.report.mobile.ElementCaseMobileAttr;
import com.fr.stable.ReportFunctionProcessor; import com.fr.stable.ReportFunctionProcessor;
import com.fr.stable.fun.FunctionProcessor; import com.fr.stable.fun.FunctionProcessor;
import javax.swing.*; import javax.swing.KeyStroke;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
/** /**
@ -32,7 +31,7 @@ public class ReportMobileAttrAction extends JWorkBookAction{
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/mobile.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/mobile.png"));
this.setSearchText(new ReportMobileAttrPane()); this.generateAndSetSearchText(ReportMobileAttrPane.class.getName());
} }
/** /**

11
designer-realize/src/com/fr/design/actions/report/ReportPageAttrAction.java

@ -3,18 +3,17 @@
*/ */
package com.fr.design.actions.report; package com.fr.design.actions.report;
import javax.swing.SwingUtilities;
import com.fr.base.BaseUtils;
import com.fr.design.actions.ReportComponentAction; import com.fr.design.actions.ReportComponentAction;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.mainframe.WorkSheetDesigner; import com.fr.design.mainframe.WorkSheetDesigner;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
import com.fr.design.report.freeze.RepeatAndFreezeSettingPane; import com.fr.design.report.freeze.RepeatAndFreezeSettingPane;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import javax.swing.SwingUtilities;
/** /**
* @author richer * @author richer
* @since 6.5.5 * @since 6.5.5
@ -29,7 +28,7 @@ public class ReportPageAttrAction extends ReportComponentAction<WorkSheetDesigne
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_file/pageSetup.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_file/pageSetup.png"));
this.setSearchText(new RepeatAndFreezeSettingPane()); this.generateAndSetSearchText(RepeatAndFreezeSettingPane.class.getName());
} }
/** /**

2
designer-realize/src/com/fr/design/actions/report/ReportPageSetupAction.java

@ -28,7 +28,7 @@ public class ReportPageSetupAction extends ReportComponentAction<ReportComponent
this.setName(getMenuKeySet().getMenuKeySetName()+"..."); this.setName(getMenuKeySet().getMenuKeySetName()+"...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_file/pageSetup.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_file/pageSetup.png"));
this.setSearchText(new PageSetupPane()); this.generateAndSetSearchText(PageSetupPane.class.getName());
} }
/** /**

3
designer-realize/src/com/fr/design/actions/report/ReportPrintSettingAction.java

@ -11,7 +11,6 @@ import com.fr.design.menu.MenuKeySet;
import com.fr.design.webattr.printsettings.ReportPrintSettingPane; import com.fr.design.webattr.printsettings.ReportPrintSettingPane;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.main.TemplateWorkBook;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
import com.fr.report.core.ReportUtils; import com.fr.report.core.ReportUtils;
@ -29,7 +28,7 @@ public class ReportPrintSettingAction extends JWorkBookAction {
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon(IconManager.PRINT.getPath())); this.setSmallIcon(IOUtils.readIcon(IconManager.PRINT.getPath()));
this.setSearchText(new ReportPrintSettingPane()); this.setSearchText(ReportPrintSettingPane.class.getName());
} }
/** /**

2
designer-realize/src/com/fr/design/actions/report/ReportWatermarkAction.java

@ -26,7 +26,7 @@ public class ReportWatermarkAction extends JWorkBookAction {
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/watermark.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/watermark.png"));
this.setSearchText(new WatermarkPane()); this.generateAndSetSearchText(WatermarkPane.class.getName());
} }
@Override @Override

2
designer-realize/src/com/fr/design/actions/report/ReportWebAttrAction.java

@ -30,7 +30,7 @@ public class ReportWebAttrAction extends JWorkBookAction {
this.setName(getMenuKeySet().getMenuKeySetName()+"..."); this.setName(getMenuKeySet().getMenuKeySetName()+"...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/webreportattribute.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/webreportattribute.png"));
this.setSearchText(new ReportWebAttrPane().getAllComponents()); this.generateAndSetSearchText(ReportWebAttrPane.class.getName());
} }
/** /**

2
designer-realize/src/com/fr/design/actions/report/ReportWriteAttrAction.java

@ -21,7 +21,7 @@ public class ReportWriteAttrAction extends ReportComponentAction<WorkSheetDesign
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/reportWriteAttr.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_report/reportWriteAttr.png"));
this.setSearchText(new ReportWriteAttrPane(null).getAllComponents()); this.generateAndSetSearchText(ReportWriteAttrPane.class.getName());
} }

2
designer-realize/src/com/fr/design/actions/server/ServerConfigManagerAction.java

@ -29,7 +29,7 @@ public class ServerConfigManagerAction extends UpdateAction {
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/edit.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/edit.png"));
this.setSearchText(new EditReportServerParameterPane().getAllComponents()); this.generateAndSetSearchText(EditReportServerParameterPane.class.getName());
} }
/** /**

2
designer-realize/src/com/fr/design/actions/server/StyleListAction.java

@ -26,7 +26,7 @@ public class StyleListAction extends UpdateAction {
this.setName(getMenuKeySet().getMenuKeySetName()+ "..."); this.setName(getMenuKeySet().getMenuKeySetName()+ "...");
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/style.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_web/style.png"));
this.setSearchText(new StyleManagerPane()); this.generateAndSetSearchText(StyleManagerPane.class.getName());
} }
/** /**

30
designer-realize/src/com/fr/design/report/LayerReportPane.java

@ -1,31 +1,29 @@
package com.fr.design.report; package com.fr.design.report;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.fr.design.gui.ilable.FRExplainLabel;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.editor.editor.IntegerEditor;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.FRExplainLabel;
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.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.editor.editor.IntegerEditor;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.report.core.ReportUtils; import com.fr.report.core.ReportUtils;
import com.fr.report.stable.LayerReportAttr; import com.fr.report.stable.LayerReportAttr;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/** /**
* *
* @editor zhou * @editor zhou
@ -45,6 +43,10 @@ public class LayerReportPane extends BasicBeanPane<LayerReportAttr> {
this.initComponents(); this.initComponents();
} }
public LayerReportPane() {
this(null);
}
protected void initComponents() { protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel outlayerReportPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText(new String[]{"Report_Engine", "Attribute"})); JPanel outlayerReportPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText(new String[]{"Report_Engine", "Attribute"}));

3
designer-realize/src/com/fr/design/webattr/ReportWriteAttrPane.java

@ -20,6 +20,9 @@ public class ReportWriteAttrPane extends LoadingBasicPane {
private VerifierListPane verifierListPane; private VerifierListPane verifierListPane;
private WriteShortCutsPane writeShortCutsPane; private WriteShortCutsPane writeShortCutsPane;
private ElementCasePane ePane; private ElementCasePane ePane;
public ReportWriteAttrPane(){
this(null);
}
public ReportWriteAttrPane(ElementCasePane ePane){ public ReportWriteAttrPane(ElementCasePane ePane){
this.ePane = ePane; this.ePane = ePane;
} }

15
designer-realize/src/com/fr/start/SplashContext.java

@ -34,7 +34,7 @@ public class SplashContext {
private static final String GUEST = getRandomUser(); private static final String GUEST = getRandomUser();
private ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); private ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
private Listener<String> listener; private Listener<String> listener;
@ -43,7 +43,7 @@ public class SplashContext {
} }
private SplashContext() { private SplashContext() {
} }
/** /**
@ -57,18 +57,18 @@ public class SplashContext {
* 展示启动动画 * 展示启动动画
*/ */
public void show() { public void show() {
splashStrategy.show();
//监听 //监听
initListener(); initListener();
splashStrategy.show();
} }
/** /**
* 隐藏启动动画 * 隐藏启动动画
*/ */
public void hide() { public void hide() {
splashStrategy.hide();
//取消监听 //取消监听
EventDispatcher.stopListen(listener); EventDispatcher.stopListen(listener);
splashStrategy.hide();
// 窗口关闭后取消定时获取模块信息的timer // 窗口关闭后取消定时获取模块信息的timer
scheduler.shutdown(); scheduler.shutdown();
// 一次性 // 一次性
@ -83,19 +83,18 @@ public class SplashContext {
updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]); updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]);
} }
}, 0, 300, TimeUnit.MILLISECONDS); }, 0, 300, TimeUnit.MILLISECONDS);
listener = new Listener<String>() { listener = new Listener<String>() {
@Override @Override
public void on(Event event, String i18n) { public void on(Event event, String i18n) {
showThanks();
moduleID = i18n; moduleID = i18n;
loadingIndex++; loadingIndex++;
updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]); updateModuleLog(moduleID.isEmpty() ? StringUtils.EMPTY : moduleID + loading[loadingIndex % 3]);
} }
}; };
EventDispatcher.listen(ModuleEvent.MajorModuleStarting, listener); EventDispatcher.listen(ModuleEvent.MajorModuleStarting, listener);
showThanks();
} }
private void updateModuleLog(String text) { private void updateModuleLog(String text) {

19
designer-realize/src/com/fr/start/fx/SplashFx.java

@ -18,7 +18,7 @@ import java.util.concurrent.Executors;
*/ */
public class SplashFx implements SplashStrategy { public class SplashFx implements SplashStrategy {
private SplashFxWindow test; private SplashFxWindow fxWindow;
private static final ExecutorService SERVICE = Executors.newSingleThreadExecutor(); private static final ExecutorService SERVICE = Executors.newSingleThreadExecutor();
@Override @Override
@ -29,7 +29,7 @@ public class SplashFx implements SplashStrategy {
Application.launch(SplashFxWindow.class); Application.launch(SplashFxWindow.class);
} }
}); });
test = SplashFxWindow.waitForStartUpTest(); fxWindow = SplashFxWindow.waitForStartUpTest();
} }
@Override @Override
@ -39,22 +39,11 @@ public class SplashFx implements SplashStrategy {
@Override @Override
public void updateModuleLog(final String text) { public void updateModuleLog(final String text) {
Platform.runLater(new Runnable() { fxWindow.updateModuleInfo(text);
@Override
public void run() {
test.updateModuleInfo(text);
}
});
} }
@Override @Override
public void updateThanksLog(final String text) { public void updateThanksLog(final String text) {
Platform.runLater(new Runnable() { fxWindow.updateThanks(text);
@Override
public void run() {
test.updateThanks(text);
}
});
} }
} }

25
designer-realize/src/com/fr/start/fx/SplashFxWindow.java

@ -4,6 +4,7 @@ import com.bulenkov.iconloader.util.JBUI;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
import javafx.application.Application; import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
@ -119,8 +120,16 @@ public class SplashFxWindow extends Application {
* *
* @param s 文字 * @param s 文字
*/ */
public void updateModuleInfo(String s) { public void updateModuleInfo(final String s) {
moduleInfo.setText(s); Platform.runLater(new Runnable() {
@Override
public void run() {
if (moduleInfo != null) {
moduleInfo.setText(s);
}
}
});
} }
/** /**
@ -128,7 +137,15 @@ public class SplashFxWindow extends Application {
* *
* @param s 文字 * @param s 文字
*/ */
public void updateThanks(String s) { public void updateThanks(final String s) {
thanks.setText(s); Platform.runLater(new Runnable() {
@Override
public void run() {
if (thanks != null) {
thanks.setText(s);
}
}
});
} }
} }

Loading…
Cancel
Save