Browse Source

REPORT-133037 fix:自动刷新面板修复&参数面板移动端显示效果优化

fbp/release
Levy.Xie-解安森 3 months ago
parent
commit
87382872c2
  1. 18
      designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java
  2. 26
      designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java
  3. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPaneWithoutTooltip.java
  4. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java
  5. 18
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java

18
designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java

@ -2,13 +2,13 @@ package com.fr.design.gui.controlpane;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.actions.UpdateAction;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.ilist.UIList;
import com.fr.design.gui.itoolbar.UIToolBarUI;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.menu.ShortCut;
@ -22,7 +22,6 @@ import sun.swing.DefaultLookup;
import javax.swing.BorderFactory;
import javax.swing.DefaultListModel;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.ListCellRenderer;
@ -33,8 +32,6 @@ import javax.swing.event.ListSelectionListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
@ -89,22 +86,14 @@ public class UISimpleListControlPane extends BasicPane {
toolbarDef.addShortCut(sj.getShortCut());
}
toolBar = ToolBarDef.createJToolBar();
toolBar.setUI(new UIToolBarUI(){
@Override
public void paint(Graphics g, JComponent c) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.WHITE);
g2.fillRect(0, 0, c.getWidth(), c.getHeight());
}
});
toolbarDef.updateToolBar(toolBar);
// 封装一层,加边框
JPanel toolBarPane = new JPanel(new BorderLayout());
toolBarPane.add(toolBar, BorderLayout.CENTER);
toolBarPane.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, UIConstants.RULER_LINE_COLOR));
toolBarPane.setBorder(FineBorderFactory.createDefaultUnderlineBorder());
listPane.add(toolBarPane, BorderLayout.NORTH);
contentPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
return contentPane;
}
@ -420,7 +409,6 @@ public class UISimpleListControlPane extends BasicPane {
private void initComponents() {
label = new UILabel();
// label.setBorder(BorderFactory.createEmptyBorder(3, 10, 3, 0));
initialLabelForeground = label.getForeground();
this.setLayout(new BorderLayout());
this.add(label, BorderLayout.CENTER);

26
designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java

@ -18,6 +18,7 @@ import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import org.jetbrains.annotations.Nullable;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
@ -82,28 +83,22 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
initTooltipSet();
JPanel jPanel = new JPanel(new BorderLayout());
jPanel.add(autoTooltip, BorderLayout.CENTER);
jPanel.add(tooltipSet, BorderLayout.EAST);
JPanel tipPane = getTooltipPane();
JPanel moreLabelPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_More_Label")), moreLabel);
Component[][] components = initComponent(jPanel);
JPanel panel1 = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
Component[][] components = initComponent(tipPane);
contentPane = new JPanel(new BorderLayout());
contentPane.add(panel1, BorderLayout.CENTER);
contentPane.add(FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}), BorderLayout.CENTER);
Component[][] AutoTooltipComponent = initAutoTooltipComponent();
JPanel panel2 = FineLayoutBuilder.compatibleTableLayout(10, AutoTooltipComponent, new double[]{1.2, 2, 1});
contentPane.add(panel2, BorderLayout.SOUTH);
return FineLayoutBuilder.createVerticalLayout(10, moreLabelPane, contentPane);
}
protected Component[][] initComponent(JPanel autoTooltipPane){
Column toolTipPane = column(10,
Column centerPane = column(10,
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Interval"))),
flex(),
@ -114,11 +109,20 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
).getComponent();
return new Component[][]{
new Component[]{null, toolTipPane}
new Component[]{null, centerPane}
};
}
@Nullable
protected JPanel getTooltipPane() {
JPanel tipPane = new JPanel(new BorderLayout());
tipPane.add(autoTooltip, BorderLayout.CENTER);
tipPane.add(tooltipSet, BorderLayout.EAST);
return tipPane;
}
@Deprecated
protected Component[][] initAutoTooltipComponent () {
return new Component[][]{

9
designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPaneWithoutTooltip.java

@ -3,7 +3,7 @@ package com.fr.van.chart.designer.other;
import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.vanchart.VanChart;
import java.awt.Component;
import javax.swing.JPanel;
/**
* Created by mengao on 2017/6/21.
@ -14,10 +14,9 @@ public class AutoRefreshPaneWithoutTooltip extends AutoRefreshPane {
super(chart, isLargeModel);
}
protected Component[][] initAutoTooltipComponent () {
return new Component[][]{
new Component[]{null, null},
};
@Override
protected JPanel getTooltipPane() {
return null;
}
protected void updateAutoTooltip(RefreshMoreLabel refreshMoreLabel) {

3
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java

@ -281,7 +281,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
//图表缩放新设计 恢复用注释。删除下面八个方法getzoomTypePane createZoomPaneContent
// checkZoomEnabled getNameArray getValueArray checkZoomPane populateChartZoom updateChartZoom。
protected JPanel getZoomTypePane(UIButtonGroup zoomType) {
return TableLayout4VanChartHelper.createGapTableLayoutPaneWithoutTop(Toolkit.i18nText("Fine-Design_Chart_Zoom_Direction"), zoomType);
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Zoom_Direction")), zoomType);
}
protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, VanChartPlot plot) {

18
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java

@ -1,7 +1,7 @@
package com.fr.design.widget.ui.designer.mobile;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.properties.PropertyTab;
@ -10,8 +10,6 @@ import com.fr.design.fun.ParameterExpandablePaneUIProvider;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.MobileWidgetListPane;
import com.fr.design.mainframe.WidgetPropertyPane;
@ -22,7 +20,6 @@ import com.fr.form.ui.container.WSortLayout;
import com.fr.form.ui.mobile.MobileParamStyle;
import com.fr.report.mobile.EmptyMobileParamStyle;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
@ -68,25 +65,16 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane {
// 手机属性
private UIExpandablePane getMobilePropertyPane() {
mobileParamEditor = new AccessibleMobileParamEditor(new MobileParamSettingPane());
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Param_Style")), mobileParamEditor},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1);
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
jPanel.add(panel);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Properties_Mobile"), 280, 20, jPanel);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Properties_Mobile"), 280, 20, panel);
}
// 控件顺序
private UIExpandablePane getMobileWidgetListPane() {
mobileWidgetListPane = new MobileWidgetListPane(designer, (WSortLayout) paraCreator.toData());
mobileWidgetListPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 5, 0));
JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane();
panelWrapper.add(mobileWidgetListPane, BorderLayout.CENTER);

Loading…
Cancel
Save