diff --git a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java index 80ce315255..80b731c1a1 100644 --- a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java +++ b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java @@ -89,14 +89,10 @@ public class ChartFloatAction extends ElementCaseAction { Style style = newFloatElement.getStyle(); if (style != null) { - newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black, - Constants.LINE_NONE, Color.black, - Constants.LINE_NONE, Color.black, - Constants.LINE_NONE, Color.black)); + newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black)); } reportPane.getEditingElementCase().addFloatElement(newFloatElement); reportPane.setSelection(new FloatSelection(newFloatElement.getName())); - reportPane.fireTargetModified(); reportPane.fireSelectionChangeListener(); } catch (CloneNotSupportedException e) { FRLogger.getLogger().error("Error in Float"); diff --git a/designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java b/designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java index 3a57b11ec5..a941660aa1 100644 --- a/designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java +++ b/designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java @@ -1,7 +1,6 @@ package com.fr.design.mainframe; -import com.fr.base.BaseUtils; +import com.fr.base.ConfigManager; import com.fr.design.DesignerEnvManager; -import com.fr.design.mainframe.bbs.BBSConstants; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.stable.StableUtils; @@ -102,7 +101,7 @@ public class ActiveKeyGenerator { HashMap para = new HashMap(); para.put("uuid", envManager.getUUID()); para.put("key", key); - para.put("username", envManager.getBBSName()); + para.put("username", ConfigManager.getProviderInstance().getBbsUsername()); HttpClient hc = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("verify.code"), para); if (timeout != -1) { hc.setTimeout(timeout); diff --git a/designer/src/com/fr/design/mainframe/InformationCollector.java b/designer/src/com/fr/design/mainframe/InformationCollector.java index 4bac9a15b0..a5912da56b 100644 --- a/designer/src/com/fr/design/mainframe/InformationCollector.java +++ b/designer/src/com/fr/design/mainframe/InformationCollector.java @@ -3,6 +3,7 @@ */ package com.fr.design.mainframe; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.data.core.db.DBUtils; import com.fr.data.core.db.dialect.DialectFactory; @@ -134,7 +135,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { content.put(XML_UUID, envManager.getUUID()); content.put(XML_JAR, GeneralUtils.readBuildNO()); content.put(XML_VERSION, ProductConstants.RELEASE_VERSION); - content.put(XML_USERNAME, envManager.getBBSName()); + content.put(XML_USERNAME, ConfigManager.getProviderInstance().getBbsUsername()); content.put(XML_KEY, envManager.getActivationKey()); content.put(XML_OS, System.getProperty("os.name")); @@ -254,7 +255,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { } DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); - content.put("username", envManager.getBBSName()); + content.put("username", ConfigManager.getProviderInstance().getBbsUsername()); content.put("uuid", envManager.getUUID()); content.put("functions", functionArray); diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index 1d5faa3b63..f0f80f58ca 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.alphafine.component; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.dialog.UIDialog; @@ -776,7 +777,7 @@ public class AlphaFineDialog extends UIDialog { */ private void sendToServer(String searchKey, AlphaCellModel cellModel) { if (cellModel.isNeedToSendToServer()) { - String username = DesignerEnvManager.getEnvManager().getBBSName(); + String username = ConfigManager.getProviderInstance().getBbsUsername(); String uuid = DesignerEnvManager.getEnvManager().getUUID(); String activityKey = DesignerEnvManager.getEnvManager().getActivationKey(); String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime()); diff --git a/designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java b/designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java index 3946b73e5d..f5401c0282 100644 --- a/designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java +++ b/designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java @@ -1,6 +1,8 @@ package com.fr.design.mainframe.bbs; -import com.fr.design.DesignerEnvManager; +import com.fr.base.ConfigManager; +import com.fr.base.FRContext; +import com.fr.design.bbs.BBSLoginUtils; import com.fr.design.dialog.UIDialog; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.ActionLabel; @@ -207,8 +209,8 @@ public class BBSLoginDialog extends UIDialog { // 登录成功 private void loginSuccess() { - DesignerEnvManager.getEnvManager().setBBSPassword(String.valueOf(passField.getPassword())); - userInfoLabel.setUserName(nameField.getText()); + String password = String.valueOf(passField.getPassword()); + BBSLoginUtils.bbsLogin(nameField.getText(), password); userInfoLabel.getUserInfoPane().markSignIn(nameField.getText()); BBSLoginDialog.this.setVisible(false); } diff --git a/designer/src/com/fr/design/mainframe/bbs/ExitLabel.java b/designer/src/com/fr/design/mainframe/bbs/ExitLabel.java index c3436755a2..a830d3332d 100644 --- a/designer/src/com/fr/design/mainframe/bbs/ExitLabel.java +++ b/designer/src/com/fr/design/mainframe/bbs/ExitLabel.java @@ -9,14 +9,13 @@ import java.awt.event.MouseEvent; import com.fr.base.BaseUtils; -import com.fr.design.DesignerEnvManager; +import com.fr.design.bbs.BBSLoginUtils; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; -import com.fr.stable.StringUtils; /** * @author neil @@ -61,8 +60,7 @@ public class ExitLabel extends UILabel{ } private void clearLoingInformation(){ - DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY); - DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY); + BBSLoginUtils.bbsLogout(); } private void updateInfoPane(){ diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java index 4d58b3db67..b4ba82399d 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -3,8 +3,10 @@ */ package com.fr.design.mainframe.bbs; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; +import com.fr.design.bbs.BBSLoginUtils; import com.fr.design.extra.*; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.imenu.UIMenuItem; @@ -16,12 +18,7 @@ import com.fr.general.DateUtils; import com.fr.general.Inter; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; -import com.fr.plugin.manage.bbs.BBSPluginLogin; -import com.fr.plugin.manage.bbs.BBSUserInfo; -import com.fr.stable.EncodeConstants; -import com.fr.stable.OperatingSystem; -import com.fr.stable.StableUtils; -import com.fr.stable.StringUtils; +import com.fr.stable.*; import javax.swing.*; import java.awt.*; @@ -77,7 +74,7 @@ public class UserInfoLabel extends UILabel { public UserInfoLabel(UserInfoPane userInfoPane) { this.userInfoPane = userInfoPane; - String userName = DesignerEnvManager.getEnvManager().getBBSName(); + String userName = ConfigManager.getProviderInstance().getBbsUsername(); this.addMouseListener(userInfoAdapter); this.setHorizontalAlignment(SwingConstants.CENTER); this.setText(userName); @@ -117,10 +114,9 @@ public class UserInfoLabel extends UILabel { } private void clearLoginInformation() { - DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY); - DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY); - DesignerEnvManager.getEnvManager().setInShowBBsName(StringUtils.EMPTY); - DesignerEnvManager.getEnvManager().setBbsUid(DEFAULT_BBS_UID); + ConfigManager.getProviderInstance().setInShowBBsName(StringUtils.EMPTY); + ConfigManager.getProviderInstance().setBbsUid(DEFAULT_BBS_UID); + BBSLoginUtils.bbsLogout(); } private void updateInfoPane() { @@ -192,8 +188,6 @@ public class UserInfoLabel extends UILabel { return; } - //往designerenvmanger里写一下 - DesignerEnvManager.getEnvManager().setBBSName(userName); this.userName = userName; } @@ -238,8 +232,7 @@ public class UserInfoLabel extends UILabel { @Override public void mouseClicked(MouseEvent e) { - BBSUserInfo bbsUserInfo = BBSPluginLogin.getInstance().getUserInfo(); - userName = bbsUserInfo == null ? "" : bbsUserInfo.getUserName(); + userName = ConfigManager.getProviderInstance().getBbsUsername(); if (StringUtils.isNotEmpty(userName)) { UIPopupMenu menu = new UIPopupMenu(); menu.setOnlyText(true); @@ -265,10 +258,9 @@ public class UserInfoLabel extends UILabel { UIMenuItem closeOther = new UIMenuItem(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account")); closeOther.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { - BBSPluginLogin.getInstance().logOut(); + BBSLoginUtils.bbsLogout(); UserLoginContext.fireLoginContextListener(); } - }); menu.add(priviteMessage); menu.add(closeOther); diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java index a638ac3e42..711fd634dd 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java @@ -11,6 +11,7 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.dialog.BasicPane; @@ -18,8 +19,6 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.general.DateUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; -import com.fr.plugin.manage.bbs.BBSPluginLogin; -import com.fr.plugin.manage.bbs.BBSUserInfo; import com.fr.stable.StringUtils; @@ -77,9 +76,8 @@ public class UserInfoPane extends BasicPane{ @Override public void run() { - String username = DesignerEnvManager.getEnvManager().getBBSName(); - String inShowUsername = DesignerEnvManager.getEnvManager().getInShowBBsName(); - if (StringUtils.isEmpty(username) && StringUtils.isEmpty(inShowUsername)){ + String username = ConfigManager.getProviderInstance().getBbsUsername(); + if (StringUtils.isEmpty(username)){ markUnSignIn(); } else { markSignIn(username); @@ -133,7 +131,7 @@ public class UserInfoPane extends BasicPane{ FRContext.getLogger().error(e.getMessage()); } - String userName = DesignerEnvManager.getEnvManager().getBBSName(); + String userName = ConfigManager.getProviderInstance().getBbsUsername(); if(StringUtils.isNotEmpty(userName)){ return; } @@ -169,8 +167,6 @@ public class UserInfoPane extends BasicPane{ * */ public void markSignIn(String userName){ - String password = DesignerEnvManager.getEnvManager().getBBSPassword(); - BBSPluginLogin.getInstance().login(new BBSUserInfo(userName, password)); this.userInfoLabel.setText(userName); this.userInfoLabel.setUserName(userName); this.userInfoLabel.setOpaque(true); diff --git a/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java b/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java index 5467ede28a..e492253bd6 100644 --- a/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java +++ b/designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java @@ -76,7 +76,7 @@ public class CellElementEditPane extends BasicPane { downTitle = new JPanel(); downTitle.setLayout(new BorderLayout()); downTitle.add(tabsHeaderIconPane, BorderLayout.NORTH); - center.setBorder(BorderFactory.createEmptyBorder(0, LEFT_BORDER, 0, RIGHT_BORDER)); + center.setBorder(BorderFactory.createEmptyBorder(0, LEFT_BORDER, 0, 0)); downTitle.add(center, BorderLayout.CENTER); this.add(downTitle, BorderLayout.CENTER); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java index 2e5fcb3c0f..c7e6c93e09 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java @@ -188,7 +188,7 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { // extendable - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD-Expandable"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Expandable"))) { if (horizontalExpandableCheckBox.isSelected()) { if (verticalExpandableCheckBox.isSelected()) { cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 411ef87a92..53aa5e3dcf 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -10,7 +10,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.JTemplate; @@ -22,6 +22,7 @@ import com.fr.report.cell.cellattr.CellGUIAttr; import com.fr.report.cell.cellattr.CellInsertPolicyAttr; import com.fr.report.cell.cellattr.CellPageAttr; import com.fr.report.elementcase.TemplateElementCase; +import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.event.ChangeEvent; @@ -47,9 +48,9 @@ public class CellOtherSetPane extends AbstractCellAttrPane { private UIComboBox showContent; - private UITextField tooltipTextField; + private UIPropertyTextField tooltipTextField; - private UITextField fileNameTextField; + private UIPropertyTextField fileNameTextField; // 分页 private UICheckBox pageBeforeRowCheckBox; @@ -228,8 +229,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane { final JPanel fileNamePane = new JPanel(fileNameLayout); JPanel fileNameCCPane = new JPanel(new BorderLayout(4, 0)); fileNameCCPane.add(new UILabel(Inter.getLocText("FR-Designer_File_Name_For_Download")), BorderLayout.WEST); - fileNameTextField = new UITextField(); - tooltipTextField = new UITextField(); + fileNameTextField = new UIPropertyTextField(); + tooltipTextField = new UIPropertyTextField(); tooltipTextField.getUI(); fileNamePane.add(new JPanel(), "none"); fileNamePane.add(fileNameCCPane, "content"); @@ -248,8 +249,6 @@ public class CellOtherSetPane extends AbstractCellAttrPane { } } }); - tooltipTextField = new UITextField(); - tooltipTextField.getUI(); return fileNamePane; } @@ -344,6 +343,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane { this.valueEditor.populate(defaultValue); } else { insertRowPolicy.setSelectedIndex(0); + this.valueEditor.populate(StringUtils.EMPTY); } if (insertRowPolicy.getSelectedIndex() == 1) { insertRowPane.setPreferredSize(new Dimension(100, 20)); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java index b899071d6a..e12e8dacdc 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java @@ -45,14 +45,14 @@ public class CustomStylePane extends MultiTabPane