Browse Source

标题选中图标大小&文本与第一行对齐

fbp/master
renekton 1 month ago
parent
commit
9e29d81145
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/ThemedCellStyleListPane.java
  2. 1
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  3. 29
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  4. 22
      designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

2
designer-base/src/main/java/com/fr/design/mainframe/theme/ThemedCellStyleListPane.java

@ -115,7 +115,7 @@ public class ThemedCellStyleListPane extends FurtherBasicBeanPane<ThemedCellStyl
private static class RadioButtonListCellRangeRenderer extends JPanel implements ListCellRenderer<ThemedCellStyle>, Serializable { private static class RadioButtonListCellRangeRenderer extends JPanel implements ListCellRenderer<ThemedCellStyle>, Serializable {
private static final Icon SELECTEDMARK_ICON = new LazyIcon("selectedMark"); private static final Icon SELECTEDMARK_ICON = new LazyIcon("selectedMark", 32);
private final CellRectangleStylePreviewPane previewArea; private final CellRectangleStylePreviewPane previewArea;
private boolean selected = false; private boolean selected = false;

1
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -733,7 +733,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
// 设置column1的editor // 设置column1的editor
columnsComboBox = new UIComboBox(new DefaultComboBoxModel()); columnsComboBox = new UIComboBox(new DefaultComboBoxModel());
columnsComboBox.setRenderer(new UIComboBoxRenderer() { columnsComboBox.setRenderer(new UIComboBoxRenderer() {
@Override @Override

29
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -5,6 +5,7 @@ import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
@ -54,6 +55,9 @@ import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/** /**
* 数据点提示内容界面含有通用设置富文本编辑器自定义JS界面 * 数据点提示内容界面含有通用设置富文本编辑器自定义JS界面
*/ */
@ -291,14 +295,21 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
} }
protected JPanel createCommonFormatPanel() { protected JPanel createCommonFormatPanel() {
JPanel formatContent = FineLayoutBuilder.compatibleTableLayout(10, getPaneComponents(), new double[]{1.2, 3}); Component[][] paneComponents = getPaneComponents();
Component[][] components = new Component[][]{ Component[][] components = new Component[paneComponents.length+1][2];
new Component[]{null, null}, components[0] = new Component[]{null, null};
new Component[]{new UILabel(getLabelContentTitle()), formatContent}
}; for (int i = 0; i < paneComponents.length; i++) {
if (i == 0) {
components[i+1][0] = new UILabel(getLabelContentTitle());
} else {
components[i+1][0] = null;
}
components[i+1][1] = row(10, cell(paneComponents[i][0]).weight(LayoutConstants.LEFT_WEIGHT), cell(paneComponents[i][1]).weight(LayoutConstants.RIGHT_WEIGHT)).getComponent();
}
return Layouts.cell(FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3})) return cell(FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{LayoutConstants.LEFT_WEIGHT, LayoutConstants.RIGHT_WEIGHT}))
.with(it ->it.setBorder(new ScaledEmptyBorder(0, 0, 10, 0))).getComponent(); .with(it ->it.setBorder(new ScaledEmptyBorder(0, 0, 10, 0))).getComponent();
} }
@ -310,10 +321,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
textAttrPane = createChartTextAttrPane(); textAttrPane = createChartTextAttrPane();
stylePanel = Layouts.column(10, stylePanel = Layouts.column(10,
Layouts.row( row(
Layouts.cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"))).weight(1.2), Layouts.cell(styleButton).weight(3) cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"))).weight(1.2), cell(styleButton).weight(3)
), ),
Layouts.cell(textAttrPane) cell(textAttrPane)
).getComponent(); ).getComponent();
initStyleButtonListener(); initStyleButtonListener();

22
designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -377,7 +377,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
ColumnRowGroupCellRenderer2 cellRenderer2 = new ColumnRowGroupCellRenderer2(); ColumnRowGroupCellRenderer2 cellRenderer2 = new ColumnRowGroupCellRenderer2();
cellRenderer2.setHorizontalAlignment(SwingConstants.LEFT); cellRenderer2.setHorizontalAlignment(SwingConstants.LEFT);
column2.setCellRenderer(cellRenderer2); column2.setCellRenderer(cellRenderer2);
column2.setCellEditor(new SmartColumnValueEditor(ValueEditorPaneFactory.cellGroupEditor())); column2.setCellEditor(new ColumnValueEditor(ValueEditorPaneFactory.cellGroupEditor()));
} else { } else {
SelectedColumnValueTableCellRenderer renderer = new SelectedColumnValueTableCellRenderer(); SelectedColumnValueTableCellRenderer renderer = new SelectedColumnValueTableCellRenderer();
renderer.setHorizontalAlignment(SwingConstants.LEFT); renderer.setHorizontalAlignment(SwingConstants.LEFT);
@ -615,24 +615,4 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
} }
} }
} }
protected class SmartColumnValueEditor extends ColumnValueEditor {
protected SmartColumnValueEditor(Editor<?>[] types) {
super(types);
}
/**
* 双击修改
* @param anEvent 事件
* @return 是否可编辑
*/
@Override
public boolean isCellEditable(EventObject anEvent) {
if (anEvent instanceof MouseEvent) {
return ((MouseEvent) anEvent).getClickCount() >= 2;
}
return true;
}
}
} }

Loading…
Cancel
Save