neil 9 years ago
parent
commit
f960aef3f4
  1. 6
      designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java
  2. 2
      designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java
  3. 5
      designer_base/src/com/fr/design/actions/file/LocalePane.java
  4. 31
      designer_base/src/com/fr/design/actions/file/PreferencePane.java
  5. 5
      designer_base/src/com/fr/design/extra/PluginFromStorePane.java
  6. 5
      designer_base/src/com/fr/design/extra/PluginUpdatePane.java
  7. 4
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java
  8. 9
      designer_base/src/com/fr/design/utils/DesignUtils.java
  9. 6
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java

6
designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java

@ -225,9 +225,13 @@ public class BBSLoginDialog extends UIDialog {
setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Login-Failure-Tip"));
}
public void tipForUsernameEmpty(){
private void tipForUsernameEmpty(){
setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Username-Empty-Tip"));
}
public void showTipForDownloadPluginWithoutLogin() {
setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Download-Unlogin-Tip"));
}
private void tipForPasswordEmpty(){
setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Password-Empty-Tip"));

2
designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -81,7 +81,7 @@ public class UserInfoLabel extends UILabel{
bbsLoginDialog = new BBSLoginDialog(DesignerContext.getDesignerFrame(), UserInfoLabel.this);
}
bbsLoginDialog.clearLoginInformation();
bbsLoginDialog.tipForUsernameEmpty();
bbsLoginDialog.showTipForDownloadPluginWithoutLogin();
bbsLoginDialog.setModal(true);
bbsLoginDialog.showWindow();
}

5
designer_base/src/com/fr/design/actions/file/LocalePane.java

@ -48,6 +48,7 @@ public class LocalePane extends BasicPane {
private static final String CN = "fr_zh_CN.properties";
private static final String JP = "fr_ja_JP.properties";
private static final String TW = "fr_zh_TW.properties";
private static final String KR = "fr_ko_KR.properties";
private static final String PREFIX = "fr_";
private static final int LOCALE_NAME_LEN = 5;
@ -128,6 +129,7 @@ public class LocalePane extends BasicPane {
Properties cn = loadLocaleProperties(CN);
Properties jp = loadLocaleProperties(JP);
Properties tw = loadLocaleProperties(TW);
Properties kr = loadLocaleProperties(KR);
Set<String> keys = fr.stringPropertyNames();
List<String> sortKeys = new ArrayList<String>(keys);
@ -138,6 +140,7 @@ public class LocalePane extends BasicPane {
Vector<String> cnVector = new Vector<String>();
Vector<String> jpVector = new Vector<String>();
Vector<String> twVector = new Vector<String>();
Vector<String> krVector = new Vector<String>();
for (String key : sortKeys) {
keyVector.add(key);
valueVector.add(fr.getProperty(key));
@ -145,6 +148,7 @@ public class LocalePane extends BasicPane {
cnVector.add(cn.getProperty(key));
jpVector.add(jp.getProperty(key));
twVector.add(tw.getProperty(key));
krVector.add(kr.getProperty(key));
}
predefineTableModel.addColumn(Inter.getLocText("Key"), keyVector);
predefineTableModel.addColumn(Inter.getLocText("Value"), valueVector);
@ -152,6 +156,7 @@ public class LocalePane extends BasicPane {
predefineTableModel.addColumn("zh_CN", cnVector);
predefineTableModel.addColumn("ja_JP", jpVector);
predefineTableModel.addColumn("zh_TW", twVector);
predefineTableModel.addColumn("ko_KR", krVector);
}
private void initCustomProperties() throws Exception {

31
designer_base/src/com/fr/design/actions/file/PreferencePane.java

@ -1,24 +1,5 @@
package com.fr.design.actions.file;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.util.Locale;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import com.fr.base.BaseUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.BasicDialog;
@ -39,9 +20,16 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.general.FRLevel;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.File;
import java.util.Locale;
/**
* 选项对话框
*
@ -87,7 +75,9 @@ public class PreferencePane extends BasicPane {
getLocaledLanguage("Simplified_Chinese_Language", Locale.SIMPLIFIED_CHINESE),
getLocaledLanguage("English_Language", Locale.ENGLISH),
getLocaledLanguage("Japanese_Language", Locale.JAPAN),
getLocaledLanguage("Traditional_Chinese_Language", Locale.TRADITIONAL_CHINESE)};
getLocaledLanguage("Traditional_Chinese_Language", Locale.TRADITIONAL_CHINESE),
getLocaledLanguage("Korea_Language",Locale.KOREA),
};
//设置是否支持undo
private UICheckBox supportUndoCheckBox;
@ -366,6 +356,7 @@ public class PreferencePane extends BasicPane {
generalPane.add(languageAndDashBoard_pane);
languageAndDashBoard_pane.add(LanguagePane);
languageComboBox = new UIComboBox(LANGUAGE);
languageComboBox.setFont(FRFont.getInstance("Dialog", Font.PLAIN, 12));//为了在中文系统中显示韩文
ActionLabel languageLabel = new ActionLabel(Inter.getLocText("FR-Designer_Designer_Language"));
languageLabel.addActionListener(new ActionListener() {
@Override

5
designer_base/src/com/fr/design/extra/PluginFromStorePane.java

@ -184,6 +184,9 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane<Plugin[],
}
private void doUpdateOnline(final PluginStatusCheckCompletePane pane) {
if (StringUtils.isEmpty(DesignerEnvManager.getEnvManager().getBBSName())){
LoginCheckContext.fireLoginCheckListener();
}
if (StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getBBSName())){
new SwingWorker<Void, Double>(){
@ -229,8 +232,6 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane<Plugin[],
}
}
}.execute();
} else {
LoginCheckContext.fireLoginCheckListener();
}
}

5
designer_base/src/com/fr/design/extra/PluginUpdatePane.java

@ -165,6 +165,9 @@ public class PluginUpdatePane extends PluginAbstractLoadingViewPane<Plugin[], Vo
}
private void doUpdateOnline(final PluginStatusCheckCompletePane pane) {
if (StringUtils.isEmpty(DesignerEnvManager.getEnvManager().getBBSName())){
LoginCheckContext.fireLoginCheckListener();
}
if (StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getBBSName())){
new SwingWorker<Void, Double>(){
@ -205,8 +208,6 @@ public class PluginUpdatePane extends PluginAbstractLoadingViewPane<Plugin[], Vo
}
}
}.execute();
} else {
LoginCheckContext.fireLoginCheckListener();
}
}

4
designer_base/src/com/fr/design/mainframe/DesignerFrame.java

@ -568,11 +568,13 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
JTemplate<?, ?> editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
StringBuilder defaultTitleSB = new StringBuilder();
defaultTitleSB.append(ProductConstants.PRODUCT_NAME);
defaultTitleSB.append(" ");
defaultTitleSB.append(ProductConstants.BRANCH);
// james:标识登录的用户和登录的ENV
String envName = DesignerEnvManager.getEnvManager().getCurEnvName();
Env env = DesignerEnvManager.getEnvManager().getEnv(envName);
if (env != null) {
defaultTitleSB.append('-').append(env.getUser()).append('@').append(envName).append('[');
defaultTitleSB.append(env.getUser()).append('@').append(envName).append('[');
defaultTitleSB.append(env.getEnvDescription());
defaultTitleSB.append(']');
if (editingTemplate != null) {

9
designer_base/src/com/fr/design/utils/DesignUtils.java

@ -247,7 +247,11 @@ public class DesignUtils {
//默认语言(中文:宋体, 英文:Tahoma, 其他:Dialog)
guiFRFont = getNamedFont("SimSun");
if (!guiFRFont.canDisplay(displayChar)) {
FRContext.getLogger().error(Inter.getLocText("FR-Base_SimSun_Not_Found"));
//比如想在中文或英文系统里用韩文设计器
guiFRFont = getNamedFont("Dialog");
if(!guiFRFont.canDisplay(displayChar)) {
FRContext.getLogger().error(Inter.getLocText("FR-Base_SimSun_Not_Found"));
}
}
}
@ -266,7 +270,8 @@ public class DesignUtils {
return ComparatorUtils.equals(defaultLocale, Locale.TRADITIONAL_CHINESE)
|| ComparatorUtils.equals(defaultLocale, Locale.JAPANESE)
|| ComparatorUtils.equals(defaultLocale, Locale.JAPAN)
|| ComparatorUtils.equals(defaultLocale, Locale.KOREAN);
|| ComparatorUtils.equals(defaultLocale, Locale.KOREAN)
|| ComparatorUtils.equals(defaultLocale, Locale.KOREA);
}
/**

6
designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java

@ -5,6 +5,7 @@ import com.fr.chart.base.AttrAlpha;
import com.fr.chart.base.AttrBackground;
import com.fr.chart.base.AttrContents;
import com.fr.chart.base.DataSeriesCondition;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.data.condition.AbstractCondition;
@ -49,10 +50,13 @@ public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAt
pane.setBorder(BorderFactory.createEmptyBorder());
// 条件界面
pane.add(liteConditionPane = ChartConditionPaneFactory.createChartConditionPane(getClass()), BorderLayout.CENTER);
pane.add(liteConditionPane = createListConditionPane(), BorderLayout.CENTER);
// kunsnat_size 加载属性之后 被遮挡, 最少的高度为300, 5个按钮
liteConditionPane.setPreferredSize(new Dimension(300, 300));
}
protected ChartConditionPane createListConditionPane() {
return ChartConditionPaneFactory.createChartConditionPane(getClass());
}
protected void addBasicAction() {
classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this));

Loading…
Cancel
Save