Browse Source

REPORT-113994 【NewUI】面板遗留问题解决

newui
Levy.Xie-解安森 6 months ago
parent
commit
1daa6a0e02
  1. 3
      designer-base/src/main/java/com/fr/design/gui/frpane/FineTabbedPane.java
  2. 1
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java
  3. 1
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsProgressDialog.java
  4. 64
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotUITabGroup.java
  5. 19
      designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotSeriesPane.java

3
designer-base/src/main/java/com/fr/design/gui/frpane/FineTabbedPane.java

@ -19,6 +19,8 @@ import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineClientProperties.PANEL_TYPE;
import static com.fine.theme.utils.FineClientProperties.ROUNDED_PANEL;
/**
* Tab面板组件
@ -118,6 +120,7 @@ public class FineTabbedPane extends Column {
private void initLayout() {
cards = new CardLayout();
centerPane = new JPanel(cards);
centerPane.putClientProperty(PANEL_TYPE, ROUNDED_PANEL);
tabComponents.forEach((key, value) -> {
value.setOpaque(false);
centerPane.add(value, key);

1
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java

@ -174,7 +174,6 @@ public class VcsMovePanel extends BasicPane {
JPanel processPane = new JPanel();
JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
PROGRESS_BAR.setStringPainted(true);
PROGRESS_BAR.setUI(new ModernUIProgressBarUI());
PROGRESS_BAR.setBorderPainted(false);
PROGRESS_BAR.setOpaque(false);
PROGRESS_BAR.setBorder(null);

1
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsProgressDialog.java

@ -38,7 +38,6 @@ public class VcsProgressDialog{
};
JPanel body = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
progressBar.setStringPainted(true);
progressBar.setUI(new ModernUIProgressBarUI());
progressBar.setBorderPainted(false);
progressBar.setOpaque(false);
progressBar.setBorder(null);

64
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotUITabGroup.java

@ -2,14 +2,10 @@ package com.fr.van.chart.custom.component;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UITabGroup;
import com.fr.design.gui.ibutton.UIToggleButton;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.LayoutManager;
@ -36,66 +32,6 @@ public class VanChartCustomPlotUITabGroup extends UITabGroup{
return new GridBagLayout();
}
@Override
protected void initButton(UIToggleButton labelButton, int buttonIndex) {
int ButtonWidth = WIDTH / 3;
if (listNum <= 1){
return;
}else if (listNum == 2){
ButtonWidth = WIDTH / 2;
}
//将button加入到pane中,以便可以对边框进行控制
labelButton.setRoundBorder(false);
labelButton.setBorderPainted(false);
labelButtonList.add(labelButton);
int index = labelButtonList.size() - 1;
JPanel panel = getButtonPanel(labelButton, index);
GridBagConstraints constraints=new GridBagConstraints();
int end = listNum % 3;
if (end == 1 && index == 0){
constraints.gridy = 0;
constraints.gridx = 0;
constraints.gridheight = 1;
constraints.gridwidth = 6;
ButtonWidth = WIDTH + 2;
}else if (end == 2 && (index == 0 || index == 1) && listNum != 2){
constraints.gridy = 0;
constraints.gridx = index == 1 ? 4 : 0;
constraints.gridheight = 1;
constraints.gridwidth = index == 0 ? 4 : 2;
ButtonWidth = index == 0 ? ButtonWidth * 2 + 1 : ButtonWidth;
}else {
int l = ((index + ((end == 0) ? end : (3 - end))) / 3);
constraints.gridy = l;
constraints.gridx = ((index - (l * 3 - (end == 0 ? end : 3 - end))))*2;
constraints.gridheight = 1;
constraints.gridwidth = 2;
}
labelButton.setPreferredSize(new Dimension(ButtonWidth, BUTTON_HEIGHT));
this.add(panel, constraints);
}
private JPanel getButtonPanel(UIToggleButton labelButton, int index) {
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(labelButton,BorderLayout.CENTER);
setPanelBorder(panel, index);
return panel;
}
public void setPanelBorder(JPanel panel, int index) {
int end = listNum % 3;
int num = listNum;

19
designer-chart/src/main/java/com/fr/van/chart/custom/style/VanChartCustomPlotSeriesPane.java

@ -1,20 +1,17 @@
package com.fr.van.chart.custom.style;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.series.AbstractPlotSeriesPane;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
/**
* Created by Fangjie on 2016/4/26.
*/
public class VanChartCustomPlotSeriesPane extends BasicBeanPane<Plot> {
private static final int WIDTH = 236;
private static final int DELTA_HEIGHT = 300;
private BasicBeanPane<Plot> axisPane;
private AbstractPlotSeriesPane seriesPane;
public VanChartCustomPlotSeriesPane(BasicBeanPane<Plot> axisPane, AbstractPlotSeriesPane seriesPane) {
@ -25,15 +22,7 @@ public class VanChartCustomPlotSeriesPane extends BasicBeanPane<Plot> {
}
private void initContentPane() {
seriesPane.setPreferredSize(new Dimension(WIDTH, (int) (seriesPane.getPreferredSize().getHeight() + DELTA_HEIGHT)));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p, p, p};
setLayout(new BorderLayout());
if (axisPane == null) {
this.add(seriesPane);
}else {
@ -41,7 +30,7 @@ public class VanChartCustomPlotSeriesPane extends BasicBeanPane<Plot> {
new Component[]{axisPane},
new Component[]{seriesPane}
};
this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize));
this.add(FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1}));
}
}

Loading…
Cancel
Save