From 923defe65c70e10c0c17992cfa867b8f33090970 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 10 Jan 2017 17:39:13 +0800 Subject: [PATCH 01/10] delete --- .../com/fr/design/images/buttonicon/delete.png | Bin 0 -> 432 bytes .../creator/cardlayout/XCardSwitchButton.java | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 designer_base/src/com/fr/design/images/buttonicon/delete.png diff --git a/designer_base/src/com/fr/design/images/buttonicon/delete.png b/designer_base/src/com/fr/design/images/buttonicon/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..6755647485403ef8343766c2b78ebb569f6d7ff7 GIT binary patch literal 432 zcmV;h0Z;ykP)Px$YDq*vR5%f(Q?X9NKn(RI5GFE}N~oc6tPTIbHy~A=n5s$@-@r$tE8-_u zvqWtfN~bVUlpKC0K3ywdpq3(EY`=HUcRr#6&Ftgfvh1{~>pPBT)|eD|V{O4MkHhfc zEYIH&Q`;dZhQlk?`j(E{IdacP6#Hl5F(HSP#n@DqbwOpAQaNy{YHN)jLm+3n5( zK1ovw;@IJ^Mhu1xPzwzHg#bOPY!sePCe)iwg#=)%5%Wlr_MGSlEX;Ys!esfmUQ@l< zP?RLpo6R7YqQQW+Wl6|+mht*t6fpEc6HQgoYCNXxa!FCY{|#O&B!--t-jEPzaL2cb zBxZg;S0QNcS!%Usk Date: Tue, 10 Jan 2017 17:40:37 +0800 Subject: [PATCH 02/10] delete --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 92f3933588..ca4f7f1f10 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -374,7 +374,7 @@ public class XCardSwitchButton extends XButton { this.setSize(dimension); XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); - //tempCard.setDefaultWidth(cardWidth); + tempCard.setDefaultWidth(cardWidth); } } From aad680b44458e67fdbad394aa81afec71e8f865b Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Tue, 10 Jan 2017 20:02:20 +0800 Subject: [PATCH 03/10] =?UTF-8?q?REPORT-576=20tab=E4=B8=ADbutton=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E8=87=AA=E5=8A=A8=E6=89=A9=E5=B1=95bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XLayoutContainer.java | 23 ++++++++++++++-- .../creator/cardlayout/XCardSwitchButton.java | 26 ++++++++++++------- .../creator/cardlayout/XWCardLayout.java | 3 +-- .../creator/cardlayout/XWCardTagLayout.java | 12 --------- .../creator/cardlayout/XWTabFitLayout.java | 24 ++++++++++++++--- 5 files changed, 60 insertions(+), 28 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java index 47f4270a5e..254e9a9184 100644 --- a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java +++ b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java @@ -10,8 +10,6 @@ import com.fr.design.form.util.XCreatorConstants; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.widget.editors.PaddingMarginEditor; import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor; -import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; -import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer; import com.fr.design.parameter.ParameterBridge; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WLayout; @@ -81,6 +79,27 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme }; } + /** + * 控件名属性 + * @return + * @throws IntrospectionException + */ + public CRPropertyDescriptor createWidgetNameDescriptor() throws IntrospectionException { + return new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter + .getLocText("FR-Designer_Form-Widget_Name")); + } + + /** + * 边距属性 + * @return + * @throws IntrospectionException + */ + public CRPropertyDescriptor createMarginDescriptor() throws IntrospectionException { + return new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_Layout-Padding")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"); + } + /** * 返回对应的wlayout * @return wlayout控件 diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index ca4f7f1f10..6baa740947 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -6,8 +6,7 @@ package com.fr.design.designer.creator.cardlayout; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.geom.Rectangle2D; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import javax.swing.*; @@ -58,6 +57,9 @@ public class XCardSwitchButton extends XButton { private static final int RIGHT_OFFSET = 15; private static final int TOP_OFFSET = 25; + //这边先不计算button的高度,涉及到layout那边的整体高度,先用之前的固定高度 + private static final int DEFAULT_BUTTON_HEIGHT = 36; + // tab按钮里的字体因为按钮内部的布局看起来比正常的要小,加个调整量 private static final int FONT_SIZE_ADJUST = 2; @@ -70,7 +72,6 @@ public class XCardSwitchButton extends XButton { private Background selectBackground; private boolean isCustomStyle; - private Icon closeIcon = MOUSE_COLSE; public XWCardTagLayout getTagLayout() { @@ -169,6 +170,7 @@ public class XCardSwitchButton extends XButton { editingMouseListener.startEditing(this, adapter.getDesignerEditor(), adapter); } + setTabsAndAdjust(); } //删除card,同时修改其他switchbutton和tabfit的index @@ -258,6 +260,7 @@ public class XCardSwitchButton extends XButton { public void paintComponent(Graphics g) { super.paintComponent(g); + setTabsAndAdjust(); Graphics2D g2d = (Graphics2D) g; drawBackgorund(); drawTitle(); @@ -359,22 +362,27 @@ public class XCardSwitchButton extends XButton { } public void adjustTabs(int tabLength, Map width, Map height) { + if (width == null) { + return; + } int tempX = 0; for (int i = 0; i < tabLength; i++) { - Rectangle rectangle = this.tagLayout.getComponent(i).getBounds(); + Rectangle rectangle = this.tagLayout.getComponent(i).getBounds(); Integer cardWidth = width.get(i) + SIDE_OFFSET; - Integer cardHeight = height.get(i) + HEIGHT_OFFSET; + //先用这边的固定高度 + Integer cardHeight = DEFAULT_BUTTON_HEIGHT; rectangle.setSize(cardWidth, cardHeight); rectangle.setBounds(tempX, 0, cardWidth, cardHeight); tempX += cardWidth; this.tagLayout.getComponent(i).setBounds(rectangle); Dimension dimension = new Dimension(); dimension.setSize(cardWidth, cardHeight); - this.getContentLabel().setSize(dimension); - this.setSize(dimension); XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); - CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); - tempCard.setDefaultWidth(cardWidth); + UILabel label = temp.getContentLabel(); + label.setSize(dimension); + temp.setContentLabel(label); + temp.setSize(dimension); + temp.setPreferredSize(new Dimension(cardWidth, cardHeight)); } } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 4f2492ee9e..d008ccd521 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -198,8 +198,7 @@ public class XWCardLayout extends XLayoutContainer { firstBtn.setText(Inter.getLocText("FR-Designer_Title") + 0); firstBtn.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); xTag.setCurrentCard(firstBtn); - XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1),this,xTag); - firstBtn.setCustomStyle(true); + XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1), this, xTag); xFirstBtn.setBackupParent(xTag); return xFirstBtn; diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java index e40a7ca871..82170bacc2 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java @@ -163,18 +163,6 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout { * void */ public void adjustComponentWidth(){ - int btnNum = this.getComponentCount(); - int tagLayoutWidth = this.getWidth(); - int allBtnWidth = btnNum * CardSwitchButton.DEF_WIDTH + btnNum; - int size = CardSwitchButton.DEF_WIDTH; - if(tagLayoutWidth - allBtnWidth < CardSwitchButton.DEF_WIDTH){ - size = (tagLayoutWidth - CardSwitchButton.DEF_WIDTH - btnNum)/btnNum; - } - WCardTagLayout layout = (WCardTagLayout)this.toData(); - for(int i=0;i Date: Wed, 11 Jan 2017 10:50:43 +0800 Subject: [PATCH 04/10] =?UTF-8?q?REPORT-576=20font=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 6baa740947..31c45681da 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -31,7 +31,6 @@ import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; import com.fr.general.Inter; -import sun.font.FontDesignMetrics; /** * @@ -354,7 +353,7 @@ public class XCardSwitchButton extends XButton { CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); String tempText = tempCard.getText(); Font f = ((CardSwitchButton)this.toData()).getFont(); - FontMetrics fm = FontDesignMetrics.getMetrics(f); + FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(f); cardWidth.put(i,fm.stringWidth(tempText)); cardHeight.put(i,fm.getHeight()); } From 345922137f87049468c3c26096633b4592f44c2e Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Wed, 11 Jan 2017 14:37:42 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E7=94=98=E7=89=B9=E5=9B=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/data/NormalChartDataPane.java | 6 +++++- .../fr/design/mainframe/chart/gui/data/TableDataPane.java | 2 +- .../designer/creator/cardlayout/XCardSwitchButton.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index cae7afc39a..7ff9593b38 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -70,7 +70,7 @@ public class NormalChartDataPane extends DataContentsPane { @Override protected List> initPaneList() { - tableDataPane = new TableDataPane(parent); + tableDataPane = getTableDataPane(parent); reportDataPane = new ReportDataPane(parent); List> paneList = new ArrayList>(); paneList.add(tableDataPane); @@ -96,6 +96,10 @@ public class NormalChartDataPane extends DataContentsPane { } + protected TableDataPane getTableDataPane(ChartDataPane chartDataPane) { + return new TableDataPane(chartDataPane); + } + /** * 更新界面 数据内容 */ diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java index 3b6c71ef1e..a6bea6b0ca 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java @@ -69,7 +69,7 @@ public class TableDataPane extends FurtherBasicBeanPane{ } } - private AbstractTableDataContentPane getContentPane(Plot plot) { + protected AbstractTableDataContentPane getContentPane(Plot plot) { return ChartTypeInterfaceManager.getInstance().getTableDataSourcePane(plot, parent); } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index ca4f7f1f10..92f3933588 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -374,7 +374,7 @@ public class XCardSwitchButton extends XButton { this.setSize(dimension); XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); - tempCard.setDefaultWidth(cardWidth); + //tempCard.setDefaultWidth(cardWidth); } } From 37d3840a812f3465cc7246481c14c284c75a91bf Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 11 Jan 2017 17:10:00 +0800 Subject: [PATCH 06/10] =?UTF-8?q?REPORT-576=20tabpane=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardAddButton.java | 4 +- .../creator/cardlayout/XWCardLayout.java | 90 ++++++++++++++----- 2 files changed, 71 insertions(+), 23 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index 441b56575f..fa4c1d4a9b 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -147,11 +147,11 @@ 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); - this.tagLayout.setCurrentCard(titleButton); this.tagLayout.setTabFitIndex(index); this.tagLayout.add(showButton); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index d008ccd521..4dbc1a5676 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/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,27 +278,68 @@ public class XWCardLayout extends XLayoutContainer { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() 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() { + 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-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-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-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 - public void propertyChange() { - initStyle(); - } - }), - }; + @Override + public void propertyChange() { + initStyle(); + } + }) + }; } //初始化样式 From 16a0924d53a44090a0af9b0b535157e3549225ae Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 11 Jan 2017 17:29:59 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 31c45681da..28c5e33e3f 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/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()); } From d69603d181d231eae93297fe7b9938620abe8776 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Thu, 12 Jan 2017 11:44:56 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=95=8C=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/data/NormalChartDataPane.java | 6 +++++- .../fr/design/mainframe/chart/gui/data/ReportDataPane.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index 7ff9593b38..6a33c6df96 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -71,7 +71,7 @@ public class NormalChartDataPane extends DataContentsPane { @Override protected List> initPaneList() { tableDataPane = getTableDataPane(parent); - reportDataPane = new ReportDataPane(parent); + reportDataPane = getReportDataPane(parent); List> paneList = new ArrayList>(); paneList.add(tableDataPane); 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) { return new TableDataPane(chartDataPane); } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java index a3ede1b9f3..c5d80ccc17 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java @@ -21,7 +21,7 @@ public class ReportDataPane extends FurtherBasicBeanPane{ this.parent = parent; } - private AbstractReportDataContentPane getContentPane(Chart chart) { + protected AbstractReportDataContentPane getContentPane(Chart chart) { if(chart == null) { return null; } From adbebac9de82f4894e9d26531838a1894ebc2fda Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Thu, 12 Jan 2017 14:26:37 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E6=97=A0jiar=20=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E6=96=87=E4=BB=B6=E5=86=85=E5=AE=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 3 +++ .../src/com/fr/design/locale/designer_en_US.properties | 3 +++ .../src/com/fr/design/locale/designer_ja_JP.properties | 3 +++ .../src/com/fr/design/locale/designer_ko_KR.properties | 3 +++ .../src/com/fr/design/locale/designer_zh_CN.properties | 5 ++++- .../src/com/fr/design/locale/designer_zh_TW.properties | 3 +++ .../fr/design/designer/creator/cardlayout/XWCardLayout.java | 4 ++-- 7 files changed, 21 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index f97208a310..41f3c8cdd8 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/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_Clear= FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 495ebed06d..334e01ca8c 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/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_Clear=Clear FR-Designer_Background_Image_Select=Select Picture +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index c60ce8891d..6312538cf7 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/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_Clear= FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 079af536db..87a1b893c8 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/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_Clear= FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index a40f6d3a4c..10c53380d0 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/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_Image=\u56FE\u7247 FR-Designer_Background_Clear=\u6E05\u9664 -FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 \ No newline at end of file +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 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 8392f1fdb1..96cb4260a9 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/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_Clear= FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 4dbc1a5676..d1e6e40520 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -287,7 +287,7 @@ public class XWCardLayout extends XLayoutContainer { new CRPropertyDescriptor("carousel", this.data.getClass()) .setEditorClass(BooleanEditor.class) .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Tab_carousel") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override public void propertyChange() { @@ -307,7 +307,7 @@ public class XWCardLayout extends XLayoutContainer { new CRPropertyDescriptor("carousel", this.data.getClass()) .setEditorClass(BooleanEditor.class) .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Tab_carousel") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override public void propertyChange() { From 8a94bcb0fddf2d16646362c4a20a2269d87b08e1 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Thu, 12 Jan 2017 14:36:11 +0800 Subject: [PATCH 10/10] 1 1 --- .../com/fr/design/designer/creator/cardlayout/XWCardLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index d1e6e40520..ac929a1635 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -298,7 +298,7 @@ public class XWCardLayout extends XLayoutContainer { new CRPropertyDescriptor("carouselInterval", this.data.getClass()) .setEditorClass(DoubleEditor.class) .setI18NName(Inter.getLocText("FR-Designer_carouselInterval")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Tab_carousel") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") }; }