xiaoxia 8 years ago
parent
commit
1985e8d4f3
  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. 5
      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. 6
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java
  8. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java
  9. 4
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java
  10. 4
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java
  11. 90
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java

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

@ -518,3 +518,6 @@ FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image= FR-Designer_Background_Image=
FR-Designer_Background_Clear= FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select= FR-Designer_Background_Image_Select=
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

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

@ -518,3 +518,6 @@ FR-Designer_Background_Gradient_Color=Gradient Color
FR-Designer_Background_Image=Image FR-Designer_Background_Image=Image
FR-Designer_Background_Clear=Clear FR-Designer_Background_Clear=Clear
FR-Designer_Background_Image_Select=Select Picture FR-Designer_Background_Image_Select=Select Picture
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

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

@ -497,3 +497,6 @@ FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image= FR-Designer_Background_Image=
FR-Designer_Background_Clear= FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select= FR-Designer_Background_Image_Select=
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

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

@ -492,3 +492,6 @@ FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image= FR-Designer_Background_Image=
FR-Designer_Background_Clear= FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select= FR-Designer_Background_Image_Select=
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

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

@ -521,4 +521,7 @@ FR-Designer_Background_Pattern=\u56FE\u6848
FR-Designer_Background_Gradient_Color=\u6E10\u53D8\u8272 FR-Designer_Background_Gradient_Color=\u6E10\u53D8\u8272
FR-Designer_Background_Image=\u56FE\u7247 FR-Designer_Background_Image=\u56FE\u7247
FR-Designer_Background_Clear=\u6E05\u9664 FR-Designer_Background_Clear=\u6E05\u9664
FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247
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

@ -510,3 +510,6 @@ FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image= FR-Designer_Background_Image=
FR-Designer_Background_Clear= FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select= FR-Designer_Background_Image_Select=
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=

6
designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java

@ -71,7 +71,7 @@ public class NormalChartDataPane extends DataContentsPane {
@Override @Override
protected List<FurtherBasicBeanPane<? extends ChartCollection>> initPaneList() { protected List<FurtherBasicBeanPane<? extends ChartCollection>> initPaneList() {
tableDataPane = getTableDataPane(parent); tableDataPane = getTableDataPane(parent);
reportDataPane = new ReportDataPane(parent); reportDataPane = getReportDataPane(parent);
List<FurtherBasicBeanPane<? extends ChartCollection>> paneList = new ArrayList<FurtherBasicBeanPane<? extends ChartCollection>>(); List<FurtherBasicBeanPane<? extends ChartCollection>> paneList = new ArrayList<FurtherBasicBeanPane<? extends ChartCollection>>();
paneList.add(tableDataPane); paneList.add(tableDataPane);
paneList.add(reportDataPane); paneList.add(reportDataPane);
@ -96,6 +96,10 @@ public class NormalChartDataPane extends DataContentsPane {
} }
protected ReportDataPane getReportDataPane(ChartDataPane parent) {
return new ReportDataPane(parent);
}
protected TableDataPane getTableDataPane(ChartDataPane chartDataPane) { protected TableDataPane getTableDataPane(ChartDataPane chartDataPane) {
return new TableDataPane(chartDataPane); return new TableDataPane(chartDataPane);
} }

2
designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java

@ -21,7 +21,7 @@ public class ReportDataPane extends FurtherBasicBeanPane<ChartCollection>{
this.parent = parent; this.parent = parent;
} }
private AbstractReportDataContentPane getContentPane(Chart chart) { protected AbstractReportDataContentPane getContentPane(Chart chart) {
if(chart == null) { if(chart == null) {
return null; return null;
} }

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

@ -147,11 +147,11 @@ public class XCardAddButton extends XButton{
//设置标题 //设置标题
titleButton.setText(getTabTitleName()); titleButton.setText(getTabTitleName());
titleButton.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); 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); titleButton.setShowButton(true);
showButton.setBackupParent(tagLayout); showButton.setBackupParent(tagLayout);
this.tagLayout.setCurrentCard(titleButton); this.tagLayout.setCurrentCard(titleButton);
this.tagLayout.setTabFitIndex(index); this.tagLayout.setTabFitIndex(index);
this.tagLayout.add(showButton); this.tagLayout.add(showButton);

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

@ -11,6 +11,7 @@ import java.util.*;
import javax.swing.*; import javax.swing.*;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.base.background.ColorBackground; import com.fr.base.background.ColorBackground;
import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.ComponentAdapter;
@ -31,7 +32,6 @@ import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.Inter; import com.fr.general.Inter;
import sun.font.FontDesignMetrics;
/** /**
* *
@ -354,7 +354,7 @@ public class XCardSwitchButton extends XButton {
CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); CardSwitchButton tempCard = (CardSwitchButton) temp.toData();
String tempText = tempCard.getText(); String tempText = tempCard.getText();
Font f = ((CardSwitchButton)this.toData()).getFont(); Font f = ((CardSwitchButton)this.toData()).getFont();
FontMetrics fm = FontDesignMetrics.getMetrics(f); FontMetrics fm = GraphHelper.getFontMetrics(f);
cardWidth.put(i,fm.stringWidth(tempText)); cardWidth.put(i,fm.stringWidth(tempText));
cardHeight.put(i,fm.getHeight()); cardHeight.put(i,fm.getHeight());
} }

90
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.base.background.ColorBackground;
import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRCardLayoutAdapter; 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.beans.models.SelectionModel;
import com.fr.design.designer.creator.*; import com.fr.design.designer.creator.*;
import com.fr.design.form.layout.FRCardLayout; import com.fr.design.form.layout.FRCardLayout;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.mainframe.FormDesigner; 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.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.*;
import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WCardLayout; 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.form.ui.container.cardlayout.WCardTitleLayout;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
@ -39,6 +43,8 @@ public class XWCardLayout extends XLayoutContainer {
private CardLayout cardLayout; private CardLayout cardLayout;
private boolean initFlag = true; private boolean initFlag = true;
private static final int NORTH = 0; private static final int NORTH = 0;
private FormDesigner designer;
//默认蓝色标题背景 //默认蓝色标题背景
private static final Color TITLE_COLOR = new Color(51, 132, 240); 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); CardSwitchButton firstBtn = new CardSwitchButton(widgetName);
firstBtn.setText(Inter.getLocText("FR-Designer_Title") + 0); firstBtn.setText(Inter.getLocText("FR-Designer_Title") + 0);
firstBtn.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); firstBtn.setInitialBackground(ColorBackground.getInstance(Color.WHITE));
firstBtn.setCustomStyle(true);
xTag.setCurrentCard(firstBtn); xTag.setCurrentCard(firstBtn);
XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1), this, xTag); XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1), this, xTag);
xFirstBtn.setBackupParent(xTag); xFirstBtn.setBackupParent(xTag);
@ -271,27 +278,68 @@ public class XWCardLayout extends XLayoutContainer {
* @throws IntrospectionException * @throws IntrospectionException
*/ */
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
return new CRPropertyDescriptor[] { CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel();
new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter return ArrayUtils.addAll(getDefaultDescriptor(), crp);
.getLocText("FR-Designer_Form-Widget_Name")).setPropertyChangeListener(new PropertyChangeAdapter(){ }
@Override public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException {
public void propertyChange(){ return new CRPropertyDescriptor[] {
WCardLayout cardLayout = toData(); new CRPropertyDescriptor("carousel", this.data.getClass())
changeRalateSwitchCardname(cardLayout.getWidgetName()); .setEditorClass(BooleanEditor.class)
} .setI18NName(Inter.getLocText("FR-Designer_setCarousel"))
}), .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel")
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( .setPropertyChangeListener(new PropertyChangeAdapter() {
CardTagWLayoutBorderStyleEditor.class).setI18NName( @Override
Inter.getLocText("FR-Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") public void propertyChange() {
.setPropertyChangeListener(new PropertyChangeAdapter() { 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(){
@Override
public void propertyChange(){
WCardLayout cardLayout = toData();
changeRalateSwitchCardname(cardLayout.getWidgetName());
}
}),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
CardTagWLayoutBorderStyleEditor.class).setI18NName(
Inter.getLocText("FR-Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")
.setPropertyChangeListener(new PropertyChangeAdapter() {
@Override @Override
public void propertyChange() { public void propertyChange() {
initStyle(); initStyle();
} }
}), })
}; };
} }
//初始化样式 //初始化样式

Loading…
Cancel
Save