Browse Source

Merge pull request #652 in BA/design from ~LEE/design_release:release to release

* commit '3e336de89112134b56027d55542717a26f04e6a2':
  1
  国际化文件
master
superman 8 years ago
parent
commit
dede814828
  1. 3
      designer_base/src/com/fr/design/locale/designer.properties
  2. 3
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  3. 3
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  4. 3
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  5. 3
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  6. 3
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  7. 3
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java
  8. 3
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java
  9. 52
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java

3
designer_base/src/com/fr/design/locale/designer.properties

@ -516,3 +516,6 @@ FR-Designer_FormulaPane_Variables=Variables
FR-Designer_FormulaPane_Formula_Description=Formula_Description
FR-Designer_FormulaPane_Function_Detail=Function Detail
FR-Designer_FormulaPane_Search=Search
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

3
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -516,3 +516,6 @@ FR-Designer_FormulaPane_Variables=Variables
FR-Designer_FormulaPane_Formula_Description=Formula Description
FR-Designer_FormulaPane_Function_Detail=Function Detail
FR-Designer_FormulaPane_Search=Search
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

3
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -495,3 +495,6 @@ FR-Designer_FormulaPane_Variables=\u5909\u6570
FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAC\u660E
FR-Designer_FormulaPane_Function_Detail=\u95A2\u6570\u660E\u7D30
FR-Designer_FormulaPane_Search=\u691C\u7D22
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

3
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -490,3 +490,6 @@ FR-Designer_FormulaPane_Variables=\uBCC0\uC218
FR-Designer_FormulaPane_Formula_Description=\uC218\uC2DD\uC124\uBA85
FR-Designer_FormulaPane_Function_Detail=\uD568\uC218\uC0C1\uC138\uC0AC\uD56D
FR-Designer_FormulaPane_Search=\uAC80\uC0C9
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

3
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -520,3 +520,6 @@ FR-Designer_FormulaPane_Variables=\u53D8\u91CF
FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8BF4\u660E
FR-Designer_FormulaPane_Function_Detail=\u51FD\u6570\u660E\u7EC6
FR-Designer_FormulaPane_Search=\u641C\u7D22
FR-Designer_Tab_carousel=tab\u8F6E\u64AD
FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD
FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694

3
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -508,3 +508,6 @@ FR-Designer_FormulaPane_Variables=\u8B8A\u91CF
FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAA\u660E
FR-Designer_FormulaPane_Function_Detail=\u51FD\u6578\u660E\u7D30
FR-Designer_FormulaPane_Search=\u641C\u7D22
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

3
designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java

@ -146,7 +146,8 @@ public class XCardAddButton extends XButton{
//设置标题
titleButton.setText(getTabTitleName());
titleButton.setInitialBackground(ColorBackground.getInstance(Color.WHITE));
XCardSwitchButton showButton = new XCardSwitchButton(titleButton,dimension,cardLayout,tagLayout);
XCardSwitchButton showButton = new XCardSwitchButton(titleButton, dimension, cardLayout, tagLayout);
titleButton.setCustomStyle(true);
titleButton.setShowButton(true);
showButton.setBackupParent(tagLayout);

3
designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -11,6 +11,7 @@ import java.util.*;
import javax.swing.*;
import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.base.background.ColorBackground;
import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter;
@ -353,7 +354,7 @@ public class XCardSwitchButton extends XButton {
CardSwitchButton tempCard = (CardSwitchButton) temp.toData();
String tempText = tempCard.getText();
Font f = ((CardSwitchButton)this.toData()).getFont();
FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(f);
FontMetrics fm = GraphHelper.getFontMetrics(f);
cardWidth.put(i,fm.stringWidth(tempText));
cardHeight.put(i,fm.getHeight());
}

52
designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java

@ -6,13 +6,16 @@ package com.fr.design.designer.creator.cardlayout;
import com.fr.base.background.ColorBackground;
import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRCardLayoutAdapter;
import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.*;
import com.fr.design.form.layout.FRCardLayout;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.editors.BooleanEditor;
import com.fr.design.mainframe.widget.editors.CardTagWLayoutBorderStyleEditor;
import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer;
import com.fr.design.mainframe.widget.editors.DoubleEditor;
import com.fr.form.ui.*;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WCardLayout;
@ -22,6 +25,7 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.form.ui.container.cardlayout.WCardTitleLayout;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import com.fr.stable.core.PropertyChangeAdapter;
@ -39,6 +43,8 @@ public class XWCardLayout extends XLayoutContainer {
private CardLayout cardLayout;
private boolean initFlag = true;
private static final int NORTH = 0;
private FormDesigner designer;
//默认蓝色标题背景
private static final Color TITLE_COLOR = new Color(51, 132, 240);
@ -197,6 +203,7 @@ public class XWCardLayout extends XLayoutContainer {
CardSwitchButton firstBtn = new CardSwitchButton(widgetName);
firstBtn.setText(Inter.getLocText("FR-Designer_Title") + 0);
firstBtn.setInitialBackground(ColorBackground.getInstance(Color.WHITE));
firstBtn.setCustomStyle(true);
xTag.setCurrentCard(firstBtn);
XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1), this, xTag);
xFirstBtn.setBackupParent(xTag);
@ -271,6 +278,47 @@ public class XWCardLayout extends XLayoutContainer {
* @throws IntrospectionException
*/
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel();
return ArrayUtils.addAll(getDefaultDescriptor(), crp);
}
public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException {
return new CRPropertyDescriptor[] {
new CRPropertyDescriptor("carousel", this.data.getClass())
.setEditorClass(BooleanEditor.class)
.setI18NName(Inter.getLocText("FR-Designer_setCarousel"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel")
.setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
designer = WidgetPropertyPane.getInstance().getEditingFormDesigner();
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED);
}
}),
new CRPropertyDescriptor("carouselInterval", this.data.getClass())
.setEditorClass(DoubleEditor.class)
.setI18NName(Inter.getLocText("FR-Designer_carouselInterval"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel")
};
}
public CRPropertyDescriptor[] getisnotCarousel() throws IntrospectionException {
return new CRPropertyDescriptor[] {
new CRPropertyDescriptor("carousel", this.data.getClass())
.setEditorClass(BooleanEditor.class)
.setI18NName(Inter.getLocText("FR-Designer_setCarousel"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel")
.setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
designer = WidgetPropertyPane.getInstance().getEditingFormDesigner();
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED);
}
})
};
}
public CRPropertyDescriptor[] getDefaultDescriptor() throws IntrospectionException {
return new CRPropertyDescriptor[] {
new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter
.getLocText("FR-Designer_Form-Widget_Name")).setPropertyChangeListener(new PropertyChangeAdapter(){
@ -290,7 +338,7 @@ public class XWCardLayout extends XLayoutContainer {
public void propertyChange() {
initStyle();
}
}),
})
};
}

Loading…
Cancel
Save