diff --git a/designer/src/com/fr/design/condition/HyperlinkPane.java b/designer/src/com/fr/design/condition/HyperlinkPane.java index bbdecf661..7ff03a7c8 100644 --- a/designer/src/com/fr/design/condition/HyperlinkPane.java +++ b/designer/src/com/fr/design/condition/HyperlinkPane.java @@ -37,7 +37,7 @@ public class HyperlinkPane extends ConditionAttrSingleConditionPane { return ReportHyperlinkGroupPane.getInstance(hyperlinkGroupPaneActionProvider); } + @Override + public HyperlinkGroupPane getHyperLinkPaneNoPop(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { + return ReportHyperlinkGroupPaneNoPop.getInstance(hyperlinkGroupPaneActionProvider); + } + public void setAuthorityMode(boolean isUpMode) { centerPane.setAuthorityMode(isUpMode); } diff --git a/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java b/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java index b2b018e0b..20886536a 100644 --- a/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java +++ b/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPane.java @@ -23,7 +23,8 @@ import java.awt.*; public class ReportHyperlinkGroupPane extends HyperlinkGroupPane { private static ReportHyperlinkGroupPane singleton; - private ReportHyperlinkGroupPane(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { + // 仅供继承使用,外部通过 getInstance 获取实例 + protected ReportHyperlinkGroupPane(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { super(hyperlinkGroupPaneActionProvider); } @@ -35,7 +36,7 @@ public class ReportHyperlinkGroupPane extends HyperlinkGroupPane { return singleton; } - private void refreshPane() { + protected void refreshPane() { ElementCasePane reportPane = ((JWorkBook)HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()).getEditingElementCasePane(); if (reportPane == null) { return; diff --git a/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPaneNoPop.java b/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPaneNoPop.java new file mode 100644 index 000000000..451c89975 --- /dev/null +++ b/designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPaneNoPop.java @@ -0,0 +1,27 @@ +package com.fr.design.mainframe; + +import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; + +/** + * Created by plough on 2017/9/4. + */ +public class ReportHyperlinkGroupPaneNoPop extends ReportHyperlinkGroupPane{ + private static ReportHyperlinkGroupPaneNoPop singleton; + + private ReportHyperlinkGroupPaneNoPop(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { + super(hyperlinkGroupPaneActionProvider); + } + + public static ReportHyperlinkGroupPaneNoPop getInstance(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { + if (singleton == null) { + singleton = new ReportHyperlinkGroupPaneNoPop(hyperlinkGroupPaneActionProvider); + } + singleton.refreshPane(); + return singleton; + } + + @Override + protected boolean isNewStyle() { + return false; + } +} diff --git a/designer/src/com/fr/design/present/BarCodePane.java b/designer/src/com/fr/design/present/BarCodePane.java index ac3820338..74f5306b6 100644 --- a/designer/src/com/fr/design/present/BarCodePane.java +++ b/designer/src/com/fr/design/present/BarCodePane.java @@ -145,11 +145,13 @@ public class BarCodePane extends FurtherBasicBeanPane { barHeightContainer.add(barHeightSpinner); UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), UILabel.RIGHT); uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); + JPanel drawingTextCheckBoxPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); drawingTextCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER); + drawingTextCheckBoxPane.add(drawingTextCheckBox); Component[][] components_normal = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("FR-Designer_Barcode_Size"), UILabel.LEFT), barWidthContainer, barHeightContainer}, - new Component[]{null, new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), UILabel.CENTER), new UILabel(Inter.getLocText("FR-Designer_Height"), UILabel.CENTER)}, - new Component[]{drawingTextCheckBox, null, null} + new Component[]{null, new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), UILabel.CENTER), new UILabel(Inter.getLocText("FR-Designer-Tree_Height"), UILabel.CENTER)}, + new Component[]{drawingTextCheckBoxPane, null, null} }; diff --git a/designer/src/com/fr/design/widget/WidgetEventPaneNoPop.java b/designer/src/com/fr/design/widget/WidgetEventPaneNoPop.java index 60597b77b..b9d67ec88 100644 --- a/designer/src/com/fr/design/widget/WidgetEventPaneNoPop.java +++ b/designer/src/com/fr/design/widget/WidgetEventPaneNoPop.java @@ -2,8 +2,6 @@ package com.fr.design.widget; import com.fr.design.mainframe.ElementCasePane; -import java.awt.*; - /** * 没有悬浮弹窗的控件事件编辑面板 * Created by plough on 2017/8/28. @@ -17,9 +15,4 @@ public class WidgetEventPaneNoPop extends WidgetEventPane { protected boolean isNewStyle() { return false; } - - @Override - protected void popupEditDialog(Point mousePos) { - // no pop, do nothing - } } diff --git a/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java index 2a63a5b86..1bebaf90c 100644 --- a/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TreeComboBoxEditorDefinePane.java @@ -55,14 +55,14 @@ public class TreeComboBoxEditorDefinePane extends CustomWritableRepeatEditorPane @Override protected void populateSubCustomWritableRepeatEditorBean(TreeEditor e) { - treeSettingPane.setValue(e.getDictionary()); + treeSettingPane.setValue(e.getNodeOrDict()); treeRootPane.populate(e.getTreeAttr()); } @Override protected TreeComboBoxEditor updateSubCustomWritableRepeatEditorBean() { TreeComboBoxEditor editor = new TreeComboBoxEditor(); - editor.setDictionary((Dictionary)treeSettingPane.getValue()); + editor.setNodeOrDict(treeSettingPane.getValue()); editor.setTreeAttr(treeRootPane.update()); return editor; } diff --git a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java index 96d83b7b6..f98eea391 100644 --- a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java @@ -30,7 +30,7 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane { @Override protected void populateSubFieldEditorBean(TreeEditor e) { - this.accessibleTreeModelEditor.setValue(e.getDictionary()); + this.accessibleTreeModelEditor.setValue(e.getNodeOrDict()); treeRootPane.populate(e.getTreeAttr()); if (this.removeRepeatCheckBox != null) { this.removeRepeatCheckBox.setSelected(e.isRemoveRepeat()); @@ -40,7 +40,7 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane { @Override protected TreeEditor updateSubFieldEditorBean() { TreeEditor editor = new TreeEditor(); - editor.setDictionary((Dictionary) accessibleTreeModelEditor.getValue()); + editor.setNodeOrDict(accessibleTreeModelEditor.getValue()); editor.setTreeAttr(treeRootPane.update()); if (this.removeRepeatCheckBox != null) { editor.setRemoveRepeat(this.removeRepeatCheckBox.isSelected()); diff --git a/designer/src/com/fr/grid/GridColumnUI.java b/designer/src/com/fr/grid/GridColumnUI.java index 971282168..ab32e6ce8 100644 --- a/designer/src/com/fr/grid/GridColumnUI.java +++ b/designer/src/com/fr/grid/GridColumnUI.java @@ -163,11 +163,11 @@ public class GridColumnUI extends ComponentUI { float time = (float)resolution/ScreenResolution.getScreenResolution(); double stringWidth = gridColumn.getFont().getStringBounds(columnContent, fontRenderContext).getWidth() * time; -// if (stringWidth > tmpIncreaseWidth) { -// paintMoreContent(i, g2d, tmpWidth1, size, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); -// } else { + if (stringWidth > tmpIncreaseWidth) { + paintMoreContent(i, g2d, tmpWidth1, size, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); + } else { paintNormalContent(i, g2d, tmpWidth1, tmpIncreaseWidth, isSelectedBounds, gridColumn, elementCase, columnContent, stringWidth, fmAscent); -// } + } } diff --git a/designer/src/com/fr/grid/GridRowUI.java b/designer/src/com/fr/grid/GridRowUI.java index 016cfe637..2f97914bb 100644 --- a/designer/src/com/fr/grid/GridRowUI.java +++ b/designer/src/com/fr/grid/GridRowUI.java @@ -159,20 +159,21 @@ public class GridRowUI extends ComponentUI { float fmAscent = GraphHelper.getFontMetrics(gridRow.getFont()).getAscent() * time; double stringWidth = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getWidth() * time; double stringHeight = gridRow.getFont().getStringBounds(paintText, fontRenderContext).getHeight() * time; - if (isSelectedBounds) { - g2d.setColor(gridRow.getSelectedForeground()); - } else { - // p:检查eanbled - if (gridRow.isEnabled()) { - g2d.setColor(gridRow.getForeground()); + // 如果高度太小了就不画了 + if (stringHeight <= tmpIncreaseHeight + 2) { + if (isSelectedBounds) { + g2d.setColor(gridRow.getSelectedForeground()); } else { - g2d.setPaint(UIManager.getColor("controlShadow")); + // p:检查eanbled + if (gridRow.isEnabled()) { + g2d.setColor(gridRow.getForeground()); + } else { + g2d.setPaint(UIManager.getColor("controlShadow")); + } } - } - - GraphHelper.drawString(g2d, paintText, (size.width - stringWidth) / 2, tmpHeight1 + (tmpIncreaseHeight - stringHeight) / 2 + GridHeader.SIZE_ADJUST / 2 + fmAscent - - 2); + GraphHelper.drawString(g2d, paintText, (size.width - stringWidth) / 2, tmpHeight1 + (tmpIncreaseHeight - stringHeight) / 2 + GridHeader.SIZE_ADJUST / 2 + fmAscent - 2); + } } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/condition/LiteConditionPane.java b/designer_base/src/com/fr/design/condition/LiteConditionPane.java index 33f2e30c8..1ce56fb3a 100644 --- a/designer_base/src/com/fr/design/condition/LiteConditionPane.java +++ b/designer_base/src/com/fr/design/condition/LiteConditionPane.java @@ -167,9 +167,6 @@ public abstract class LiteConditionPane extends BasicBeanPa TreePath selectedTreePath = conditionsTree.getSelectionPath(); if (selectedTreePath == null) { - // 清空编辑框 - defaultConditionPane.populateBean((T)new ObjectCondition(new Compare(Compare.EQUALS, StringUtils.EMPTY))); - formulaTextArea.setText(StringUtils.EMPTY); return; } @@ -856,6 +853,10 @@ public abstract class LiteConditionPane extends BasicBeanPa rootTreeNode.setUserObject(new JoinCondition(DataConstants.AND, new ListCondition())); rootTreeNode.removeAllChildren(); + // 清空编辑框 + defaultConditionPane.populateBean((T)new ObjectCondition(new Compare(Compare.EQUALS, StringUtils.EMPTY))); + formulaTextArea.setText(StringUtils.EMPTY); + // peter:需要构建成ListCondition,加入到里面. if (liteCondition instanceof ListCondition) { ListCondition listCondition = (ListCondition) liteCondition; diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java index 3af8618b3..a521fbddf 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -27,22 +27,17 @@ import java.awt.event.WindowEvent; public abstract class UIControlPane extends BasicPane implements UnrepeatedNameHelper { protected static final int SHORT_WIDTH = 30; //每加一个short Divider位置加30 protected JPanel controlUpdatePane; - private ShortCut4JControlPane[] shorts; private NameableCreator[] creators; private ToolBarDef toolbarDef; - private UIToolbar toolBar; private UIToolbar topToolBar; protected Window popupEditDialog; // peter:这是整体的一个cardLayout Pane protected CardLayout cardLayout; - protected JPanel cardPane; - protected BasePlot plot; - public UIControlPane() { this.initComponentPane(); } @@ -128,8 +123,15 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH this.add(getLeftPane(), BorderLayout.CENTER); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 15, 15)); } else { + // 增加边框 + JPanel leftPaneWrapper = new JPanel(new BorderLayout()); + leftPaneWrapper.add(getLeftPane(), BorderLayout.CENTER); + leftPaneWrapper.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); + JPanel rightPaneWrapper = new JPanel(new BorderLayout()); + rightPaneWrapper.add(cardPane, BorderLayout.CENTER); + rightPaneWrapper.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); // SplitPane - JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, getLeftPane(), cardPane); + JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftPaneWrapper, rightPaneWrapper); mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor())); mainSplitPane.setOneTouchExpandable(true); this.add(mainSplitPane, BorderLayout.CENTER); diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java index d96862a39..ca0363d25 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java @@ -390,13 +390,15 @@ public abstract class UIListControlPane extends UIControlPane { } } - protected void popupEditDialog(Point mousePos) { - Rectangle currentCellBounds = nameableList.getCellBounds(editingIndex, editingIndex); - if (editingIndex < 0 || !currentCellBounds.contains(mousePos)) { - return; + private void popupEditDialog(Point mousePos) { + if (isNewStyle()) { + Rectangle currentCellBounds = nameableList.getCellBounds(editingIndex, editingIndex); + if (editingIndex < 0 || !currentCellBounds.contains(mousePos)) { + return; + } + popupEditDialog.setLocation(getPopupDialogLocation()); + popupEditDialog.setVisible(true); } - popupEditDialog.setLocation(getPopupDialogLocation()); - popupEditDialog.setVisible(true); } private Point getPopupDialogLocation() { diff --git a/designer_base/src/com/fr/design/mainframe/JTemplate.java b/designer_base/src/com/fr/design/mainframe/JTemplate.java index 4f9c7a205..633fc066b 100644 --- a/designer_base/src/com/fr/design/mainframe/JTemplate.java +++ b/designer_base/src/com/fr/design/mainframe/JTemplate.java @@ -890,6 +890,13 @@ public abstract class JTemplate> ex */ public abstract HyperlinkGroupPane getHyperLinkPane(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider); + /** + * 返回当前支持的超链界面pane + * 没有悬浮弹窗,显示为两列 + * @return 超链连接界面 + */ + public abstract HyperlinkGroupPane getHyperLinkPaneNoPop(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider); + /** * 是否是图表 * diff --git a/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPane.java b/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPane.java index 125f6b751..1d3e14686 100644 --- a/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPane.java +++ b/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPane.java @@ -12,7 +12,7 @@ import com.fr.js.EmailJavaScript; public class FormHyperlinkGroupPane extends HyperlinkGroupPane{ private static FormHyperlinkGroupPane singleton; - private FormHyperlinkGroupPane(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { + protected FormHyperlinkGroupPane(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { super(hyperlinkGroupPaneActionProvider); } diff --git a/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPaneNoPop.java b/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPaneNoPop.java new file mode 100644 index 000000000..313b57147 --- /dev/null +++ b/designer_form/src/com/fr/design/gui/xpane/FormHyperlinkGroupPaneNoPop.java @@ -0,0 +1,26 @@ +package com.fr.design.gui.xpane; + +import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; + +/** + * Created by plough on 2017/9/5. + */ +public class FormHyperlinkGroupPaneNoPop extends FormHyperlinkGroupPane{ + private static FormHyperlinkGroupPaneNoPop singleton; + + private FormHyperlinkGroupPaneNoPop(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { + super(hyperlinkGroupPaneActionProvider); + } + + public static FormHyperlinkGroupPaneNoPop getInstance(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { + if (singleton == null) { + singleton = new FormHyperlinkGroupPaneNoPop(hyperlinkGroupPaneActionProvider); + } + return singleton; + } + + @Override + protected boolean isNewStyle() { + return false; + } +} diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index c84f572fd..e6432bf1e 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -22,6 +22,7 @@ import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.xpane.FormHyperlinkGroupPane; +import com.fr.design.gui.xpane.FormHyperlinkGroupPaneNoPop; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.actions.EmbeddedFormExportExportAction; import com.fr.design.mainframe.actions.FormMobileAttrAction; @@ -147,10 +148,16 @@ public class JForm extends JTemplate implements BaseJForm { * * @return 超链连接界面 */ + @Override public HyperlinkGroupPane getHyperLinkPane(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { return FormHyperlinkGroupPane.getInstance(hyperlinkGroupPaneActionProvider); } + @Override + public HyperlinkGroupPane getHyperLinkPaneNoPop(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { + return FormHyperlinkGroupPaneNoPop.getInstance(hyperlinkGroupPaneActionProvider); + } + //表单返回 FORM_TAB or ELEMENTCASE_TAB public int getEditingReportIndex() { return this.index; diff --git a/designer_form/src/com/fr/design/widget/ui/designer/FreeButtonDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/FreeButtonDefinePane.java index 1c4ef03a0..db6635453 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/FreeButtonDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/FreeButtonDefinePane.java @@ -45,10 +45,8 @@ public class FreeButtonDefinePane extends ButtonDefinePane { public FreeButton updateSubButtonPane() { FreeButton freeButton = (FreeButton) creator.toData(); backgroundCompPane.update(freeButton); - FRFont frFont = freeButton.getFont(); - if(frFont != null){ - frFontPane.update(frFont); - } + FRFont frFont = freeButton.getFont() == null ? FRFont.getInstance() : freeButton.getFont(); + freeButton.setFont(frFontPane.update(frFont)); return freeButton; } } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/TreeEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/TreeEditorDefinePane.java index 100fb2800..bb48d586a 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/TreeEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/TreeEditorDefinePane.java @@ -69,7 +69,7 @@ public class TreeEditorDefinePane extends CustomWritableRepeatEditorPane