diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 73da53d4b8..dba3141b73 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -4,7 +4,6 @@ package com.fr.design; import com.fr.base.BaseXMLUtils; -import com.fr.base.FRContext; import com.fr.base.Utils; import com.fr.design.actions.help.alphafine.AlphaFineConfigManager; import com.fr.design.constants.UIConstants; @@ -179,7 +178,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { try { XMLTools.readFileXML(designerEnvManager, designerEnvManager.getDesignerEnvFile()); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } // james:如果没有env定义,要设置一个默认的 @@ -282,11 +281,11 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { Handler handler = new FileHandler(fileName, true); handler.setFormatter(new FRLogFormatter()); - FRContext.getLogger().addLogHandler(handler); + FineLoggerFactory.getLogger().addLogHandler(handler); } catch (SecurityException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } @@ -323,7 +322,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } fileWriter.close(); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } @@ -345,7 +344,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { try { XMLTools.readFileXML(designerEnvManager, prevEnvFile); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } // 清空前一个版本中的工作目录和最近打开 nameEnvMap = new ListMap(); @@ -626,7 +625,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { fout.flush(); fout.close(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-base/src/main/java/com/fr/design/actions/community/UpAction.java b/designer-base/src/main/java/com/fr/design/actions/community/UpAction.java index d1baef84f0..157f775b8c 100644 --- a/designer-base/src/main/java/com/fr/design/actions/community/UpAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/community/UpAction.java @@ -1,16 +1,15 @@ package com.fr.design.actions.community; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; - import com.fr.general.CloudCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.JOptionPane; +import javax.swing.KeyStroke; +import java.awt.Desktop; import java.awt.event.ActionEvent; import java.io.IOException; import java.net.URI; @@ -33,7 +32,7 @@ public class UpAction extends UpdateAction { String url = CloudCenter.getInstance().acquireUrlByKind("bbs.update"); if (StringUtils.isEmpty(url)) { - FRContext.getLogger().info("The URL is empty!"); + FineLoggerFactory.getLogger().info("The URL is empty!"); return; } try { diff --git a/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java b/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java index d50d4dc1b6..83aeaefe3d 100644 --- a/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java +++ b/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java @@ -1,6 +1,5 @@ package com.fr.design.actions.core; -import com.fr.base.FRContext; import com.fr.base.Utils; import com.fr.design.actions.UpdateAction; import com.fr.design.file.HistoryTemplateListPane; @@ -215,7 +214,7 @@ public class ActionFactory { c.setAccessible(true); return c.newInstance(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return null; } @@ -281,7 +280,7 @@ public class ActionFactory { Constructor c = (Constructor) clazz.getConstructor(cls); actions.add(c.newInstance(obj)); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } @@ -301,7 +300,7 @@ public class ActionFactory { Constructor c = (Constructor) clazz.getConstructor(); actionNames.add(c.newInstance().getMenuKeySet()); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } @@ -336,7 +335,7 @@ public class ActionFactory { Constructor c = (Constructor) clazz.getConstructor(cls); actions.add(c.newInstance(obj)); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } return actions.toArray(new UpdateAction[actions.size()]); @@ -355,7 +354,7 @@ public class ActionFactory { constructor.setAccessible(true); return constructor.newInstance(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return null; } diff --git a/designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java b/designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java index 1aa8ea7d4d..4b1a701a23 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java @@ -4,7 +4,6 @@ package com.fr.design.actions.help; -import com.fr.base.FRContext; import com.fr.base.FeedBackInfo; import com.fr.design.constants.LayoutConstants; import com.fr.design.dialog.BasicDialog; @@ -23,7 +22,12 @@ import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JDialog; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.SwingConstants; +import javax.swing.SwingWorker; import javax.swing.border.Border; import javax.swing.border.EmptyBorder; import javax.swing.border.MatteBorder; @@ -31,7 +35,12 @@ import javax.swing.plaf.ColorUIResource; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.PlainDocument; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; @@ -299,7 +308,7 @@ public class FeedBackPane extends BasicPane { } catch (Exception e) { isSendSuccessful = false; if (!(e instanceof CancellationException)) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } diff --git a/designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java b/designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java index 65ce1924c0..2d4814d2ed 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/ForumAction.java @@ -5,16 +5,15 @@ package com.fr.design.actions.help; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; - import com.fr.general.CloudCenter; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.JOptionPane; +import javax.swing.KeyStroke; +import java.awt.Desktop; import java.awt.event.ActionEvent; import java.io.IOException; import java.net.URI; @@ -42,7 +41,7 @@ public class ForumAction extends UpdateAction { public void actionPerformed(ActionEvent e) { String url = CloudCenter.getInstance().acquireUrlByKind("bbs"); if (StringUtils.isEmpty(url)) { - FRContext.getLogger().info("The URL is empty!"); + FineLoggerFactory.getLogger().info("The URL is empty!"); return; } try { diff --git a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java index 3c51f4bbd4..58221a03a8 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java @@ -1,13 +1,13 @@ package com.fr.design.actions.help; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.Utils; import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; import com.fr.general.CloudCenter; import com.fr.general.GeneralContext; import com.fr.general.http.HttpToolbox; +import com.fr.log.FineLoggerFactory; import com.fr.stable.CommonUtils; import com.fr.stable.ProductConstants; import com.fr.stable.StableUtils; @@ -38,11 +38,11 @@ public class TutorialAction extends UpdateAction { private void nativeExcuteMacInstallHomePrograms(String appName) { String installHome = StableUtils.getInstallHome(); if(installHome == null) { - FRContext.getLogger().error("Can not find the install home, please check it."); + FineLoggerFactory.getLogger().error("Can not find the install home, please check it."); } else { String appPath = StableUtils.pathJoin(new String[]{installHome, "bin", appName}); if(!(new File(appPath)).exists()) { - FRContext.getLogger().error(appPath + " can not be found."); + FineLoggerFactory.getLogger().error(appPath + " can not be found."); } String cmd = "open " + appPath; @@ -51,7 +51,7 @@ public class TutorialAction extends UpdateAction { try { runtime.exec(cmd); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java b/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java index 188c330538..b76e3feed5 100644 --- a/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java +++ b/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java @@ -1,16 +1,18 @@ package com.fr.design.condition; -import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.menu.ToolBarDef; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.log.FineLoggerFactory; - -import javax.swing.*; +import javax.swing.BoxLayout; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JScrollPane; import java.awt.Dimension; import java.util.HashMap; import java.util.Iterator; @@ -88,9 +90,9 @@ public abstract class ConditionAttributesPane extends BasicBeanPane { try { return clazz.newInstance(); } catch (InstantiationException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (IllegalAccessException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return null; } diff --git a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java index 6dac67b1fc..bed0dc96b0 100644 --- a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java @@ -1,7 +1,6 @@ package com.fr.design.data; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.TableData; import com.fr.data.TableDataSource; import com.fr.data.api.StoreProcedureAssist; @@ -28,14 +27,17 @@ import com.fr.design.menu.LineSeparator; import com.fr.design.menu.MenuDef; import com.fr.general.ComparatorUtils; import com.fr.general.NameObject; +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; -import javax.swing.*; +import javax.swing.DefaultCellEditor; +import javax.swing.Icon; +import javax.swing.JTree; import javax.swing.event.CellEditorListener; import javax.swing.event.ChangeEvent; import javax.swing.tree.TreeCellEditor; -import java.awt.*; +import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; @@ -413,7 +415,7 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp } } catch (Exception ex) { - FRContext.getLogger().error(ex.getMessage(), ex); + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); } } diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index fc5e8b54fc..9c892de011 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java @@ -1,6 +1,5 @@ package com.fr.design.data; -import com.fr.base.FRContext; import com.fr.base.StoreProcedureParameter; import com.fr.base.TableData; import com.fr.data.TableDataSource; @@ -30,6 +29,7 @@ import com.fr.file.TableDataConfig; import com.fr.general.ComparatorUtils; import com.fr.general.data.DataModel; import com.fr.general.data.TableDataException; +import com.fr.log.FineLoggerFactory; import com.fr.script.Calculator; import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; @@ -489,7 +489,7 @@ public abstract class DesignTableDataManager { } rs.release(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java index d004ba6af9..9ec67adb64 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java @@ -1,7 +1,6 @@ package com.fr.design.data.datapane; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.TableData; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.DBUtils; @@ -33,12 +32,15 @@ import com.fr.design.mainframe.DesignerFrame; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.file.ConnectionConfig; import com.fr.general.ComparatorUtils; - import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; -import javax.swing.*; +import javax.swing.JList; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTree; +import javax.swing.SwingWorker; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.PopupMenuEvent; @@ -49,7 +51,9 @@ import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeCellRenderer; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.awt.event.ItemEvent; @@ -432,7 +436,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha tree.expandPath(path); } } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } @@ -473,7 +477,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha DesignerEnvManager.getEnvManager().getMaxNumberOrPreviewRow()); } catch (Exception e) { failedToFindTable(); - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } @@ -530,7 +534,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha // daniel:增加参数 colNames = DataOperator.getInstance().getColumns(selectedDSName, paras.getSchemaName(), selectedTableObject); } catch (Exception e2) { - FRContext.getLogger().error(e2.getMessage(), e2); + FineLoggerFactory.getLogger().error(e2.getMessage(), e2); } if (colNames == null) { diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java index 263d2de53a..0ca42c0f92 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java @@ -1,7 +1,6 @@ package com.fr.design.data.datapane; import com.fr.base.BaseFormula; -import com.fr.base.FRContext; import com.fr.base.Parameter; import com.fr.base.ParameterHelper; import com.fr.base.ParameterMapNameSpace; @@ -15,9 +14,10 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.parameter.ParameterInputPane; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; import com.fr.script.Calculator; -import javax.swing.*; +import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import java.awt.event.ItemEvent; @@ -113,7 +113,7 @@ public class ChoosePaneSupportFormula extends ChoosePane { selectedDSName = Utils.objectToString(ca.eval(BaseFormula.createFormulaBuilder().build(item))); // selectedDSName = ParameterHelper.analyzeCurrentContextTableData4Templatee(item, parameters); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } else { selectedDSName = item; @@ -156,7 +156,7 @@ public class ChoosePaneSupportFormula extends ChoosePane { dsName = dsItem.startsWith("=") ? Utils.objectToString(ca.eval(BaseFormula.createFormulaBuilder().build(dsItem))) : dsItem; tableName = tableItem.startsWith("=") ? Utils.objectToString(ca.eval(BaseFormula.createFormulaBuilder().build(tableItem))) : tableItem; } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } ori_ds_name = dsName; ori_table_name = tableName; diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java index 1ec28a97c5..a90f7a1263 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java @@ -1,21 +1,21 @@ package com.fr.design.data.datapane; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.data.impl.DBTableData; import com.fr.design.actions.tabledata.TableDataAction; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.icon.WarningIcon; import com.fr.general.ComparatorUtils; - +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.Icon; +import java.awt.Image; import java.text.Collator; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; /** @@ -138,10 +138,10 @@ public class TableDataNameObjectCreator extends NameObjectCreator { try { return clazzOfInitCase.newInstance(); } catch (InstantiationException | IllegalAccessException e1) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } catch (IllegalAccessException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return null; } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java index ffa79ba9c7..6be5657bbd 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java @@ -1,14 +1,13 @@ package com.fr.design.data.datapane.preview; -import com.fr.base.FRContext; import com.fr.cache.list.IntList; import com.fr.data.AbstractDataModel; import com.fr.data.impl.EmbeddedTableData.EmbeddedTDDataModel; import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.design.utils.DesignUtils; - import com.fr.general.data.DataModel; import com.fr.general.data.TableDataException; +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; @@ -35,7 +34,7 @@ public class PreviewTableModel extends AbstractTableModel { this.dataModel = createRowDataModel(rs, maxRowCount); } catch (TableDataException e) { // TODO Auto-generated catch block - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } else { this.dataModel = sourceResultSet; @@ -98,7 +97,7 @@ public class PreviewTableModel extends AbstractTableModel { try { return Integer.toString(column + 1) + ". " + dataModel.getColumnName(column) + checkType(column); } catch (TableDataException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); DesignUtils.errorMessage(e.getMessage()); return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"); } @@ -108,7 +107,7 @@ public class PreviewTableModel extends AbstractTableModel { try { return this.dataModel.getRowCount(); } catch (TableDataException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return 0; } } @@ -120,7 +119,7 @@ public class PreviewTableModel extends AbstractTableModel { } return dataModel.getColumnCount(); } catch (TableDataException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); DesignUtils.errorMessage(e.getMessage()); return 0; } @@ -130,7 +129,7 @@ public class PreviewTableModel extends AbstractTableModel { try { return dataModel.getValueAt(row, column); } catch (TableDataException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); DesignUtils.errorMessage(e.getMessage()); return ""; } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java index bfcba4aa2e..383a1f02aa 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java @@ -4,7 +4,6 @@ package com.fr.design.data.datapane.preview; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.TableData; import com.fr.data.TableDataSource; import com.fr.data.impl.DBTableData; @@ -308,7 +307,7 @@ public class PreviewTablePane extends BasicPane { int tatalColumn = Integer.parseInt(tatolColumnErrMessage.trim()); columnErrMessage = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tabledata_Preview_Warn_Text", choiceColumn + 1, tatalColumn); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return; } FineLoggerFactory.getLogger().error(exp.getMessage(), exp); @@ -402,7 +401,7 @@ public class PreviewTablePane extends BasicPane { fireLoadedListener(); } catch (Exception e) { if (!(e instanceof CancellationException)) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), e.getMessage(), null, 0, UIManager.getIcon("OptionPane.errorIcon")); } @@ -447,7 +446,7 @@ public class PreviewTablePane extends BasicPane { } } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } previewTablePane.fireLoadedListener(); previewTablePane.showWindow(DesignerContext.getDesignerFrame()).setVisible(true); @@ -468,7 +467,7 @@ public class PreviewTablePane extends BasicPane { try { previewTablePane.populateStoreDataSQL(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } tabPreviewpane.addTab(storeProcedureDataModels[i].getName(), previewTablePane); } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java index e475820a52..3241e0588b 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/sqlpane/SQLEditPane.java @@ -1 +1 @@ -package com.fr.design.data.datapane.sqlpane; import com.fr.base.FRContext; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.TableProcedure; import com.fr.design.actions.UpdateAction; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; import com.fr.general.ComparatorUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import java.awt.*; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.dnd.*; import java.awt.event.ActionEvent; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-5-2 * Time: 上午11:09 */ public class SQLEditPane extends RSyntaxTextArea { public static final boolean REQUEST_DROPTARGET = true; public static final boolean UNREQUEST_DROPTARGET = false; public SQLEditPane() { this(REQUEST_DROPTARGET); } public SQLEditPane(boolean requestDroptarget) { super(); setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_SQL); setAnimateBracketMatching(true); setAntiAliasingEnabled(true); setAutoIndentEnabled(true); setCodeFoldingEnabled(true); setUseSelectedTextColor(true); setCloseCurlyBraces(true); setBracketMatchingEnabled(true); setAntiAliasingEnabled(true); setCloseMarkupTags(true); setLineWrap(true); if (requestDroptarget) { new SQLPaneDropTarget(this); } } private static class SQLPaneDropTarget extends DropTargetAdapter { private TableProcedure sqlTable; public SQLPaneDropTarget(SQLEditPane sqlTextPane) { new DropTarget(sqlTextPane, this); } public void dragEnter(DropTargetDragEvent dtde) { dtde.acceptDrag(dtde.getDropAction()); } public void dragOver(DropTargetDragEvent dtde) { dtde.acceptDrag(dtde.getDropAction()); } public void drop(DropTargetDropEvent dtde) { Point p = dtde.getLocation(); DropTargetContext dtc = dtde.getDropTargetContext(); SQLEditPane jTextPane = (SQLEditPane) dtc.getComponent(); try { Transferable tr = dtde.getTransferable(); DataFlavor[] flavors = tr.getTransferDataFlavors(); for (int i = 0; i < flavors.length; i++) { if (!tr.isDataFlavorSupported(flavors[i])) { continue; } dtde.acceptDrop(dtde.getDropAction()); Object userObj = tr.getTransferData(flavors[i]); if (userObj instanceof TableProcedure) { this.sqlTable = (TableProcedure) userObj; JPopupMenu popupMenu = new JPopupMenu(); popupMenu.add(new NameAction(jTextPane, sqlTable).createMenuItem()); if (ComparatorUtils.equals(sqlTable.getType(), TableProcedure.PROCEDURE)) { popupMenu.add(new CallAction(jTextPane, sqlTable).createMenuItem()); } else { popupMenu.add(new SelectAction(jTextPane, sqlTable).createMenuItem()); } GUICoreUtils.showPopupMenu(popupMenu, jTextPane, (int) p.getX() + 1, (int) p.getY() + 1); } dtde.dropComplete(true); } dtde.rejectDrop(); } catch (Exception e) { dtde.rejectDrop(); } } class NameAction extends UpdateAction { private SQLEditPane sqlTextPane; private TableProcedure sqlTable; public NameAction(SQLEditPane sqlTextPane, TableProcedure sqlTable) { this.sqlTextPane = sqlTextPane; this.sqlTable = sqlTable; this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name")); this.setMnemonic('N'); this.setSmallIcon(null); } public void actionPerformed(ActionEvent evt) { if (sqlTable != null) { insertStringTo(sqlTextPane, sqlTable.toString()); } } } class SelectAction extends UpdateAction { private SQLEditPane sqlTextPane; private TableProcedure sqlTable; public SelectAction(SQLEditPane sqlTextPane, TableProcedure sqlTable) { this.sqlTextPane = sqlTextPane; this.sqlTable = sqlTable; this.setName("SELECT *"); this.setMnemonic('s'); this.setSmallIcon(null); } public void actionPerformed(ActionEvent evt) { //daniel: 添加参数 insertStringTo(sqlTextPane, DataCoreUtils.createSelectSQL(sqlTable.getSchema(), sqlTable.getName(), sqlTable.getDialect())); } } class CallAction extends UpdateAction { private SQLEditPane sqlTextPane; private TableProcedure sqlTable; public CallAction(SQLEditPane sqlTextPane, TableProcedure sqlTable) { this.sqlTextPane = sqlTextPane; this.sqlTable = sqlTable; this.setName("CALL PROCEDURE "); this.setMnemonic('s'); this.setSmallIcon(null); } public void actionPerformed(ActionEvent evt) { StringBuffer sBuf = new StringBuffer(); sBuf.append("{call "); if (sqlTable != null) { sBuf.append(sqlTable.toString()).append("()"); } sBuf.append('}'); insertStringTo(sqlTextPane, sBuf.toString()); } } private void insertStringTo(SQLEditPane sqlTextPane, String str) { Document document = sqlTextPane.getDocument(); try { document.insertString(sqlTextPane.getCaretPosition(), str, null); } catch (BadLocationException badLocationException) { FRContext.getLogger().error(badLocationException.getMessage(), badLocationException); } sqlTextPane.requestFocus(); } } } \ No newline at end of file +package com.fr.design.data.datapane.sqlpane; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.TableProcedure; import com.fr.design.actions.UpdateAction; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import javax.swing.JPopupMenu; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import java.awt.Point; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.dnd.DropTarget; import java.awt.dnd.DropTargetAdapter; import java.awt.dnd.DropTargetContext; import java.awt.dnd.DropTargetDragEvent; import java.awt.dnd.DropTargetDropEvent; import java.awt.event.ActionEvent; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-5-2 * Time: 上午11:09 */ public class SQLEditPane extends RSyntaxTextArea { public static final boolean REQUEST_DROPTARGET = true; public static final boolean UNREQUEST_DROPTARGET = false; public SQLEditPane() { this(REQUEST_DROPTARGET); } public SQLEditPane(boolean requestDroptarget) { super(); setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_SQL); setAnimateBracketMatching(true); setAntiAliasingEnabled(true); setAutoIndentEnabled(true); setCodeFoldingEnabled(true); setUseSelectedTextColor(true); setCloseCurlyBraces(true); setBracketMatchingEnabled(true); setAntiAliasingEnabled(true); setCloseMarkupTags(true); setLineWrap(true); if (requestDroptarget) { new SQLPaneDropTarget(this); } } private static class SQLPaneDropTarget extends DropTargetAdapter { private TableProcedure sqlTable; public SQLPaneDropTarget(SQLEditPane sqlTextPane) { new DropTarget(sqlTextPane, this); } public void dragEnter(DropTargetDragEvent dtde) { dtde.acceptDrag(dtde.getDropAction()); } public void dragOver(DropTargetDragEvent dtde) { dtde.acceptDrag(dtde.getDropAction()); } public void drop(DropTargetDropEvent dtde) { Point p = dtde.getLocation(); DropTargetContext dtc = dtde.getDropTargetContext(); SQLEditPane jTextPane = (SQLEditPane) dtc.getComponent(); try { Transferable tr = dtde.getTransferable(); DataFlavor[] flavors = tr.getTransferDataFlavors(); for (int i = 0; i < flavors.length; i++) { if (!tr.isDataFlavorSupported(flavors[i])) { continue; } dtde.acceptDrop(dtde.getDropAction()); Object userObj = tr.getTransferData(flavors[i]); if (userObj instanceof TableProcedure) { this.sqlTable = (TableProcedure) userObj; JPopupMenu popupMenu = new JPopupMenu(); popupMenu.add(new NameAction(jTextPane, sqlTable).createMenuItem()); if (ComparatorUtils.equals(sqlTable.getType(), TableProcedure.PROCEDURE)) { popupMenu.add(new CallAction(jTextPane, sqlTable).createMenuItem()); } else { popupMenu.add(new SelectAction(jTextPane, sqlTable).createMenuItem()); } GUICoreUtils.showPopupMenu(popupMenu, jTextPane, (int) p.getX() + 1, (int) p.getY() + 1); } dtde.dropComplete(true); } dtde.rejectDrop(); } catch (Exception e) { dtde.rejectDrop(); } } class NameAction extends UpdateAction { private SQLEditPane sqlTextPane; private TableProcedure sqlTable; public NameAction(SQLEditPane sqlTextPane, TableProcedure sqlTable) { this.sqlTextPane = sqlTextPane; this.sqlTable = sqlTable; this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name")); this.setMnemonic('N'); this.setSmallIcon(null); } public void actionPerformed(ActionEvent evt) { if (sqlTable != null) { insertStringTo(sqlTextPane, sqlTable.toString()); } } } class SelectAction extends UpdateAction { private SQLEditPane sqlTextPane; private TableProcedure sqlTable; public SelectAction(SQLEditPane sqlTextPane, TableProcedure sqlTable) { this.sqlTextPane = sqlTextPane; this.sqlTable = sqlTable; this.setName("SELECT *"); this.setMnemonic('s'); this.setSmallIcon(null); } public void actionPerformed(ActionEvent evt) { //daniel: 添加参数 insertStringTo(sqlTextPane, DataCoreUtils.createSelectSQL(sqlTable.getSchema(), sqlTable.getName(), sqlTable.getDialect())); } } class CallAction extends UpdateAction { private SQLEditPane sqlTextPane; private TableProcedure sqlTable; public CallAction(SQLEditPane sqlTextPane, TableProcedure sqlTable) { this.sqlTextPane = sqlTextPane; this.sqlTable = sqlTable; this.setName("CALL PROCEDURE "); this.setMnemonic('s'); this.setSmallIcon(null); } public void actionPerformed(ActionEvent evt) { StringBuffer sBuf = new StringBuffer(); sBuf.append("{call "); if (sqlTable != null) { sBuf.append(sqlTable.toString()).append("()"); } sBuf.append('}'); insertStringTo(sqlTextPane, sBuf.toString()); } } private void insertStringTo(SQLEditPane sqlTextPane, String str) { Document document = sqlTextPane.getDocument(); try { document.insertString(sqlTextPane.getCaretPosition(), str, null); } catch (BadLocationException badLocationException) { FineLoggerFactory.getLogger().error(badLocationException.getMessage(), badLocationException); } sqlTextPane.requestFocus(); } } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java index 42332f1cf2..1f3d60af02 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DecoratedTableDataPane.java @@ -1,18 +1,17 @@ package com.fr.design.data.tabledata.tabledatapane; -import com.fr.base.FRContext; import com.fr.data.impl.DecoratedTableData; import com.fr.design.condition.DSColumnLiteConditionPane; import com.fr.design.gui.ilist.CheckBoxList; import com.fr.design.gui.ilist.CheckBoxList.CheckBoxListSelectionChangeListener; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.file.TableDataConfig; - import com.fr.general.data.DataModel; import com.fr.general.data.TableDataException; +import com.fr.log.FineLoggerFactory; import com.fr.script.Calculator; -import java.awt.*; +import java.awt.BorderLayout; public class DecoratedTableDataPane extends AbstractTableDataPane implements CheckBoxListSelectionChangeListener { private CheckBoxList availableTableDataNameList; @@ -85,7 +84,7 @@ public class DecoratedTableDataPane extends AbstractTableDataPane { private JTable dataJTable ; @@ -214,7 +211,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane { try { in = url.getSourceStream(params); } catch (Throwable e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } if (in == null) { JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed"), @@ -907,7 +907,7 @@ public class FileTableDataPane extends AbstractTableDataPane { if (localFileRadioButton.isSelected()) { String localTextString = StringUtils.trimToNull(localText.getText()); if(StringUtils.isEmpty(localTextString)){ - FRContext.getLogger().info("The file path is empty."); + FineLoggerFactory.getLogger().info("The file path is empty."); loadedTreeModel(); return; } @@ -915,7 +915,7 @@ public class FileTableDataPane extends AbstractTableDataPane { } else { String urlTextString = StringUtils.trimToNull(urlText.getText()); if (StringUtils.isEmpty(urlTextString)){ - FRContext.getLogger().info("The url path is empty."); + FineLoggerFactory.getLogger().info("The url path is empty."); loadedTreeModel(); return; } @@ -932,13 +932,13 @@ public class FileTableDataPane extends AbstractTableDataPane { if (xmlReader != null) { xmlReader.readXMLObject(new XMLLayerReader(0)); } else { - FRContext.getLogger().info("The file is wrong or bad, can not create the XMLReader."); + FineLoggerFactory.getLogger().info("The file is wrong or bad, can not create the XMLReader."); loadedTreeModel(); } reader.close(); } } catch (Throwable e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); loadedTreeModel(); } if(treeModel.getChildCount(treeModel.getRoot()) == 1){ diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java index ae8fb5cf88..49c7dcd119 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java @@ -1,7 +1,6 @@ package com.fr.design.data.tabledata.wrapper; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.TableData; import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.StoreProcedure; @@ -14,9 +13,11 @@ import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.mainframe.DesignerContext; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; - -import javax.swing.*; +import javax.swing.Icon; +import javax.swing.JOptionPane; +import javax.swing.SwingWorker; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -146,7 +147,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper { } return true; } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return false; } @@ -217,7 +218,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper { } } catch (Exception e) { if (!(e instanceof CancellationException)) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), e.getMessage()); } loadingBar.close(); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java index d620caef2f..a0d0182acd 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java @@ -1,7 +1,6 @@ package com.fr.design.data.tabledata.wrapper; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.TableData; import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.StoreProcedure; @@ -11,7 +10,7 @@ import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.log.FineLoggerFactory; import com.fr.workspace.WorkContext; -import javax.swing.*; +import javax.swing.Icon; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -77,7 +76,7 @@ public final class StoreProcedureNameWrapper implements TableDataWrapper { try { procedureDataModel = DesignTableDataManager.createLazyDataModel(storeProcedure, needLoadingBar)[0]; } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java index 28c6628a6c..adce85f3b6 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java @@ -1,6 +1,5 @@ package com.fr.design.data.tabledata.wrapper; -import com.fr.base.FRContext; import com.fr.base.TableData; import com.fr.data.TableDataSource; import com.fr.data.impl.ClassTableData; @@ -123,7 +122,7 @@ public abstract class TableDataFactory { } datapane.populateBean(tabledata); // August:不管tabledata是刚刚新建的还是原来的,一律populate进去,如果出错就是代码写的不好 } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } return datapane; diff --git a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java index 193a5ea07e..7de66602a0 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java +++ b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java @@ -1,14 +1,28 @@ package com.fr.design.dialog; -import com.fr.base.FRContext; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; - - -import javax.swing.*; -import java.awt.*; -import java.awt.event.*; +import com.fr.log.FineLoggerFactory; + +import javax.swing.AbstractAction; +import javax.swing.ActionMap; +import javax.swing.BorderFactory; +import javax.swing.InputMap; +import javax.swing.JComponent; +import javax.swing.JDialog; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.KeyStroke; +import java.awt.BorderLayout; +import java.awt.Dialog; +import java.awt.FlowLayout; +import java.awt.Frame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import java.util.ArrayList; /** @@ -173,7 +187,7 @@ public abstract class UIDialog extends JDialog { l.doOk(); } catch (RuntimeException e) { isDoOKSucceed = false; - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } if (isDoOKSucceed) { diff --git a/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java b/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java index 24f1111f3b..3b1abe6f00 100644 --- a/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java +++ b/designer-base/src/main/java/com/fr/design/editor/editor/DateEditor.java @@ -3,13 +3,13 @@ */ package com.fr.design.editor.editor; -import com.fr.base.FRContext; import com.fr.design.gui.date.UIDatePicker; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.GeneralContext; +import com.fr.log.FineLoggerFactory; -import javax.swing.*; -import java.awt.*; +import javax.swing.JComponent; +import java.awt.BorderLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.text.ParseException; @@ -113,7 +113,7 @@ public class DateEditor extends Editor { try { return this.uiDatePicker.getSelectedDate(); } catch (ParseException parseException) { - FRContext.getLogger().error(parseException.getMessage(), parseException); + FineLoggerFactory.getLogger().error(parseException.getMessage(), parseException); return new Date(); } } @@ -132,7 +132,7 @@ public class DateEditor extends Editor { try { this.uiDatePicker.setSelectedDate(value); } catch (ParseException parseException) { - FRContext.getLogger().error(parseException.getMessage(), parseException); + FineLoggerFactory.getLogger().error(parseException.getMessage(), parseException); } } diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java b/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java index 3f7caf2fb9..0f78a562c5 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginFromStorePane.java @@ -1,11 +1,9 @@ package com.fr.design.extra; -import com.fr.base.FRContext; import com.fr.config.MarketConfig; import com.fr.design.extra.tradition.callback.UpdateOnlineCallback; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.ilable.UILabel; - import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; import com.fr.plugin.context.PluginMarker; @@ -15,7 +13,11 @@ import com.fr.plugin.manage.control.ProgressCallback; import com.fr.plugin.view.PluginView; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.JComponent; +import javax.swing.JFileChooser; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.SwingConstants; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.File; import java.util.List; @@ -206,7 +208,7 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane() { @Override diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index bff2080e46..2cf6efa910 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java @@ -19,7 +19,6 @@ import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; - import com.fr.log.FineLoggerFactory; import com.fr.parser.FRLexer; import com.fr.parser.FRParser; @@ -28,7 +27,17 @@ import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.script.Expression; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.DefaultListCellRenderer; +import javax.swing.DefaultListModel; +import javax.swing.Icon; +import javax.swing.JComponent; +import javax.swing.JList; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JPopupMenu; +import javax.swing.JTree; +import javax.swing.SwingUtilities; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.event.TreeSelectionEvent; @@ -38,7 +47,10 @@ import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.MutableTreeNode; import javax.swing.tree.TreePath; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; @@ -566,7 +578,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { try { expression = parser.parse(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); // alex:继续往下面走,expression为null时告知不合法公式 } @@ -1035,6 +1047,6 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { buffer.append("|"); buffer.append("\n"); } - FRContext.getLogger().debug(buffer.toString()); + FineLoggerFactory.getLogger().debug(buffer.toString()); } } diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java index 6e47237d83..3d0460e868 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java +++ b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java @@ -1,6 +1,5 @@ package com.fr.design.formula; -import com.fr.base.FRContext; import com.fr.file.FunctionConfig; import com.fr.function.AVERAGE; import com.fr.function.CHAR; @@ -78,9 +77,9 @@ public final class FunctionConstants { try { classFilePath = URLDecoder.decode(classFilePath, EncodeConstants.ENCODING_UTF_8); } catch (UnsupportedEncodingException e1) { - FRContext.getLogger().error(e1.getMessage(), e1); + FineLoggerFactory.getLogger().error(e1.getMessage(), e1); } - FRContext.getLogger().info("ClassFilePath:" + classFilePath); + FineLoggerFactory.getLogger().info("ClassFilePath:" + classFilePath); if (isCustomFormulaPath(classFilePath)) { continue; } @@ -193,7 +192,7 @@ public final class FunctionConstants { classNameList.add(entryName.substring(classPath.length() + 1)); } } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } else { File dir = new File(filePath); diff --git a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java index 6c99f24c68..597ddbfd66 100644 --- a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java @@ -8,7 +8,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; import com.fr.design.layout.FRGUIPaneFactory; - import com.fr.log.FineLoggerFactory; import com.fr.stable.EncodeConstants; import com.fr.stable.JavaCompileInfo; @@ -17,8 +16,13 @@ import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; import com.fr.workspace.WorkContext; -import javax.swing.*; -import java.awt.*; +import javax.swing.AbstractAction; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.SwingWorker; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.ByteArrayInputStream; @@ -51,7 +55,7 @@ public class JavaEditorPane extends BasicPane { try { return StableUtils.inputStream2String(in, EncodeConstants.ENCODING_UTF_8); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } return null; @@ -115,7 +119,7 @@ public class JavaEditorPane extends BasicPane { try { return new ByteArrayInputStream(WorkContext.getWorkResource().readFully(StableUtils.pathJoin(ProjectConstants.CLASSES_NAME, javaPath))); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return null; } diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/CommonShortCutHandlers.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/CommonShortCutHandlers.java index 42c0d2f2d0..c5d2a51dd9 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/CommonShortCutHandlers.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/CommonShortCutHandlers.java @@ -1,11 +1,11 @@ package com.fr.design.gui.controlpane; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.design.gui.ilist.JNameEdList; import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.Nameable; @@ -71,7 +71,7 @@ public class CommonShortCutHandlers { listControlPane.addNameable(newNameable, listControlPane.getSelectedIndex() + 1); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-base/src/main/java/com/fr/design/gui/core/CustomWidgetOption.java b/designer-base/src/main/java/com/fr/design/gui/core/CustomWidgetOption.java index 5cd22d6d49..e445e311f8 100644 --- a/designer-base/src/main/java/com/fr/design/gui/core/CustomWidgetOption.java +++ b/designer-base/src/main/java/com/fr/design/gui/core/CustomWidgetOption.java @@ -1,9 +1,9 @@ package com.fr.design.gui.core; -import javax.swing.Icon; - -import com.fr.base.FRContext; import com.fr.form.ui.Widget; +import com.fr.log.FineLoggerFactory; + +import javax.swing.Icon; public class CustomWidgetOption extends WidgetOption { private static final long serialVersionUID = -8144214820100962842L; @@ -23,9 +23,9 @@ public class CustomWidgetOption extends WidgetOption { Widget ins = cls.newInstance(); return ins ; } catch (InstantiationException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (IllegalAccessException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return null; diff --git a/designer-base/src/main/java/com/fr/design/gui/date/SingleObjectComboBoxModel.java b/designer-base/src/main/java/com/fr/design/gui/date/SingleObjectComboBoxModel.java index 193fe64196..788d1104e8 100644 --- a/designer-base/src/main/java/com/fr/design/gui/date/SingleObjectComboBoxModel.java +++ b/designer-base/src/main/java/com/fr/design/gui/date/SingleObjectComboBoxModel.java @@ -1,12 +1,11 @@ package com.fr.design.gui.date; -import java.text.SimpleDateFormat; -import java.util.Date; +import com.fr.log.FineLoggerFactory; import javax.swing.AbstractListModel; import javax.swing.ComboBoxModel; - -import com.fr.base.FRContext; +import java.text.SimpleDateFormat; +import java.util.Date; public class SingleObjectComboBoxModel extends AbstractListModel implements ComboBoxModel { private SimpleDateFormat dateFormat; @@ -35,7 +34,7 @@ public class SingleObjectComboBoxModel extends AbstractListModel implements Comb try { selectedDate = this.dateFormat.format((Date) anItem); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } else { try { diff --git a/designer-base/src/main/java/com/fr/design/gui/date/UIDatePicker.java b/designer-base/src/main/java/com/fr/design/gui/date/UIDatePicker.java index f01dd98630..aa9cabd498 100644 --- a/designer-base/src/main/java/com/fr/design/gui/date/UIDatePicker.java +++ b/designer-base/src/main/java/com/fr/design/gui/date/UIDatePicker.java @@ -1,19 +1,26 @@ package com.fr.design.gui.date; -import com.fr.base.FRContext; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBoxUI; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.general.ComparatorUtils; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JComboBox; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.SwingConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.plaf.ComboBoxUI; import javax.swing.plaf.basic.BasicComboPopup; import javax.swing.plaf.basic.ComboPopup; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Cursor; +import java.awt.LayoutManager; import java.awt.event.MouseEvent; import java.io.Serializable; import java.text.ParseException; @@ -213,7 +220,7 @@ public class UIDatePicker extends UIComboBox implements Serializable { calendarPanel.updateHMS(); } } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } else if (ComparatorUtils.equals(oldValue, Boolean.TRUE) && ComparatorUtils.equals(newValue, Boolean.FALSE)) { //HIDE diff --git a/designer-base/src/main/java/com/fr/design/gui/demo/LoadingPaneDemo.java b/designer-base/src/main/java/com/fr/design/gui/demo/LoadingPaneDemo.java index ec59dd3f4b..2eb93ad3e0 100644 --- a/designer-base/src/main/java/com/fr/design/gui/demo/LoadingPaneDemo.java +++ b/designer-base/src/main/java/com/fr/design/gui/demo/LoadingPaneDemo.java @@ -3,16 +3,15 @@ */ package com.fr.design.gui.demo; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import javax.swing.JPanel; - -import com.fr.base.FRContext; +import com.fr.design.dialog.BasicDialog; import com.fr.design.gui.frpane.LoadingBasicPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.dialog.BasicDialog; +import com.fr.log.FineLoggerFactory; + +import javax.swing.JPanel; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; /** * Created by IntelliJ IDEA. @@ -35,7 +34,7 @@ public class LoadingPaneDemo extends JPanel { try { Thread.sleep(500); } catch (InterruptedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } container.add(new UIButton(i + "adfadwdadawdwad")); } diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/LoadingBasicPaneTest.java b/designer-base/src/main/java/com/fr/design/gui/frpane/LoadingBasicPaneTest.java index 372a37be86..7c454ad715 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/LoadingBasicPaneTest.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/LoadingBasicPaneTest.java @@ -3,11 +3,11 @@ */ package com.fr.design.gui.frpane; -import javax.swing.JPanel; - -import com.fr.base.FRContext; -import com.fr.design.gui.ibutton.UIButton; import com.fr.design.dialog.BasicDialog; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.log.FineLoggerFactory; + +import javax.swing.JPanel; /** @@ -23,7 +23,7 @@ public class LoadingBasicPaneTest { try { Thread.sleep(500); } catch (InterruptedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } container.add(new UIButton(i + "adfadwdadawdwad")); } diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UIBubbleFloatPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UIBubbleFloatPane.java index 0a2325cebf..c41cc9f7ac 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/UIBubbleFloatPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UIBubbleFloatPane.java @@ -1,19 +1,32 @@ package com.fr.design.gui.frpane; -import java.awt.*; -import java.awt.event.AWTEventListener; -import java.awt.event.MouseEvent; - -import javax.swing.JComponent; -import javax.swing.JPanel; -import javax.swing.SwingUtilities; - -import com.fr.base.FRContext; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.UIDialog; +import com.fr.log.FineLoggerFactory; import com.fr.stable.Constants; import com.sun.awt.AWTUtilities; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.SwingUtilities; +import java.awt.AWTEvent; +import java.awt.BasicStroke; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dialog; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Point; +import java.awt.Polygon; +import java.awt.Rectangle; +import java.awt.Shape; +import java.awt.Stroke; +import java.awt.Toolkit; +import java.awt.Window; +import java.awt.event.AWTEventListener; +import java.awt.event.MouseEvent; + /** * @author Jerry * 非模态悬浮对话框,气泡形状 @@ -300,7 +313,7 @@ public abstract class UIBubbleFloatPane extends BasicBeanPane { try { AWTUtilities.setWindowShape(CustomShapedDialog.this, this.getCustomShap()); } catch (UnsupportedOperationException e) { - FRContext.getLogger().info("Not support"); + FineLoggerFactory.getLogger().info("Not support"); } final JPanel contentPane = (JPanel) this.getContentPane(); this.setLayout(null); diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBoxTest.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBoxTest.java index 8fdb3dafe3..ec6e0f7479 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBoxTest.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/ExtendedComboBoxTest.java @@ -1,18 +1,17 @@ package com.fr.design.gui.icombobox; -import java.awt.BorderLayout; +import com.fr.log.FineLoggerFactory; import javax.swing.JFrame; import javax.swing.UIManager; - -import com.fr.base.FRContext; +import java.awt.BorderLayout; public class ExtendedComboBoxTest { public static void main(String[] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } final ExtendedComboBox cb = new ExtendedComboBox( diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBoxTest.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBoxTest.java index 157a6e8933..4016a263ce 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBoxTest.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBoxTest.java @@ -3,19 +3,18 @@ */ package com.fr.design.gui.icombobox; -import java.awt.BorderLayout; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.log.FineLoggerFactory; +import com.sun.java.swing.plaf.windows.WindowsLookAndFeel; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; - -import com.fr.base.FRContext; -import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.layout.FRGUIPaneFactory; -import com.sun.java.swing.plaf.windows.WindowsLookAndFeel; +import java.awt.BorderLayout; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; /** * @author richer @@ -26,7 +25,7 @@ public class LazyComboBoxTest { try { UIManager.setLookAndFeel(new WindowsLookAndFeel()); } catch (UnsupportedLookAndFeelException e1) { - FRContext.getLogger().error(e1.getMessage(), e1); + FineLoggerFactory.getLogger().error(e1.getMessage(), e1); } JFrame f = new JFrame(); JPanel p = (JPanel) f.getContentPane(); @@ -40,7 +39,7 @@ public class LazyComboBoxTest { try { Thread.sleep(3000); } catch (InterruptedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return m; } diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java index e43a68f22b..06a4f54800 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java @@ -1,7 +1,6 @@ package com.fr.design.gui.ilist; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.TableProcedure; import com.fr.data.core.db.dialect.base.key.check.DataBaseDetail; @@ -13,11 +12,17 @@ import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.dnd.SerializableTransferable; import com.fr.file.ConnectionConfig; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.DefaultListCellRenderer; +import javax.swing.DefaultListModel; +import javax.swing.Icon; +import javax.swing.JList; +import javax.swing.ListSelectionModel; +import javax.swing.SwingWorker; +import java.awt.Component; import java.awt.dnd.DnDConstants; import java.awt.dnd.DragGestureEvent; import java.awt.dnd.DragGestureListener; @@ -111,7 +116,7 @@ public class TableViewList extends UIList { } catch (Exception e) { if (!(e instanceof InterruptedException) && !(e instanceof CancellationException)) { TableViewList.this.setModel(failed); - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java index aa44b14ac5..acea8dcc57 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableModelAdapter.java @@ -1,8 +1,8 @@ package com.fr.design.gui.itableeditorpane; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.design.mainframe.DesignerContext; +import com.fr.log.FineLoggerFactory; import javax.swing.JOptionPane; import javax.swing.JTable; @@ -166,7 +166,7 @@ public abstract class UITableModelAdapter extends AbstractTabl try { table.getCellEditor().stopCellEditing(); } catch (Exception ee) { - FRContext.getLogger().error(ee.getMessage(), ee); + FineLoggerFactory.getLogger().error(ee.getMessage(), ee); } } } @@ -241,7 +241,7 @@ public abstract class UITableModelAdapter extends AbstractTabl try { table.getCellEditor().stopCellEditing(); } catch (Exception ee) { - FRContext.getLogger().error(ee.getMessage(), ee); + FineLoggerFactory.getLogger().error(ee.getMessage(), ee); } } if (getRowCount() < 1 || selectedRow.length < 0) { diff --git a/designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTipUI.java b/designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTipUI.java index 0e94524a93..da32ae09a5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTipUI.java +++ b/designer-base/src/main/java/com/fr/design/gui/itooltip/MultiLineToolTipUI.java @@ -1,5 +1,12 @@ package com.fr.design.gui.itooltip; +import com.fr.base.GraphHelper; +import com.fr.log.FineLoggerFactory; + +import javax.swing.JComponent; +import javax.swing.JToolTip; +import javax.swing.SwingUtilities; +import javax.swing.plaf.ToolTipUI; import java.awt.Color; import java.awt.Dimension; import java.awt.FontMetrics; @@ -13,14 +20,6 @@ import java.io.StringReader; import java.util.Enumeration; import java.util.Vector; -import javax.swing.JComponent; -import javax.swing.JToolTip; -import javax.swing.SwingUtilities; -import javax.swing.plaf.ToolTipUI; - -import com.fr.base.FRContext; -import com.fr.base.GraphHelper; - public class MultiLineToolTipUI extends ToolTipUI { private String[] strs; @@ -65,7 +64,7 @@ public class MultiLineToolTipUI extends ToolTipUI { v.addElement(line); } } catch (IOException ex) { - FRContext.getLogger().error(ex.getMessage(), ex); + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); } int lines = v.size(); if (lines < 1) { diff --git a/designer-base/src/main/java/com/fr/design/gui/itooltip/UIToolTip.java b/designer-base/src/main/java/com/fr/design/gui/itooltip/UIToolTip.java index 2918975558..8db73f8e66 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itooltip/UIToolTip.java +++ b/designer-base/src/main/java/com/fr/design/gui/itooltip/UIToolTip.java @@ -1,12 +1,22 @@ package com.fr.design.gui.itooltip; -import com.fr.base.FRContext; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; -import javax.swing.*; -import java.awt.*; -import java.awt.event.*; +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.JToolTip; +import javax.swing.ToolTipManager; +import java.awt.AWTException; +import java.awt.Container; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseMotionAdapter; +import java.awt.event.MouseWheelEvent; +import java.awt.event.MouseWheelListener; /** * Created with IntelliJ IDEA. @@ -39,7 +49,7 @@ public class UIToolTip extends JToolTip{ } }); } catch (AWTException e) { - FRContext.getLogger().error(e.getMessage(),e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } this.addMouseWheelListener(new MouseWheelListener() { diff --git a/designer-base/src/main/java/com/fr/design/gui/itooltip/UIToolTipUI.java b/designer-base/src/main/java/com/fr/design/gui/itooltip/UIToolTipUI.java index dc6d2a6bc2..863ebaa2ca 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itooltip/UIToolTipUI.java +++ b/designer-base/src/main/java/com/fr/design/gui/itooltip/UIToolTipUI.java @@ -1,11 +1,21 @@ package com.fr.design.gui.itooltip; -import com.fr.base.FRContext; import com.fr.base.GraphHelper; +import com.fr.log.FineLoggerFactory; -import javax.swing.*; +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.JComponent; +import javax.swing.JToolTip; +import javax.swing.SwingUtilities; import javax.swing.plaf.ToolTipUI; -import java.awt.*; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FontMetrics; +import java.awt.GradientPaint; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; import java.awt.geom.GeneralPath; import java.io.BufferedReader; import java.io.IOException; @@ -98,7 +108,7 @@ public class UIToolTipUI extends ToolTipUI { v.addElement(line); } } catch (IOException ex) { - FRContext.getLogger().error(ex.getMessage(), ex); + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); } int lines = v.size(); if (lines < 1) { diff --git a/designer-base/src/main/java/com/fr/design/icon/LockIcon.java b/designer-base/src/main/java/com/fr/design/icon/LockIcon.java index f0473c49b7..934d53b08e 100644 --- a/designer-base/src/main/java/com/fr/design/icon/LockIcon.java +++ b/designer-base/src/main/java/com/fr/design/icon/LockIcon.java @@ -1,17 +1,16 @@ package com.fr.design.icon; +import com.fr.base.BaseUtils; +import com.fr.log.FineLoggerFactory; + +import javax.swing.GrayFilter; +import javax.swing.ImageIcon; import java.awt.Component; import java.awt.Graphics; import java.awt.Image; import java.awt.MediaTracker; import java.awt.image.ImageObserver; -import javax.swing.GrayFilter; -import javax.swing.ImageIcon; - -import com.fr.base.BaseUtils; -import com.fr.base.FRContext; - public class LockIcon extends ImageIcon { private final static Image lockImage = BaseUtils.readImage("/com/fr/design/images/gui/locked.gif"); @@ -55,7 +54,7 @@ public class LockIcon extends ImageIcon { try { tracker.waitForID(0, 0); } catch (InterruptedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } loadStatus = tracker.statusID(0, false); diff --git a/designer-base/src/main/java/com/fr/design/icon/WarningIcon.java b/designer-base/src/main/java/com/fr/design/icon/WarningIcon.java index 92b4b0d4ac..9b22b40358 100644 --- a/designer-base/src/main/java/com/fr/design/icon/WarningIcon.java +++ b/designer-base/src/main/java/com/fr/design/icon/WarningIcon.java @@ -1,17 +1,16 @@ package com.fr.design.icon; +import com.fr.base.BaseUtils; +import com.fr.log.FineLoggerFactory; + +import javax.swing.GrayFilter; +import javax.swing.ImageIcon; import java.awt.Component; import java.awt.Graphics; import java.awt.Image; import java.awt.MediaTracker; import java.awt.image.ImageObserver; -import javax.swing.GrayFilter; -import javax.swing.ImageIcon; - -import com.fr.base.BaseUtils; -import com.fr.base.FRContext; - /** * 警告图片 * @@ -59,7 +58,7 @@ public class WarningIcon extends ImageIcon { try { tracker.waitForID(0, 0); } catch (InterruptedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } tracker.statusID(0, false); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 8525023799..415ff948c6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -636,7 +636,7 @@ public abstract class JTemplate> try { file.mkfile(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } @@ -666,7 +666,7 @@ public abstract class JTemplate> try { this.getTarget().export(editingFILE.asOutputStream()); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), e.getMessage(), "Save Error", JOptionPane.ERROR_MESSAGE); return false; } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/dnd/ArrayListTransferHandler.java b/designer-base/src/main/java/com/fr/design/mainframe/dnd/ArrayListTransferHandler.java index 48e52bb9a8..daf3f802fc 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/dnd/ArrayListTransferHandler.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/dnd/ArrayListTransferHandler.java @@ -3,18 +3,17 @@ */ package com.fr.design.mainframe.dnd; -import java.awt.datatransfer.DataFlavor; -import java.awt.datatransfer.Transferable; -import java.awt.datatransfer.UnsupportedFlavorException; -import java.io.IOException; -import java.util.ArrayList; +import com.fr.log.FineLoggerFactory; import javax.swing.DefaultListModel; import javax.swing.JComponent; import javax.swing.JList; import javax.swing.TransferHandler; - -import com.fr.base.FRContext; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.Transferable; +import java.awt.datatransfer.UnsupportedFlavorException; +import java.io.IOException; +import java.util.ArrayList; /** * Used for JList. @@ -33,7 +32,7 @@ public class ArrayListTransferHandler extends TransferHandler { try { localArrayListFlavor = new DataFlavor(localArrayListType); } catch (ClassNotFoundException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } serialArrayListFlavor = new DataFlavor(ArrayList.class, "ArrayList"); @@ -55,10 +54,10 @@ public class ArrayListTransferHandler extends TransferHandler { return false; } } catch (UnsupportedFlavorException ufe) { - FRContext.getLogger().error(ufe.getMessage(), ufe); + FineLoggerFactory.getLogger().error(ufe.getMessage(), ufe); return false; } catch (IOException ioe) { - FRContext.getLogger().error(ioe.getMessage(), ioe); + FineLoggerFactory.getLogger().error(ioe.getMessage(), ioe); return false; } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/dnd/ArrayListTransferable.java b/designer-base/src/main/java/com/fr/design/mainframe/dnd/ArrayListTransferable.java index e50c40bc53..1a65467de0 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/dnd/ArrayListTransferable.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/dnd/ArrayListTransferable.java @@ -1,13 +1,13 @@ package com.fr.design.mainframe.dnd; +import com.fr.log.FineLoggerFactory; + import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.util.ArrayList; import java.util.List; -import com.fr.base.FRContext; - public class ArrayListTransferable implements Transferable { private DataFlavor localArrayListFlavor; private DataFlavor serialArrayListFlavor; @@ -21,7 +21,7 @@ public class ArrayListTransferable implements Transferable { try { localArrayListFlavor = new DataFlavor(localArrayListType); } catch (ClassNotFoundException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } serialArrayListFlavor = new DataFlavor(ArrayList.class, "ArrayList"); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java b/designer-base/src/main/java/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java index c1ca5d6bb1..57ff2ce8a9 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java @@ -7,10 +7,10 @@ import com.fr.design.DesignerEnvManager; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.SiteCenterToken; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralUtils; import com.fr.general.IOUtils; -import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; @@ -132,11 +132,11 @@ public class TemplateInfoCollector implements Serializable, } xmlInputStream.close(); } catch (FileNotFoundException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (XMLStreamException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/renderer/IconCellRenderer.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/renderer/IconCellRenderer.java index 2f7fd272d7..12831a9f95 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/renderer/IconCellRenderer.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/renderer/IconCellRenderer.java @@ -1,11 +1,13 @@ package com.fr.design.mainframe.widget.renderer; -import java.awt.*; - -import com.fr.base.FRContext; import com.fr.base.Icon; import com.fr.base.IconManager; import com.fr.form.ui.WidgetInfoConfig; +import com.fr.log.FineLoggerFactory; + +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; public class IconCellRenderer extends GenericCellRenderer { private Image img; @@ -22,7 +24,7 @@ public class IconCellRenderer extends GenericCellRenderer { this.setImage(icon == null ? null : icon.getImage()); } catch (CloneNotSupportedException e) { this.setImage(null); - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java b/designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java index 2a4342a7dc..22ea7aa359 100644 --- a/designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java +++ b/designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java @@ -1,6 +1,5 @@ package com.fr.design.module; -import com.fr.base.FRContext; import com.fr.base.chart.BaseChartCollection; import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.MiddleChartComponent; @@ -15,9 +14,12 @@ import com.fr.design.parameter.HierarchyTreePane; import com.fr.design.parameter.ParameterDesignerProvider; import com.fr.design.parameter.ParameterReader; import com.fr.form.ui.Widget; +import com.fr.log.FineLoggerFactory; import com.fr.stable.StableUtils; -import java.awt.*; +import java.awt.Dialog; +import java.awt.Frame; +import java.awt.Window; import java.lang.reflect.Constructor; import java.util.ArrayList; @@ -122,7 +124,7 @@ public class DesignModuleFactory { try { return instance.paraPropertyPane.newInstance(); } catch (Exception e) { - FRContext.getLogger().error("Error in Para PropertyPane"); + FineLoggerFactory.getLogger().error("Error in Para PropertyPane"); } } return null; @@ -137,7 +139,7 @@ public class DesignModuleFactory { try { return (ParameterDesignerProvider) instance.formParaDesigner.newInstance(); } catch (Exception e) { - FRContext.getLogger().error("error in form para designer"); + FineLoggerFactory.getLogger().error("error in form para designer"); } } return null; @@ -172,9 +174,9 @@ public class DesignModuleFactory { bcc = instance.chartComponentClass.newInstance(); bcc.populate(collection); } catch (InstantiationException e) { - FRContext.getLogger().error("Error in ChartComponent instant", e); + FineLoggerFactory.getLogger().error("Error in ChartComponent instant", e); } catch (IllegalAccessException e) { - FRContext.getLogger().error("Error in Access", e); + FineLoggerFactory.getLogger().error("Error in Access", e); } } return bcc; @@ -195,7 +197,7 @@ public class DesignModuleFactory { } return c.newInstance(window); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return null; } diff --git a/designer-base/src/main/java/com/fr/design/style/BorderPane.java b/designer-base/src/main/java/com/fr/design/style/BorderPane.java index a997b3673c..aa1185f5de 100644 --- a/designer-base/src/main/java/com/fr/design/style/BorderPane.java +++ b/designer-base/src/main/java/com/fr/design/style/BorderPane.java @@ -5,7 +5,6 @@ package com.fr.design.style; import com.fr.base.BaseUtils; import com.fr.base.CellBorderStyle; -import com.fr.base.FRContext; import com.fr.base.GraphHelper; import com.fr.base.Style; import com.fr.design.dialog.BasicPane; @@ -16,6 +15,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.style.color.ColorSelectBox; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.log.FineLoggerFactory; import com.fr.stable.Constants; import com.fr.stable.CoreConstants; @@ -243,7 +243,7 @@ public class BorderPane extends BasicPane { this.cellBorderStyle = (CellBorderStyle)cellBorderStyle.clone(); } } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } this.insideMode = insideMode; // ben 这里也有问题,CellBorderStyle的 linestyle和color很可能不止一种 diff --git a/designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java b/designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java index 4de2705715..8a68593efe 100644 --- a/designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/BrowseUtils.java @@ -1,6 +1,5 @@ package com.fr.design.utils; -import com.fr.base.FRContext; import com.fr.log.FineLoggerFactory; import com.fr.stable.OperatingSystem; import com.fr.stable.StringUtils; @@ -43,7 +42,7 @@ public class BrowseUtils { public static void browser(String url) { if (StringUtils.isEmpty(url)) { - FRContext.getLogger().info("The URL is empty!"); + FineLoggerFactory.getLogger().info("The URL is empty!"); return; } try { diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index 240176eef7..8687461a1c 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -1,7 +1,6 @@ package com.fr.design.utils; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.FeedBackInfo; import com.fr.base.ServerConfig; import com.fr.design.DesignerEnvManager; @@ -22,8 +21,11 @@ import com.fr.stable.StringUtils; import com.fr.start.ServerStarter; import com.fr.workspace.WorkContext; -import javax.swing.*; -import java.awt.*; +import javax.swing.JOptionPane; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import java.awt.Desktop; +import java.awt.Font; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; @@ -95,13 +97,13 @@ public class DesignUtils { writer.flush(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } finally { try { writer.close(); socket.close(); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } @@ -237,7 +239,7 @@ public class DesignUtils { //比如想在中文或英文系统里用韩文设计器 guiFRFont = getNamedFont("Dialog"); if (!guiFRFont.canDisplay(displayChar)) { - FRContext.getLogger().error(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_SimSun_Not_Found")); + FineLoggerFactory.getLogger().error(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_SimSun_Not_Found")); } } } @@ -284,7 +286,7 @@ public class DesignUtils { String value = values[i].replaceAll("\\\\", "/"); segs[i] = URLEncoder.encode(CodeUtils.cjkEncode(names[i]), EncodeConstants.ENCODING_UTF_8) + "=" + URLEncoder.encode(CodeUtils.cjkEncode(value), "UTF-8"); } catch (UnsupportedEncodingException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } String postfixOfUri = (segs.length > 0 ? "?" + StableUtils.join(segs, "&") : StringUtils.EMPTY); @@ -294,7 +296,7 @@ public class DesignUtils { String urlPath = getWebBrowserPath(); Desktop.getDesktop().browse(new URI(urlPath + baseRoute + postfixOfUri)); } catch (Exception e) { - FRContext.getLogger().error("cannot open the url Successful", e); + FineLoggerFactory.getLogger().error("cannot open the url Successful", e); } } else { try { diff --git a/designer-base/src/main/java/com/fr/design/widget/EventCreator.java b/designer-base/src/main/java/com/fr/design/widget/EventCreator.java index 38a55865ad..4fdfd7ed80 100644 --- a/designer-base/src/main/java/com/fr/design/widget/EventCreator.java +++ b/designer-base/src/main/java/com/fr/design/widget/EventCreator.java @@ -1,12 +1,12 @@ package com.fr.design.widget; -import com.fr.base.FRContext; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.controlpane.NameableSelfCreator; import com.fr.design.gui.controlpane.UnrepeatedNameHelper; import com.fr.design.gui.ilist.ListModelElement; import com.fr.form.event.Listener; import com.fr.general.NameObject; +import com.fr.log.FineLoggerFactory; import com.fr.report.web.util.ReportEngineEventMapping; import com.fr.stable.Nameable; @@ -43,7 +43,7 @@ public class EventCreator extends NameableSelfCreator { String localeKey = ReportEngineEventMapping.getLocaleName(eventName); return com.fr.design.i18n.Toolkit.i18nText(localeKey); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return eventName; } } diff --git a/designer-base/src/main/java/com/fr/file/FileFILE.java b/designer-base/src/main/java/com/fr/file/FileFILE.java index d5a9beb42e..5331cd7785 100644 --- a/designer-base/src/main/java/com/fr/file/FileFILE.java +++ b/designer-base/src/main/java/com/fr/file/FileFILE.java @@ -201,7 +201,7 @@ public class FileFILE implements FILE { OutputStream out; try { StableUtils.makesureFileExist(file); - out = new FileOutputStream(file); + out = new FileOutputStream(file, true); } catch (Exception e) { throw SessionLocalManager.createLogPackedException(e); } diff --git a/designer-base/src/main/java/com/fr/start/Demo.java b/designer-base/src/main/java/com/fr/start/Demo.java index 7fb8c440b0..bac5a9b0f0 100644 --- a/designer-base/src/main/java/com/fr/start/Demo.java +++ b/designer-base/src/main/java/com/fr/start/Demo.java @@ -1,7 +1,7 @@ package com.fr.start; -import com.fr.base.FRContext; +import com.fr.log.FineLoggerFactory; import com.fr.stable.OperatingSystem; import com.fr.stable.StableUtils; @@ -11,7 +11,7 @@ public class Demo { public static void main(String[] args) { String installHome = StableUtils.getInstallHome(); if (installHome == null) { - FRContext.getLogger().error("Can not find the install home, please check it."); + FineLoggerFactory.getLogger().error("Can not find the install home, please check it."); return; } @@ -29,7 +29,7 @@ public class Demo { try { builder.start(); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } else { // ProcessBuilder这种方式在window下报错:系统找不到指定文件 @@ -37,7 +37,7 @@ public class Demo { try { rt.exec(executorPath); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-base/src/main/java/com/fr/start/StartDocURL.java b/designer-base/src/main/java/com/fr/start/StartDocURL.java index fdf7f5f916..58de885656 100644 --- a/designer-base/src/main/java/com/fr/start/StartDocURL.java +++ b/designer-base/src/main/java/com/fr/start/StartDocURL.java @@ -1,11 +1,11 @@ package com.fr.start; +import com.fr.log.FineLoggerFactory; +import com.fr.stable.StableUtils; + import java.awt.Desktop; import java.net.URI; -import com.fr.base.FRContext; -import com.fr.stable.StableUtils; - /** * 从windows开始菜单点击exe文件启动html格式的帮助文档, @@ -20,7 +20,7 @@ public class StartDocURL { public static void main(String[] args) { //p:必须有路径的URL存在 if(args == null || args.length < 1) { - FRContext.getLogger().error( + FineLoggerFactory.getLogger().error( "Can not find the install home, please check it."); return; } @@ -33,7 +33,7 @@ public class StartDocURL { } else { String iHome = StableUtils.getInstallHome(); if (iHome == null) { - FRContext.getLogger().error( + FineLoggerFactory.getLogger().error( "Can not find the install home, please check it."); return; } @@ -42,7 +42,7 @@ public class StartDocURL { Desktop.getDesktop().open(new java.io.File(iHome + args[0])); } } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/start/server/ServerManageFrame.java b/designer-base/src/main/java/com/fr/start/server/ServerManageFrame.java index 3b15071790..ff183b7547 100644 --- a/designer-base/src/main/java/com/fr/start/server/ServerManageFrame.java +++ b/designer-base/src/main/java/com/fr/start/server/ServerManageFrame.java @@ -1,17 +1,20 @@ package com.fr.start.server; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.log.FineLoggerFactory; - -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.SwingConstants; +import java.awt.BorderLayout; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -32,7 +35,7 @@ public class ServerManageFrame extends JFrame { try { serverManageFrame.checkButtonEnabled(); } catch(Exception exp) { - FRContext.getLogger().error(exp.getMessage()); + FineLoggerFactory.getLogger().error(exp.getMessage()); } return serverManageFrame; @@ -77,7 +80,7 @@ public class ServerManageFrame extends JFrame { FineEmbedServer.start(); checkButtonEnabled(); } catch(Exception exp) { - FRContext.getLogger().error(exp.getMessage()); + FineLoggerFactory.getLogger().error(exp.getMessage()); } } }); @@ -94,7 +97,7 @@ public class ServerManageFrame extends JFrame { FineEmbedServer.stop(); checkButtonEnabled(); } catch(Exception exp) { - FRContext.getLogger().error(exp.getMessage()); + FineLoggerFactory.getLogger().error(exp.getMessage()); } } }); @@ -120,7 +123,7 @@ public class ServerManageFrame extends JFrame { // try { // desktop.open(); // } catch(Exception exp) { -// FRContext.getLogger().error(exp.getMessage()); +// FineLoggerFactory.getLogger().error(exp.getMessage()); // } // } // }); diff --git a/designer-base/src/main/java/com/fr/start/server/ServerTray.java b/designer-base/src/main/java/com/fr/start/server/ServerTray.java index 01cfc53fc6..f6dede2955 100644 --- a/designer-base/src/main/java/com/fr/start/server/ServerTray.java +++ b/designer-base/src/main/java/com/fr/start/server/ServerTray.java @@ -1,13 +1,17 @@ package com.fr.start.server; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.event.Event; import com.fr.event.EventDispatcher; import com.fr.event.ListenerAdaptor; - - -import java.awt.*; +import com.fr.log.FineLoggerFactory; + +import java.awt.AWTException; +import java.awt.Image; +import java.awt.MenuItem; +import java.awt.PopupMenu; +import java.awt.SystemTray; +import java.awt.TrayIcon; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; @@ -61,7 +65,7 @@ public class ServerTray { try { FineEmbedServer.start(); } catch (Exception exp) { - FRContext.getLogger().error(exp.getMessage(), exp); + FineLoggerFactory.getLogger().error(exp.getMessage(), exp); } } }; @@ -72,7 +76,7 @@ public class ServerTray { try { FineEmbedServer.stop(); } catch (Throwable exp) { - FRContext.getLogger().error(exp.getMessage(), exp); + FineLoggerFactory.getLogger().error(exp.getMessage(), exp); } } }; @@ -168,7 +172,7 @@ public class ServerTray { serverManageFrame.repaint(); } } catch (Exception exp) { - FRContext.getLogger().error(exp.getMessage(), exp); + FineLoggerFactory.getLogger().error(exp.getMessage(), exp); } } diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartAxisFactory.java b/designer-chart/src/main/java/com/fr/design/chart/ChartAxisFactory.java index 81a7d77159..178bca370a 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartAxisFactory.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartAxisFactory.java @@ -1,12 +1,17 @@ package com.fr.design.chart; -import com.fr.base.FRContext; import com.fr.chart.chartattr.Axis; import com.fr.chart.chartattr.CategoryAxis; import com.fr.chart.chartattr.RadarAxis; import com.fr.chart.chartattr.ValueAxis; -import com.fr.design.mainframe.chart.gui.style.axis.*; +import com.fr.design.mainframe.chart.gui.style.axis.ChartAxisUsePane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartCategoryPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartPercentValuePane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartRadarPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartSecondValuePane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartValuePane; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; import java.util.HashMap; import java.util.Map; @@ -45,10 +50,8 @@ public class ChartAxisFactory { Class cls = map.get(clsName); try { return cls.newInstance(); - } catch (InstantiationException e) { - FRContext.getLogger().error(e.getMessage(), e); - } catch (IllegalAccessException e) { - FRContext.getLogger().error(e.getMessage(), e); + } catch (InstantiationException | IllegalAccessException e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return new ChartCategoryPane(); } diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartPlotFactory.java b/designer-chart/src/main/java/com/fr/design/chart/ChartPlotFactory.java index e9c475c5bb..82244e0a0d 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartPlotFactory.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartPlotFactory.java @@ -1,10 +1,55 @@ package com.fr.design.chart; -import com.fr.base.FRContext; -import com.fr.chart.chartattr.*; -import com.fr.design.chart.axis.*; -import com.fr.design.chart.series.SeriesCondition.dlp.*; -import com.fr.design.mainframe.chart.gui.style.axis.*; +import com.fr.chart.chartattr.Area3DPlot; +import com.fr.chart.chartattr.AreaPlot; +import com.fr.chart.chartattr.Bar2DPlot; +import com.fr.chart.chartattr.Bar3DPlot; +import com.fr.chart.chartattr.BubblePlot; +import com.fr.chart.chartattr.CustomPlot; +import com.fr.chart.chartattr.FunnelPlot; +import com.fr.chart.chartattr.GanttPlot; +import com.fr.chart.chartattr.LinePlot; +import com.fr.chart.chartattr.MapPlot; +import com.fr.chart.chartattr.MeterBluePlot; +import com.fr.chart.chartattr.MeterPlot; +import com.fr.chart.chartattr.Pie3DPlot; +import com.fr.chart.chartattr.PiePlot; +import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartattr.RadarPlot; +import com.fr.chart.chartattr.RangePlot; +import com.fr.chart.chartattr.StockPlot; +import com.fr.chart.chartattr.XYScatterPlot; +import com.fr.design.chart.axis.BinaryChartStyleAxisPane; +import com.fr.design.chart.axis.ChartStyleAxisPane; +import com.fr.design.chart.axis.CustomChartStyleAxisPane; +import com.fr.design.chart.axis.GanntChartStyleAxisPane; +import com.fr.design.chart.axis.RadarChartStyleAxisPane; +import com.fr.design.chart.axis.TernaryChartStyleAxisPane; +import com.fr.design.chart.axis.ValueChartStyleAxisPane; +import com.fr.design.chart.axis.XYChartStyleAxisPane; +import com.fr.design.chart.series.SeriesCondition.dlp.AreaDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.Bar2DDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.BubbleDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.DataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.FunnelDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.LineDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.MapDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.MeterDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.PieDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.RadarDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.RangeDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.StockDataLabelPane; +import com.fr.design.chart.series.SeriesCondition.dlp.XYDataLabelPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartAxisUsePane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartCategoryNoFormulaPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartCategoryPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartPercentValueNoFormulaPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartPercentValuePane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartSecondValueNoFormulaPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartSecondValuePane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartValueNoFormulaPane; +import com.fr.design.mainframe.chart.gui.style.axis.ChartValuePane; +import com.fr.log.FineLoggerFactory; import java.lang.reflect.Constructor; import java.util.HashMap; @@ -91,7 +136,7 @@ public class ChartPlotFactory { Constructor c = factoryObject.getAxisPaneClass().getConstructor(Plot.class); return c.newInstance(plot); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } return new BinaryChartStyleAxisPane(plot); @@ -109,7 +154,7 @@ public class ChartPlotFactory { Constructor c = factoryObject.getDataLabelPaneClass().getConstructor(); return (DataLabelPane) c.newInstance(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } return new DataLabelPane(); @@ -122,7 +167,7 @@ public class ChartPlotFactory { Constructor c = aClass.getConstructor(); return (ChartAxisUsePane) c.newInstance(); }catch (Exception e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java index 5cc3c8d50c..de7d08a2b0 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java @@ -4,7 +4,6 @@ package com.fr.design.chart; * */ -import com.fr.base.FRContext; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; @@ -17,6 +16,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.license.exception.RegistEditionException; import com.fr.license.function.VT4FR; +import com.fr.log.FineLoggerFactory; import javax.swing.BorderFactory; import javax.swing.DefaultListCellRenderer; @@ -51,7 +51,7 @@ public class ChartTypePane extends ChartCommonWizardPane { charts4Icon[i][j].getPlot().setLegend(null); } } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } @@ -172,7 +172,7 @@ public class ChartTypePane extends ChartCommonWizardPane { try { oldChart.changePlotInNewType((Plot) chart.getPlot().clone()); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } @@ -195,7 +195,7 @@ public class ChartTypePane extends ChartCommonWizardPane { chart4Update = (Chart)chart.clone(); cc.addChart(chart4Update); }catch (CloneNotSupportedException ex){ - FRContext.getLogger().error(ex.getMessage(), ex); + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); } } diff --git a/designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java b/designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java index 1766d1d75b..769218c7fa 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java +++ b/designer-chart/src/main/java/com/fr/design/chart/gui/ChartComponent.java @@ -1,6 +1,5 @@ package com.fr.design.chart.gui; -import com.fr.base.FRContext; import com.fr.base.ScreenResolution; import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChartCollection; @@ -15,10 +14,19 @@ import com.fr.design.chart.gui.active.ActiveGlyph; import com.fr.design.chart.gui.active.ChartActiveGlyph; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.chart.MiddleChartComponent; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.core.PropertyChangeListener; -import java.awt.*; +import java.awt.Color; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.Paint; +import java.awt.Point; +import java.awt.RenderingHints; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; @@ -122,7 +130,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene this.chartCollection4Design = (ChartCollection)cc; // this.chartCollection4Design = (ChartCollection)cc.clone(); } catch (Exception e) { - FRContext.getLogger().error("ChartCollection clone is Error"); + FineLoggerFactory.getLogger().error("ChartCollection clone is Error"); } reset(); } diff --git a/designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java b/designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java index 783bfdd6a6..f621c545f5 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java +++ b/designer-chart/src/main/java/com/fr/design/chart/gui/ChartWidgetOption.java @@ -1,11 +1,11 @@ package com.fr.design.chart.gui; -import com.fr.base.FRContext; import com.fr.chart.chartattr.Chart; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.gui.core.WidgetOption; import com.fr.form.ui.ChartEditor; import com.fr.form.ui.Widget; +import com.fr.log.FineLoggerFactory; import javax.swing.Icon; @@ -42,11 +42,11 @@ public class ChartWidgetOption extends WidgetOption { widget.addChart((Chart) chart.clone()); return widget; } catch (InstantiationException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (IllegalAccessException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return null; diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java index cae449c05e..d3c8cc41ce 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java @@ -1,6 +1,5 @@ package com.fr.design.chart.series.PlotSeries; -import com.fr.base.FRContext; import com.fr.base.TableData; import com.fr.base.Utils; import com.fr.chart.base.MapSvgAttr; @@ -16,13 +15,17 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralUtils; - import com.fr.general.data.DataModel; +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import org.apache.batik.swing.svg.SVGFileFilter; -import javax.swing.*; -import java.awt.*; +import javax.swing.JFileChooser; +import javax.swing.JPanel; +import javax.swing.SwingConstants; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; @@ -143,7 +146,7 @@ refreshAreaNameBox(); try { embeddedTableData = DesignTableDataManager.previewTableDataNotNeedInputParameters(tableDataWrappe.getTableData(), TableData.RESULT_ALL, false); } catch (Exception ee) { - FRContext.getLogger().error(ee.getMessage(), ee); + FineLoggerFactory.getLogger().error(ee.getMessage(), ee); } if(embeddedTableData == null){ diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ConditionTrendLinePane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ConditionTrendLinePane.java index 348455bad2..a5b53f20f7 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ConditionTrendLinePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ConditionTrendLinePane.java @@ -1,29 +1,27 @@ package com.fr.design.chart.series.SeriesCondition; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.text.ParseException; - -import javax.swing.ButtonGroup; -import javax.swing.JPanel; -import javax.swing.JRadioButton; -import javax.swing.SpinnerNumberModel; - -import com.fr.base.FRContext; import com.fr.base.Utils; import com.fr.chart.base.ChartEquationType; import com.fr.chart.base.ConditionTrendLine; -import com.fr.design.chart.comp.BorderAttriPane; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.comp.BorderAttriPane; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; - import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.log.FineLoggerFactory; + +import javax.swing.ButtonGroup; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.SpinnerNumberModel; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.text.ParseException; public class ConditionTrendLinePane extends BasicBeanPane { private static final long serialVersionUID = 3867164332100351117L; @@ -197,7 +195,7 @@ public class ConditionTrendLinePane extends BasicBeanPane { try { maSpinner.commitEdit(); } catch (ParseException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } trendLine.getLine().setTrendLineName(nameLabel.getText()); diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java index e1274aa4b9..90982ded53 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java @@ -1,6 +1,5 @@ package com.fr.design.chart.series.SeriesCondition; -import com.fr.base.FRContext; import com.fr.chart.base.AttrAlpha; import com.fr.chart.base.AttrBackground; import com.fr.chart.base.AttrContents; @@ -12,10 +11,12 @@ import com.fr.data.condition.ListCondition; import com.fr.design.condition.ConditionAttrSingleConditionPane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.log.FineLoggerFactory; - -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Dimension; import java.util.Iterator; /** @@ -114,9 +115,9 @@ public class DataSeriesConditionPane extends ConditionAttributesPane{ try { newPlot.setHotHyperLink((NameJavaScriptGroup)hotHyper.clone()); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error("Error in Hyperlink, Please Check it.", e); + FineLoggerFactory.getLogger().error("Error in Hyperlink, Please Check it.", e); } } newPlot.setConditionCollection(oldPlot.getConditionCollection()); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java index 661dba7590..6f9a55ab56 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/MapPlotPane.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe.chart.gui.type; -import com.fr.base.FRContext; import com.fr.chart.base.ChartConstants; import com.fr.chart.base.ChartEnumDefinitions; import com.fr.chart.chartattr.Chart; @@ -11,10 +10,10 @@ import com.fr.chart.charttypes.MapIndependentChart; import com.fr.design.chart.series.PlotSeries.MapGroupExtensionPane; import com.fr.design.chart.series.PlotStyle.ChartSelectDemoPane; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.log.FineLoggerFactory; - -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import java.awt.BorderLayout; public class MapPlotPane extends AbstractChartTypePane { @@ -88,7 +87,7 @@ public class MapPlotPane extends AbstractChartTypePane { try{ plot = (MapPlot)chart.getPlot().clone(); } catch (CloneNotSupportedException e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } plot.setMapName(groupExtensionPane.updateBean(plot));// 名字问题 diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartRangeLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartRangeLegendPane.java index 0fdd61f92b..39d0b8f1bd 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartRangeLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartRangeLegendPane.java @@ -4,7 +4,6 @@ package com.fr.van.chart.designer.style; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; - import com.fr.plugin.chart.attr.VanChartLegend; import com.fr.plugin.chart.range.VanChartRangeLegend; import com.fr.plugin.chart.type.LegendType; @@ -53,6 +52,7 @@ public class VanChartRangeLegendPane extends VanChartPlotLegendPane { gradualLegendPane.setParentPane(parent); //区域段图例面板 sectionLegendPane = createSectionLegendPane(); + sectionLegendPane.setParentPane(parent); JPanel panel = new JPanel(new CardLayout()){ @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/AxisPaneFactory.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/AxisPaneFactory.java index 52493858e1..e5133659a9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/AxisPaneFactory.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/AxisPaneFactory.java @@ -1,6 +1,6 @@ package com.fr.van.chart.designer.style.axis; -import com.fr.base.FRContext; +import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.area.VanChartAreaPlot; import com.fr.plugin.chart.attr.plot.VanChartAxisPlot; import com.fr.plugin.chart.column.VanChartColumnPlot; @@ -64,7 +64,7 @@ public class AxisPaneFactory { try { return paneClass.newInstance(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return null; } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/VanChartGanttDataAndLinkPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/VanChartGanttDataAndLinkPane.java index 08b50d6e11..150f9c913d 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/VanChartGanttDataAndLinkPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/VanChartGanttDataAndLinkPane.java @@ -1,6 +1,5 @@ package com.fr.van.chart.gantt.designer.data; -import com.fr.base.FRContext; import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; @@ -11,7 +10,7 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.NormalChartDataPane; import com.fr.design.mainframe.chart.gui.data.ReportDataPane; import com.fr.design.mainframe.chart.gui.data.TableDataPane; - +import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.gantt.data.VanGanttDefinition; import com.fr.van.chart.gantt.designer.data.link.GanttLinkReportDataPane; import com.fr.van.chart.gantt.designer.data.link.GanttLinkTableDataPane; @@ -116,7 +115,7 @@ public class VanChartGanttDataAndLinkPane extends MultiTabPane return cloneCollection; } catch (Exception e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return collection; } } @@ -133,7 +132,7 @@ public class VanChartGanttDataAndLinkPane extends MultiTabPane return cloneCollection; } catch (Exception e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return collection; } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java index c1cb298276..a7b9955406 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java @@ -1,13 +1,12 @@ package com.fr.van.chart.gantt.designer.data.data.component; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartdata.TopDefinition; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; - +import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.gantt.data.VanGanttTableDefinition; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; @@ -247,7 +246,7 @@ public class GanttTableDataProjectPane extends AbstractTableDataContentPane impl try { comboBoxList.add(StableUtils.cloneObject(columnNameList.get(i))); } catch (CloneNotSupportedException e) { - FRContext.getLogger().info(e.getMessage()); + FineLoggerFactory.getLogger().info(e.getMessage()); } } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/MapDataPaneHelper.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/MapDataPaneHelper.java index ea82dbc034..158f9dbf1b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/MapDataPaneHelper.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/data/MapDataPaneHelper.java @@ -1,10 +1,10 @@ package com.fr.van.chart.map.designer.data; -import com.fr.base.FRContext; import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.Plot; +import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.data.DrillMapDefinition; import com.fr.plugin.chart.map.VanChartMapPlot; @@ -33,7 +33,7 @@ public class MapDataPaneHelper { } return cloneCollection; } catch (Exception e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return chartCollection; } } @@ -54,7 +54,7 @@ public class MapDataPaneHelper { } return cloneCollection; } catch (Exception e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return chartCollection; } } @@ -76,7 +76,7 @@ public class MapDataPaneHelper { } return cloneCollection; } catch (Exception e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return chartCollection; } } @@ -99,7 +99,7 @@ public class MapDataPaneHelper { } return cloneCollection; } catch (Exception e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return chartCollection; } } @@ -126,7 +126,7 @@ public class MapDataPaneHelper { } return cloneCollection; } catch (Exception e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return chartCollection; } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java index 244660adf5..1c8b102b34 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java @@ -1,6 +1,5 @@ package com.fr.van.chart.map.designer.type; -import com.fr.base.FRContext; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.mainframe.chart.gui.type.ChartImagePane; @@ -67,7 +66,7 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane { try { sourceChoosePane = createSourceChoosePane(); } catch (Exception e){ - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return new Component[][]{ new Component[]{typePane}, diff --git a/designer-chart/src/main/java/com/fr/van/chart/range/component/SectionLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/range/component/SectionLegendPane.java index 0265a4f73a..828f40d733 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/range/component/SectionLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/range/component/SectionLegendPane.java @@ -4,9 +4,9 @@ import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.style.series.MapColorPickerPaneWithFormula; - import com.fr.plugin.chart.range.SectionLegend; import com.fr.van.chart.designer.TableLayout4VanChartHelper; +import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; import java.awt.BorderLayout; @@ -24,6 +24,10 @@ public class SectionLegendPane extends JPanel{ initComponents(); } + public void setParentPane(VanChartStylePane parent){ + labelFormPane.setParentPane(parent); + } + private void initComponents() { intervalConfigPane = createSectionIntervalConfigPane(this.parent); JPanel intervalConfigPaneWithTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Section_Config"), intervalConfigPane); diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java index af1aaa12dd..5fdc8f3de7 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java @@ -1,6 +1,5 @@ package com.fr.design.designer.beans.adapters.component; -import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.beans.GroupModel; import com.fr.design.designer.beans.ComponentAdapter; @@ -17,11 +16,18 @@ import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.Button; import com.fr.form.ui.Widget; +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import com.fr.stable.core.PropertyChangeAdapter; -import javax.swing.*; -import java.awt.*; +import javax.swing.Action; +import javax.swing.JComponent; +import javax.swing.JPopupMenu; +import java.awt.AlphaComposite; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; import java.awt.event.MouseEvent; import java.beans.IntrospectionException; import java.util.ArrayList; @@ -176,7 +182,7 @@ public class CompositeComponentAdapter implements ComponentAdapter { try { return xCreator.getPropertyDescriptorCreator().supportedDescriptor(); } catch (IntrospectionException ex) { - FRContext.getLogger().error(ex.getMessage(), ex); + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); return new CRPropertyDescriptor[0]; } } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptorPane.java b/designer-form/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptorPane.java index 882c216f03..be4a81d4ec 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptorPane.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptorPane.java @@ -1,6 +1,5 @@ package com.fr.design.designer.creator; -import com.fr.base.FRContext; import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.gui.icheckbox.UICheckBox; @@ -13,6 +12,8 @@ import com.fr.design.mainframe.widget.editors.ExtendedPropertyEditor; import com.fr.design.mainframe.widget.editors.StringEditor; import com.fr.form.ui.Widget; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; + import javax.swing.BorderFactory; import javax.swing.JPanel; import java.awt.Component; @@ -103,7 +104,7 @@ public class CRPropertyDescriptorPane { } }); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return component; } @@ -115,7 +116,7 @@ public class CRPropertyDescriptorPane { propertyEditor.setValue(value); isPopulate = false; } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } @@ -126,7 +127,7 @@ public class CRPropertyDescriptorPane { Object value = m.invoke(widget); return value; } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return null; } } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java b/designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java index edf6018989..45764e7464 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XLayoutContainer.java @@ -3,7 +3,6 @@ */ package com.fr.design.designer.creator; -import com.fr.base.FRContext; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.form.layout.FRLayoutManager; import com.fr.design.form.util.XCreatorConstants; @@ -15,11 +14,14 @@ import com.fr.design.parameter.ParameterBridge; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WLayout; import com.fr.general.Background; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.core.PropertyChangeAdapter; -import javax.swing.*; -import java.awt.*; +import javax.swing.JComponent; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.LayoutManager; import java.awt.event.ContainerEvent; import java.awt.event.ContainerListener; import java.beans.IntrospectionException; @@ -298,7 +300,7 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme if (layout instanceof FRLayoutManager) { return (FRLayoutManager) layout; } - FRContext.getLogger().error("FRLayoutManager isn't exsit!"); + FineLoggerFactory.getLogger().error("FRLayoutManager isn't exsit!"); return null; } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java index 2e53dd2772..4835ec16bf 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java @@ -4,16 +4,27 @@ package com.fr.design.designer.creator; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.Widget; - +import com.fr.log.FineLoggerFactory; import com.fr.stable.core.PropertyChangeAdapter; -import javax.swing.*; -import java.awt.*; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.Composite; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GraphicsConfiguration; +import java.awt.Image; +import java.awt.MediaTracker; +import java.awt.Transparency; import java.beans.IntrospectionException; /** @@ -139,7 +150,7 @@ public abstract class XWidgetCreator extends XCreator { this.setRolloverIcon(new ImageIcon(image1)); this.setPressedIcon(new ImageIcon(image));//按下去的图标 } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java index 2abbfd12f8..b51b6e756f 100644 --- a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java +++ b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java @@ -1,18 +1,19 @@ package com.fr.design.designer.properties.mobile; -import java.awt.event.MouseEvent; -import java.beans.IntrospectionException; -import java.util.ArrayList; - -import com.fr.base.FRContext; import com.fr.design.designer.beans.events.DesignerEvent; -import com.fr.design.designer.creator.*; +import com.fr.design.designer.creator.CRPropertyDescriptor; +import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.itable.AbstractPropertyTable; import com.fr.design.gui.itable.PropertyGroup; import com.fr.design.gui.xtable.ReportAppPropertyGroupModel; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor; +import com.fr.log.FineLoggerFactory; + +import java.awt.event.MouseEvent; +import java.beans.IntrospectionException; +import java.util.ArrayList; /** @@ -50,7 +51,7 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable { try { propertyTableEditor = supportedDescriptor(); }catch (IntrospectionException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } groups.add(new PropertyGroup(new ReportAppPropertyGroupModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Properties_Mobile"), xCreator, propertyTableEditor, designer))); diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java index 40fb08d7dd..72181c766e 100644 --- a/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java +++ b/designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java @@ -1,6 +1,5 @@ package com.fr.design.designer.properties.mobile; -import com.fr.base.FRContext; import com.fr.base.mobile.MobileFitAttrState; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.CRPropertyDescriptor; @@ -14,7 +13,7 @@ import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor; import com.fr.design.mainframe.widget.editors.RefinedDoubleEditor; import com.fr.form.ui.ElementCaseEditor; - +import com.fr.log.FineLoggerFactory; import javax.swing.table.TableModel; import java.beans.IntrospectionException; @@ -92,7 +91,7 @@ public class ElementCasePropertyTable extends AbstractPropertyTable{ try { propertyTableEditor = supportedDescriptor(); } catch (IntrospectionException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } diff --git a/designer-form/src/main/java/com/fr/design/designer/treeview/ComponentTreeModel.java b/designer-form/src/main/java/com/fr/design/designer/treeview/ComponentTreeModel.java index c626fea8ce..01f64e509b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/treeview/ComponentTreeModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/treeview/ComponentTreeModel.java @@ -1,6 +1,5 @@ package com.fr.design.designer.treeview; -import com.fr.base.FRContext; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XLayoutContainer; @@ -9,6 +8,7 @@ import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWidgetCreator; import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.Widget; +import com.fr.log.FineLoggerFactory; import javax.swing.event.TreeModelEvent; import javax.swing.event.TreeModelListener; @@ -142,7 +142,7 @@ public class ComponentTreeModel implements TreeModel { m.invoke(listener, evt); } } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-form/src/main/java/com/fr/design/gui/xtable/AbstractPropertyGroupModel.java b/designer-form/src/main/java/com/fr/design/gui/xtable/AbstractPropertyGroupModel.java index 30be1e1851..8e48316436 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xtable/AbstractPropertyGroupModel.java +++ b/designer-form/src/main/java/com/fr/design/gui/xtable/AbstractPropertyGroupModel.java @@ -3,18 +3,17 @@ */ package com.fr.design.gui.xtable; -import java.beans.PropertyEditor; +import com.fr.design.beans.GroupModel; +import com.fr.design.designer.creator.CRPropertyDescriptor; +import com.fr.design.designer.creator.XCreator; +import com.fr.design.mainframe.widget.editors.PropertyCellEditor; +import com.fr.design.mainframe.widget.renderer.PropertyCellRenderer; +import com.fr.log.FineLoggerFactory; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; - -import com.fr.base.FRContext; -import com.fr.design.beans.GroupModel; -import com.fr.design.mainframe.widget.editors.PropertyCellEditor; -import com.fr.design.mainframe.widget.renderer.PropertyCellRenderer; -import com.fr.design.designer.creator.CRPropertyDescriptor; -import com.fr.design.designer.creator.XCreator; +import java.beans.PropertyEditor; /** * @author richer @@ -53,7 +52,7 @@ public abstract class AbstractPropertyGroupModel implements GroupModel, Comparab try { initRenderer(row); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } return renderers[row]; @@ -65,7 +64,7 @@ public abstract class AbstractPropertyGroupModel implements GroupModel, Comparab try { initEditor(row); } catch (Exception ex) { - FRContext.getLogger().error(ex.getMessage(), ex); + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); } } return editors[row]; diff --git a/designer-form/src/main/java/com/fr/design/gui/xtable/PropertyGroupModel.java b/designer-form/src/main/java/com/fr/design/gui/xtable/PropertyGroupModel.java index b5a7e548a6..f125ce3e21 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xtable/PropertyGroupModel.java +++ b/designer-form/src/main/java/com/fr/design/gui/xtable/PropertyGroupModel.java @@ -1,6 +1,5 @@ package com.fr.design.gui.xtable; -import com.fr.base.FRContext; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.CRPropertyDescriptor; import com.fr.design.designer.creator.XCreator; @@ -8,7 +7,7 @@ import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.widget.editors.ExtendedPropertyEditor; import com.fr.design.mainframe.widget.editors.PropertyCellEditor; import com.fr.general.ComparatorUtils; - +import com.fr.log.FineLoggerFactory; import com.fr.report.stable.FormConstants; import java.beans.PropertyChangeEvent; @@ -35,7 +34,7 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel { Method m = properties[row].getReadMethod(); return m.invoke(dealCreatorData()); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return null; } } @@ -59,7 +58,7 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel { properties[row].firePropertyChanged(); return true; } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return false; } } diff --git a/designer-form/src/main/java/com/fr/design/gui/xtable/ReportAppPropertyGroupModel.java b/designer-form/src/main/java/com/fr/design/gui/xtable/ReportAppPropertyGroupModel.java index 2f2eafd01f..b577bd8bbc 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xtable/ReportAppPropertyGroupModel.java +++ b/designer-form/src/main/java/com/fr/design/gui/xtable/ReportAppPropertyGroupModel.java @@ -1,10 +1,10 @@ package com.fr.design.gui.xtable; -import com.fr.base.FRContext; import com.fr.design.designer.creator.CRPropertyDescriptor; import com.fr.design.designer.creator.XCreator; import com.fr.design.mainframe.FormDesigner; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; import com.fr.report.stable.FormConstants; import javax.swing.JOptionPane; @@ -47,7 +47,7 @@ public class ReportAppPropertyGroupModel extends PropertyGroupModel { properties[row].firePropertyChanged(); return true; } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return false; } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index 5dd42de8d9..99883fff38 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe; -import com.fr.base.FRContext; import com.fr.base.Parameter; import com.fr.base.ScreenResolution; import com.fr.base.vcs.DesignerMode; @@ -63,6 +62,7 @@ import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WFitLayout; import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.bridge.StableFactory; import com.fr.third.javax.annotation.Nullable; @@ -1208,7 +1208,7 @@ public class FormDesigner extends TargetComponent
implements TreeSelection } } } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerDropTarget.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerDropTarget.java index a16ec5f170..4e7ea5ae6c 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerDropTarget.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesignerDropTarget.java @@ -1,5 +1,14 @@ package com.fr.design.mainframe; +import com.fr.design.designer.creator.XCreator; +import com.fr.form.data.DataBinding; +import com.fr.form.ui.DataControl; +import com.fr.form.ui.IframeEditor; +import com.fr.form.ui.Widget; +import com.fr.form.ui.WidgetValue; +import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; + import java.awt.Point; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; @@ -11,15 +20,6 @@ import java.awt.dnd.DropTargetDragEvent; import java.awt.dnd.DropTargetDropEvent; import java.io.IOException; -import com.fr.base.FRContext; -import com.fr.design.designer.creator.XCreator; -import com.fr.form.data.DataBinding; -import com.fr.form.ui.DataControl; -import com.fr.form.ui.IframeEditor; -import com.fr.form.ui.Widget; -import com.fr.form.ui.WidgetValue; -import com.fr.general.ComparatorUtils; - public class FormDesignerDropTarget extends DropTargetAdapter { private FormDesigner designer; @@ -84,9 +84,9 @@ public class FormDesignerDropTarget extends DropTargetAdapter { creator.rebuid(); designer.getSelectionModel().setSelectedCreator(creator); } catch (UnsupportedFlavorException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java b/designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java index ff79beccdb..8d223c2452 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormSelection.java @@ -1,10 +1,5 @@ package com.fr.design.mainframe; -import java.awt.LayoutManager; -import java.awt.Rectangle; -import java.util.ArrayList; - -import com.fr.base.FRContext; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.location.Direction; @@ -16,9 +11,14 @@ import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.creator.cardlayout.XWCardTagLayout; -import com.fr.form.ui.Widget; import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.gui.LayoutUtils; +import com.fr.form.ui.Widget; +import com.fr.log.FineLoggerFactory; + +import java.awt.LayoutManager; +import java.awt.Rectangle; +import java.util.ArrayList; public class FormSelection { @@ -322,7 +322,7 @@ public class FormSelection { creator.setBounds(root.getBounds()); clipBoard.selection.add(creator); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java index f88b9e5400..b3b07efd73 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe; -import com.fr.base.FRContext; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.AbstractLayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRTabFitLayoutAdapter; @@ -19,6 +18,7 @@ import com.fr.form.ui.Widget; import com.fr.form.ui.container.WTitleLayout; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; + import java.awt.Component; import java.awt.Point; import java.awt.Rectangle; @@ -112,7 +112,7 @@ public class FormSelectionUtils { designer.getSelectionModel().getSelection().addSelectedCreator(copiedCreator); } } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } rebuildSelection(designer); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java index f49f2859b2..c32abb2ffc 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -1,7 +1,6 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icontainer.UIScrollPane; @@ -304,7 +303,7 @@ public class FormWidgetDetailPane extends FormDockView{ public void actionPerformed(ActionEvent e) { String url = CloudCenter.getInstance().acquireUrlByKind("reuse.url"); if (StringUtils.isEmpty(url)) { - FRContext.getLogger().info("The URL is empty!"); + FineLoggerFactory.getLogger().info("The URL is empty!"); return; } try { diff --git a/designer-form/src/main/java/com/fr/design/mainframe/TreeTransferHandler.java b/designer-form/src/main/java/com/fr/design/mainframe/TreeTransferHandler.java index 4242890de9..90c14c944f 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/TreeTransferHandler.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/TreeTransferHandler.java @@ -1,22 +1,21 @@ package com.fr.design.mainframe; -import java.awt.Component; -import java.awt.Container; -import java.awt.Point; -import java.awt.Rectangle; -import java.awt.datatransfer.DataFlavor; - -import javax.swing.JComponent; -import javax.swing.SwingUtilities; -import javax.swing.TransferHandler; -import javax.swing.tree.TreePath; - -import com.fr.base.FRContext; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.utils.gui.LayoutUtils; +import com.fr.log.FineLoggerFactory; + +import javax.swing.JComponent; +import javax.swing.SwingUtilities; +import javax.swing.TransferHandler; +import javax.swing.tree.TreePath; +import java.awt.Component; +import java.awt.Container; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.datatransfer.DataFlavor; public class TreeTransferHandler extends TransferHandler { @@ -59,7 +58,7 @@ public class TreeTransferHandler extends TransferHandler { return canPathAccept(tree, newpath, draggedComponent, p); } } catch (Exception ex) { - FRContext.getLogger().error(ex.getMessage(), ex); + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); return false; } } else { @@ -131,7 +130,7 @@ public class TreeTransferHandler extends TransferHandler { return true; } catch (Exception ex) { - FRContext.getLogger().error(ex.getMessage(), ex); + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); return false; } diff --git a/designer-form/src/main/java/com/fr/design/parameter/FormParameterReader.java b/designer-form/src/main/java/com/fr/design/parameter/FormParameterReader.java index dbceb3ee34..24378daeec 100644 --- a/designer-form/src/main/java/com/fr/design/parameter/FormParameterReader.java +++ b/designer-form/src/main/java/com/fr/design/parameter/FormParameterReader.java @@ -1,9 +1,9 @@ package com.fr.design.parameter; -import com.fr.base.FRContext; import com.fr.base.Parameter; import com.fr.form.main.Form; import com.fr.form.main.FormIO; +import com.fr.log.FineLoggerFactory; /** * @author richie @@ -20,7 +20,7 @@ public class FormParameterReader extends AbstractParameterReader { Form form = FormIO.readForm(tplPath); return form.getParameters(); } catch (Exception e1) { - FRContext.getLogger().error(e1.getMessage(), e1); + FineLoggerFactory.getLogger().error(e1.getMessage(), e1); } return new Parameter[0]; } diff --git a/designer-realize/src/main/java/com/fr/design/actions/report/ReportFooterAction.java b/designer-realize/src/main/java/com/fr/design/actions/report/ReportFooterAction.java index d6d64d5e91..43ce198c1e 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/report/ReportFooterAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/report/ReportFooterAction.java @@ -3,24 +3,23 @@ */ package com.fr.design.actions.report; -import java.util.Hashtable; - -import javax.swing.SwingUtilities; - import com.fr.base.BaseUtils; -import com.fr.base.FRContext; -import com.fr.design.menu.KeySetUtils; -import com.fr.page.ReportSettingsProvider; import com.fr.design.actions.ReportComponentAction; +import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.headerfooter.EditFooterPane; import com.fr.design.mainframe.ReportComponent; -import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.menu.KeySetUtils; +import com.fr.log.FineLoggerFactory; +import com.fr.page.ReportSettingsProvider; import com.fr.report.core.ReportHF; import com.fr.report.core.ReportUtils; import com.fr.report.report.Report; import com.fr.report.report.TemplateReport; import com.fr.report.stable.ReportConstants; +import javax.swing.SwingUtilities; +import java.util.Hashtable; + /** * Footer action. */ @@ -85,7 +84,7 @@ public class ReportFooterAction extends ReportComponentAction { try { reportHFHash.put(new Integer(reportHFType), report.getFooter(reportHFType).clone()); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } diff --git a/designer-realize/src/main/java/com/fr/design/actions/report/ReportHeaderAction.java b/designer-realize/src/main/java/com/fr/design/actions/report/ReportHeaderAction.java index 87828ae222..5ee5c9792f 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/report/ReportHeaderAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/report/ReportHeaderAction.java @@ -3,24 +3,23 @@ */ package com.fr.design.actions.report; -import java.util.Hashtable; - -import javax.swing.SwingUtilities; - import com.fr.base.BaseUtils; -import com.fr.base.FRContext; -import com.fr.design.menu.KeySetUtils; -import com.fr.page.ReportSettingsProvider; import com.fr.design.actions.ReportComponentAction; +import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.headerfooter.EditHeaderPane; import com.fr.design.mainframe.ReportComponent; -import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.menu.KeySetUtils; +import com.fr.log.FineLoggerFactory; +import com.fr.page.ReportSettingsProvider; import com.fr.report.core.ReportHF; import com.fr.report.core.ReportUtils; import com.fr.report.report.Report; import com.fr.report.report.TemplateReport; import com.fr.report.stable.ReportConstants; +import javax.swing.SwingUtilities; +import java.util.Hashtable; + /** * Header action. */ @@ -87,7 +86,7 @@ public class ReportHeaderAction extends ReportComponentAction { try { reportHFHash.put(new Integer(reportHFType), report.getHeader(reportHFType).clone()); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } diff --git a/designer-realize/src/main/java/com/fr/design/cell/clipboard/CellElementsClip.java b/designer-realize/src/main/java/com/fr/design/cell/clipboard/CellElementsClip.java index 84edad71fb..2767b1a8e3 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/clipboard/CellElementsClip.java +++ b/designer-realize/src/main/java/com/fr/design/cell/clipboard/CellElementsClip.java @@ -3,8 +3,8 @@ */ package com.fr.design.cell.clipboard; -import com.fr.base.FRContext; import com.fr.grid.selection.CellSelection; +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.CellElement; import com.fr.report.cell.CellElementComparator; import com.fr.report.cell.TemplateCellElement; @@ -126,7 +126,7 @@ public class CellElementsClip implements Cloneable, java.io.Serializable { try { cellElement = (TemplateCellElement) clips[i].clone(); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return null; } diff --git a/designer-realize/src/main/java/com/fr/design/cell/clipboard/FloatElementsClip.java b/designer-realize/src/main/java/com/fr/design/cell/clipboard/FloatElementsClip.java index 390daff92e..7dc7fd80b9 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/clipboard/FloatElementsClip.java +++ b/designer-realize/src/main/java/com/fr/design/cell/clipboard/FloatElementsClip.java @@ -3,18 +3,18 @@ */ package com.fr.design.cell.clipboard; -import java.util.Iterator; - -import com.fr.base.FRContext; import com.fr.design.cell.FloatElementsProvider; import com.fr.general.ComparatorUtils; import com.fr.grid.selection.FloatSelection; +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.FloatElement; import com.fr.report.elementcase.ElementCase; import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.unit.FU; import com.fr.stable.unit.OLDPIX; +import java.util.Iterator; + /** * The clip of Float Element. */ @@ -39,7 +39,7 @@ public class FloatElementsClip implements Cloneable, java.io.Serializable,FloatE try { ret = (FloatElement)this.floatEl.clone(); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return null; } diff --git a/designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java b/designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java index df8d0c3459..5f3ae97f1e 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java +++ b/designer-realize/src/main/java/com/fr/design/cell/editor/DSColumnCellEditor.java @@ -1,17 +1,12 @@ package com.fr.design.cell.editor; -import java.awt.Component; - -import javax.swing.JOptionPane; -import javax.swing.SwingUtilities; - -import com.fr.base.FRContext; import com.fr.design.data.DesignTableDataManager; -import com.fr.design.dscolumn.DSColumnPane; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionListener; +import com.fr.design.dscolumn.DSColumnPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.grid.Grid; +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.TemplateCellElement; import com.fr.report.core.SheetUtils; import com.fr.report.elementcase.TemplateElementCase; @@ -19,6 +14,10 @@ import com.fr.report.poly.PolyECBlock; import com.fr.report.worksheet.WorkSheet; import com.fr.stable.ProductConstants; +import javax.swing.JOptionPane; +import javax.swing.SwingUtilities; +import java.awt.Component; + /** * CellEditor used to edit BindValuePainter object. */ @@ -74,7 +73,7 @@ public class DSColumnCellEditor extends AbstractCellEditor implements DialogActi } catch (Exception exp) { JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(grid), exp.getMessage(), ProductConstants.APP_NAME, JOptionPane.ERROR_MESSAGE); - FRContext.getLogger().error(exp.getMessage(), exp); + FineLoggerFactory.getLogger().error(exp.getMessage(), exp); } return dsColumnDialog; diff --git a/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java b/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java index b8031b238f..5fc09d53f1 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java @@ -5,7 +5,6 @@ package com.fr.design.cell.editor; import com.fr.base.BaseFormula; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.Utils; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; @@ -20,13 +19,14 @@ import com.fr.design.report.RichTextEditingPane; import com.fr.design.report.RichTextPane; import com.fr.design.style.color.UIToolbarColorButton; import com.fr.general.FRFont; - +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.cellattr.core.RichTextConverter; import com.fr.stable.Constants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.JEditorPane; +import javax.swing.SwingUtilities; import javax.swing.event.CaretEvent; import javax.swing.event.CaretListener; import javax.swing.event.ChangeEvent; @@ -40,7 +40,9 @@ import javax.swing.text.MutableAttributeSet; import javax.swing.text.SimpleAttributeSet; import javax.swing.text.StyleConstants; import javax.swing.text.StyledDocument; -import java.awt.*; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; @@ -340,7 +342,7 @@ public class RichTextToolBar extends BasicPane{ try { doc.insertString(start, content, attrs); } catch (BadLocationException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } }).setVisible(true); diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java index cae7a5f514..4b33304cd1 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnPane.java @@ -1,12 +1,11 @@ package com.fr.design.dscolumn; -import com.fr.base.FRContext; import com.fr.data.TableDataSource; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.ElementCasePane; - +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.CellElement; import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; @@ -60,7 +59,7 @@ public class DSColumnPane extends BasicPane { // 切换标签的时候就,确认是否有没有添加到列表中的条件 lastSelectedComponent = selectTabComponent; } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java index bb4b2650ee..f7c1f78250 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java @@ -1,23 +1,21 @@ package com.fr.design.mainframe; -import com.fr.base.FRContext; import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.dialog.BasicPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.widget.WidgetPane; import com.fr.form.ui.NoneWidget; import com.fr.form.ui.Widget; -import com.fr.log.FineLoggerFactory; - import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; +import com.fr.log.FineLoggerFactory; import com.fr.privilege.finegrain.WidgetPrivilegeControl; import com.fr.report.cell.CellElement; import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; -import java.awt.*; +import java.awt.BorderLayout; /** * Created by ibm on 2017/7/20. @@ -72,7 +70,7 @@ public class CellWidgetPropertyPane extends BasicPane { try { cellWidget = (Widget) cellWidget.clone(); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } @@ -123,7 +121,7 @@ public class CellWidgetPropertyPane extends BasicPane { try { setCellWidget((Widget) cellWidget.clone(), templateCellElement); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error("InternalError: " + e.getMessage()); + FineLoggerFactory.getLogger().error("InternalError: " + e.getMessage()); } } }); @@ -155,7 +153,7 @@ public class CellWidgetPropertyPane extends BasicPane { try { setCellWidget((Widget)cellWidget.clone(), templateCellElement); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error("InternalError: " + e.getMessage()); + FineLoggerFactory.getLogger().error("InternalError: " + e.getMessage()); } } }); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java index 5bc5cd791d..db91d0a39e 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java @@ -5,7 +5,6 @@ package com.fr.design.mainframe; import com.fr.base.BaseFormula; import com.fr.base.DynamicUnitList; -import com.fr.base.FRContext; import com.fr.base.Formula; import com.fr.base.ScreenResolution; import com.fr.base.Style; @@ -526,7 +525,7 @@ public abstract class ElementCasePane extends Tar //旧选中内容编辑器释放模板对象 this.getCurrentEditor().release(); } catch (UnsupportedOperationException e) { - FRContext.getLogger().info("Nothing to release"); + FineLoggerFactory.getLogger().info("Nothing to release"); } this.selection = selection; fireSelectionChanged(); @@ -679,7 +678,7 @@ public abstract class ElementCasePane extends Tar try { clipObject = clipData.getTransferData(DataFlavor.stringFlavor); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); return null; } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java index f289b4f0a1..fcade7789b 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe; -import com.fr.base.FRContext; import com.fr.base.Style; import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.designer.TargetComponent; @@ -12,12 +11,13 @@ import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.Selection; import com.fr.js.NameJavaScriptGroup; +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.CellElement; import com.fr.report.cell.FloatElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.Constants; -import java.awt.*; +import java.awt.Color; /** * Created by plough on 2017/7/26. @@ -89,7 +89,7 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro editCellElement.setNameHyperlinkGroup((NameJavaScriptGroup) updateNameHyperlinks.clone()); } catch (CloneNotSupportedException e) { // this shouldn't happen, since NameJavaScriptGroup are FCloneable - FRContext.getLogger().error("InternalError: " + e.getMessage()); + FineLoggerFactory.getLogger().error("InternalError: " + e.getMessage()); } } }); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java b/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java index 37f86172ea..df9b1b556c 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java @@ -52,11 +52,8 @@ import java.text.DateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.TreeSet; /** * @author neil @@ -134,11 +131,11 @@ public class InformationCollector implements XMLReadable, XMLWriter { } xmlInputStream.close(); } catch (FileNotFoundException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (IOException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } catch (XMLStreamException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } @@ -361,7 +358,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { //读取XML的5分钟后开始发请求连接服务器. Thread.sleep(SEND_DELAY); } catch (InterruptedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } sendUserInfo(); sendFunctionsInfo(); @@ -407,7 +404,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { String encodeCotent = DesUtils.getEncString(fileContent); writeEncodeContentToFile(encodeCotent, xmlFile); }catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } @@ -423,7 +420,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { bw = new BufferedWriter(osw); bw.write(fileContent); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } finally { if(bw != null){ try { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index 58ecb1ea85..44becbd9cc 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -2,7 +2,6 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.base.DynamicUnitList; -import com.fr.base.FRContext; import com.fr.base.Parameter; import com.fr.base.ScreenResolution; import com.fr.base.vcs.DesignerMode; @@ -73,6 +72,7 @@ import com.fr.general.ModuleContext; import com.fr.grid.Grid; import com.fr.grid.GridUtils; import com.fr.io.exporter.EmbeddedTableDataExporter; +import com.fr.log.FineLoggerFactory; import com.fr.main.TemplateWorkBook; import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBookAdapter; @@ -1109,7 +1109,7 @@ public class JWorkBook extends JTemplate { EmbeddedTableDataExporter exporter = new EmbeddedTableDataExporter(); exporter.export(fileOutputStream, tpl, parameterMap); } catch (Exception e1) { - FRContext.getLogger().error(e1.getMessage()); + FineLoggerFactory.getLogger().error(e1.getMessage()); } //打开导出的内置模板 diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java b/designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java index b4bbf12576..71fb275029 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe; -import com.fr.base.FRContext; import com.fr.base.ScreenResolution; import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.design.designer.EditingState; @@ -9,16 +8,20 @@ import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.icontainer.UIModeControlContainer; import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.layout.FRGUIPaneFactory; - import com.fr.grid.Grid; +import com.fr.log.FineLoggerFactory; import com.fr.main.impl.WorkBook; import com.fr.report.report.TemplateReport; -import javax.swing.*; +import javax.swing.JComponent; +import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; -import java.awt.event.*; +import java.awt.BorderLayout; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.MouseWheelEvent; +import java.awt.event.MouseWheelListener; import java.util.ArrayList; /** @@ -106,7 +109,7 @@ public class ReportComponentComposite extends JComponent { protected void doAfterChange(int newIndex) { WorkBook workbook = getEditingWorkBook(); if (workbook == null) { - FRContext.getLogger().error(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Read_Failure") + "!"); + FineLoggerFactory.getLogger().error(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Read_Failure") + "!"); //AUGUST:加个报错,不然测试总是SB的认为打不开一个坏的excel文件就是BUG,也不知道去检查下源文件。 return; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java index fe756517fa..cb6fb8d3e3 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java @@ -1,7 +1,6 @@ package com.fr.design.mainframe.app; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.Style; import com.fr.base.TempNameStyle; import com.fr.base.extension.FileExtension; @@ -47,7 +46,7 @@ class CptApp extends AbstractWorkBookApp { if (XMLEncryptUtils.isCptEncoded() && !XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) { if (!new DecodeDialog(file).isPwdRight()) { - FRContext.getLogger().error(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ECP_Error_Pwd")); + FineLoggerFactory.getLogger().error(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ECP_Error_Pwd")); return new WorkBook(); } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java index 2869b7915b..6f329c39d2 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -21,8 +21,8 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.general.DateUtils; - import com.fr.general.http.HttpClient; +import com.fr.log.FineLoggerFactory; import com.fr.stable.EncodeConstants; import com.fr.stable.OperatingSystem; import com.fr.stable.StableUtils; @@ -96,7 +96,7 @@ public class UserInfoLabel extends UILabel { String loginUrl = CloudCenter.getInstance().acquireUrlByKind("bbs.default"); Desktop.getDesktop().browse(new URI(loginUrl)); } catch (Exception exp) { - FRContext.getLogger().info(exp.getMessage()); + FineLoggerFactory.getLogger().info(exp.getMessage()); } } } @@ -149,7 +149,7 @@ public class UserInfoLabel extends UILabel { } Thread.sleep(DELAY_TIME); } catch (InterruptedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } HttpClient hc = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("bbs.popup")); if (!hc.isServerAlive()) { @@ -222,7 +222,7 @@ public class UserInfoLabel extends UILabel { try { Thread.sleep(millis); } catch (InterruptedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java index 85299d24d6..629839a298 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java @@ -12,6 +12,7 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.general.DateUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; + import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -165,7 +166,7 @@ public class UserInfoPane extends BasicPane { } } catch (InterruptedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } String userName = MarketConfig.getInstance().getBbsUsername(); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java index fb5c2aeb98..737d47044c 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe.errorinfo; -import com.fr.base.FRContext; import com.fr.design.mainframe.SiteCenterToken; import com.fr.general.CloudCenter; import com.fr.general.CommonIOUtils; @@ -109,7 +108,7 @@ public class ErrorInfoUploader { IOUtils.unzip(localCacheZip, localCacheZip.getParent()); } catch (Exception e) { - FRContext.getLogger().debug(e.getMessage()); + FineLoggerFactory.getLogger().debug(e.getMessage()); } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java index e9ef78841f..07954c796e 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java @@ -3,7 +3,6 @@ */ package com.fr.design.mainframe.form; -import com.fr.base.FRContext; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignState; import com.fr.design.actions.AllowAuthorityEditAction; @@ -33,6 +32,7 @@ import com.fr.form.FormElementCaseProvider; import com.fr.form.main.Form; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.CellElement; import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.worksheet.FormElementCase; @@ -138,7 +138,7 @@ public class FormElementCaseDesigner this.elementCasePane.paintComponents(g); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return image; diff --git a/designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java b/designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java index c09152fa24..168f65ecea 100644 --- a/designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java +++ b/designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java @@ -1,7 +1,6 @@ package com.fr.design.parameter; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.Parameter; import com.fr.base.parameter.ParameterUI; import com.fr.base.vcs.DesignerMode; @@ -23,18 +22,29 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.AuthorityToolBarPane; import com.fr.design.mainframe.JWorkBook; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; -import com.fr.design.menu.*; +import com.fr.design.menu.KeySetUtils; +import com.fr.design.menu.MenuDef; +import com.fr.design.menu.NameSeparator; +import com.fr.design.menu.ShortCut; +import com.fr.design.menu.ToolBarDef; import com.fr.design.module.DesignModuleFactory; import com.fr.design.style.background.BackgroundPane; - +import com.fr.log.FineLoggerFactory; import com.fr.main.parameter.ReportParameterAttr; import com.fr.main.parameter.TemplateParameterAttr; import com.fr.stable.ArrayUtils; import com.fr.stable.bridge.StableFactory; import com.fr.stable.core.PropertyChangeAdapter; -import javax.swing.*; -import java.awt.*; +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JPopupMenu; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; @@ -234,7 +244,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus parameterUI = StableFactory.getMarkedInstanceObjectFromClass(ParameterUI.FORM_XML_TAG, ParameterUI.class); parameterUI.setDefaultSize(); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } diff --git a/designer-realize/src/main/java/com/fr/design/parameter/WorkBookParameterReader.java b/designer-realize/src/main/java/com/fr/design/parameter/WorkBookParameterReader.java index c678f3156c..77080a192c 100644 --- a/designer-realize/src/main/java/com/fr/design/parameter/WorkBookParameterReader.java +++ b/designer-realize/src/main/java/com/fr/design/parameter/WorkBookParameterReader.java @@ -1,8 +1,8 @@ package com.fr.design.parameter; -import com.fr.base.FRContext; import com.fr.base.Parameter; import com.fr.io.TemplateWorkBookIO; +import com.fr.log.FineLoggerFactory; import com.fr.main.TemplateWorkBook; /** @@ -20,7 +20,7 @@ public class WorkBookParameterReader extends AbstractParameterReader { TemplateWorkBook template = TemplateWorkBookIO.readTemplateWorkBook(tplPath); return template.getParameters(); } catch (Exception e1) { - FRContext.getLogger().error(e1.getMessage(), e1); + FineLoggerFactory.getLogger().error(e1.getMessage(), e1); } return new Parameter[0]; } diff --git a/designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java b/designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java index 60181a1ec8..c1d4deaff0 100644 --- a/designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java +++ b/designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java @@ -1,6 +1,5 @@ package com.fr.design.present; -import com.fr.base.FRContext; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; @@ -10,16 +9,15 @@ import com.fr.design.mainframe.ElementCasePane; import com.fr.design.widget.WidgetPane; import com.fr.form.ui.NoneWidget; import com.fr.form.ui.Widget; -import com.fr.log.FineLoggerFactory; - import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; +import com.fr.log.FineLoggerFactory; import com.fr.privilege.finegrain.WidgetPrivilegeControl; import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.TemplateElementCase; -import java.awt.*; +import java.awt.BorderLayout; public class CellWriteAttrPane extends BasicPane { @@ -79,7 +77,7 @@ public class CellWriteAttrPane extends BasicPane { try { cellWidget = (Widget) cellWidget.clone(); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } cellEditorDefPane.populate(cellWidget); diff --git a/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java b/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java index 5a75f35e6c..ad0c57b51e 100644 --- a/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java +++ b/designer-realize/src/main/java/com/fr/design/present/ConditionAttributesGroupPane.java @@ -1,20 +1,16 @@ package com.fr.design.present; -import java.util.ArrayList; -import java.util.List; - -import com.fr.base.FRContext; import com.fr.design.actions.utils.ReportActionUtils; +import com.fr.design.condition.HighLightConditionAttributesPane; +import com.fr.design.gui.controlpane.NameObjectCreator; +import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.ElementCasePane; import com.fr.general.NameObject; -import com.fr.design.condition.HighLightConditionAttributesPane; -import com.fr.design.gui.controlpane.NameObjectCreator; -import com.fr.design.gui.controlpane.NameableCreator; - import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.Selection; +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.CellElement; import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.TemplateCellElement; @@ -25,6 +21,9 @@ import com.fr.report.core.SheetUtils; import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.Nameable; +import java.util.ArrayList; +import java.util.List; + public class ConditionAttributesGroupPane extends UIListControlPane { private static ConditionAttributesGroupPane singleton; private TemplateCellElement editCellElement; // 当前单元格对象 @@ -59,7 +58,7 @@ public class ConditionAttributesGroupPane extends UIListControlPane { try { ((TemplateCellElement)editCellElement).setHighlightGroup((HighlightGroup) highlightGroup.clone()); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error("InternalError: " + e.getMessage()); + FineLoggerFactory.getLogger().error("InternalError: " + e.getMessage()); } } }); @@ -122,7 +121,7 @@ public class ConditionAttributesGroupPane extends UIListControlPane { try { highlight = (Highlight)highlight.clone(); } catch (CloneNotSupportedException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } res_array[i] = highlight; } diff --git a/designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java b/designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java index b0c0e43f4c..0406abffb9 100644 --- a/designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java @@ -4,13 +4,13 @@ package com.fr.design.report; import com.fr.base.BaseFormula; -import com.fr.base.FRContext; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.formula.FormulaFactory; import com.fr.design.formula.UIFormula; import com.fr.design.gui.frpane.UITextPane; import com.fr.design.mainframe.DesignerContext; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.cellattr.core.RichText; import com.fr.report.cell.cellattr.core.RichTextConverter; @@ -150,7 +150,7 @@ public class RichTextEditingPane extends UITextPane{ doc.remove(formulaStart, formulaContent.length() + WRAPPER_LEN); doc.insertString(formulaStart, content, attrs); } catch (BadLocationException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } }).setVisible(true); @@ -190,7 +190,7 @@ public class RichTextEditingPane extends UITextPane{ //弹出公式编辑窗口 popUpFormulaEditPane(formulaContent, formulaStart, attrs); } catch (BadLocationException e1) { - FRContext.getLogger().error(e1.getMessage()); + FineLoggerFactory.getLogger().error(e1.getMessage()); } } } diff --git a/designer-realize/src/main/java/com/fr/design/report/RichTextPane.java b/designer-realize/src/main/java/com/fr/design/report/RichTextPane.java index 39df9598d8..d2cb19e868 100644 --- a/designer-realize/src/main/java/com/fr/design/report/RichTextPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/RichTextPane.java @@ -1,7 +1,6 @@ package com.fr.design.report; import com.fr.base.BaseFormula; -import com.fr.base.FRContext; import com.fr.base.Style; import com.fr.design.cell.editor.RichTextToolBar; import com.fr.design.dialog.BasicPane; @@ -9,7 +8,7 @@ import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; - +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.CellElement; import com.fr.report.cell.cellattr.CellGUIAttr; import com.fr.report.cell.cellattr.core.RichChar; @@ -20,14 +19,16 @@ import com.fr.stable.Constants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.JPanel; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.DefaultStyledDocument; import javax.swing.text.Element; import javax.swing.text.SimpleAttributeSet; import javax.swing.text.StyleConstants; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Font; import java.math.BigDecimal; import java.util.Iterator; @@ -164,7 +165,7 @@ public class RichTextPane extends BasicPane { lastChar = new RichChar(charStr, style); richText.addContent(lastChar); }catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } @@ -214,7 +215,7 @@ public class RichTextPane extends BasicPane { doc.insertString(doc.getLength(), charStr, attrs); toolBar.addInputListener(); } catch (BadLocationException e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } diff --git a/designer-realize/src/main/java/com/fr/design/report/share/ConfusionTableDataPane.java b/designer-realize/src/main/java/com/fr/design/report/share/ConfusionTableDataPane.java index 69594b03dc..3374db1655 100644 --- a/designer-realize/src/main/java/com/fr/design/report/share/ConfusionTableDataPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/share/ConfusionTableDataPane.java @@ -1,6 +1,6 @@ package com.fr.design.report.share; + import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.Utils; import com.fr.data.TableDataSource; import com.fr.data.impl.EmbeddedTableData; @@ -18,6 +18,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.general.GeneralUtils; import com.fr.general.IOUtils; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; @@ -193,7 +194,7 @@ public class ConfusionTableDataPane extends BasicBeanPane{ InputStream in = IOUtils.readResource("/com/fr/design/report/share/shareToolTip.html"); return IOUtils.inputStream2String(in); } catch (Exception e) { - FRContext.getLogger().error(e.getMessage(), e); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return StringUtils.EMPTY; @@ -228,7 +229,7 @@ public class ConfusionTableDataPane extends BasicBeanPane{ new ConfuseTabledataAction().confuse(info, tabledata); new TemplateTableDataWrapper(tabledata).previewData(); } catch (CloneNotSupportedException e1) { - FRContext.getLogger().error(e1.getMessage()); + FineLoggerFactory.getLogger().error(e1.getMessage()); } } }; diff --git a/designer-realize/src/main/java/com/fr/design/report/share/ShareButton.java b/designer-realize/src/main/java/com/fr/design/report/share/ShareButton.java index 140d997177..344312dd58 100644 --- a/designer-realize/src/main/java/com/fr/design/report/share/ShareButton.java +++ b/designer-realize/src/main/java/com/fr/design/report/share/ShareButton.java @@ -4,7 +4,6 @@ package com.fr.design.report.share; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.data.TableDataSource; import com.fr.data.impl.EmbeddedTableData; import com.fr.design.dialog.BasicDialog; @@ -18,9 +17,9 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.file.FILE; import com.fr.general.CloudCenter; - import com.fr.general.NameObject; import com.fr.io.exporter.ImageExporter; +import com.fr.log.FineLoggerFactory; import com.fr.main.TemplateWorkBook; import com.fr.main.workbook.ResultWorkBook; import com.fr.stable.ActorConstants; @@ -32,7 +31,7 @@ import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; import com.fr.workspace.WorkContext; -import java.awt.*; +import java.awt.Desktop; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; @@ -68,7 +67,7 @@ public class ShareButton extends UIButton{ try { Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("bbs.share"))); } catch (Exception e1) { - FRContext.getLogger().error(e1.getMessage()); + FineLoggerFactory.getLogger().error(e1.getMessage()); } } @@ -85,7 +84,7 @@ public class ShareButton extends UIButton{ try { exporter.export(new FileOutputStream(imageFile), res); } catch (Exception e2) { - FRContext.getLogger().error(e2.getMessage()); + FineLoggerFactory.getLogger().error(e2.getMessage()); } return imageFile.getParent(); diff --git a/designer-realize/src/main/java/com/fr/design/style/StylePane.java b/designer-realize/src/main/java/com/fr/design/style/StylePane.java index e4cf4f4d82..7fd8db07d4 100644 --- a/designer-realize/src/main/java/com/fr/design/style/StylePane.java +++ b/designer-realize/src/main/java/com/fr/design/style/StylePane.java @@ -3,23 +3,7 @@ */ package com.fr.design.style; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; - -import javax.swing.JComponent; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JTabbedPane; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; - import com.fr.base.CellBorderStyle; -import com.fr.base.FRContext; import com.fr.base.NameStyle; import com.fr.base.ScreenResolution; import com.fr.base.Style; @@ -27,19 +11,33 @@ import com.fr.base.core.StyleUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.layout.FRGUIPaneFactory; - import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.style.background.BackgroundPane; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.Selection; +import com.fr.log.FineLoggerFactory; import com.fr.report.cell.CellElement; import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.FloatElement; import com.fr.report.cell.TemplateCellElement; import com.fr.report.elementcase.ElementCase; import com.fr.report.elementcase.TemplateElementCase; -import com.fr.design.style.background.BackgroundPane; -import com.fr.design.utils.gui.GUICoreUtils; + +import javax.swing.JComponent; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTabbedPane; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; /** * Style Pane. @@ -221,7 +219,7 @@ public class StylePane extends BasicBeanPane