Browse Source

Pull request #13270: REPORT-107972 【UI翻新】翻新主面板边距、边框、背景色等

Merge in DESIGN/design from ~LEVY.XIE/design:newui to newui

* commit '63e6b7733cbb078fc2ea2f2c086bfd5f7299d1b9':
  REPORT-107972 【UI翻新】翻新主面板边距、边框、背景色等
newui
Levy.Xie-解安森 10 months ago
parent
commit
54a6b813c0
  1. 62
      designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java
  2. 29
      designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java
  3. 1
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  4. 2
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  5. 59
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java
  6. 8
      designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java
  7. 1
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  8. 2
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  9. 3
      designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java
  10. 5
      designer-base/src/main/resources/com/fine/theme/icon/param/edit.svg
  11. 5
      designer-base/src/main/resources/com/fine/theme/icon/param/edit_disable.svg
  12. 6
      designer-base/src/main/resources/com/fine/theme/icon/param/edit_pressed.svg
  13. 5
      designer-base/src/main/resources/com/fine/theme/icon/param/hide.svg
  14. 5
      designer-base/src/main/resources/com/fine/theme/icon/param/hide_disable.svg
  15. 6
      designer-base/src/main/resources/com/fine/theme/icon/param/hide_pressed.svg
  16. 7
      designer-base/src/main/resources/com/fine/theme/icon/param/view.svg
  17. 28
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  18. 3
      designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java
  19. 8
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java
  20. 16
      designer-realize/src/main/java/com/fr/grid/GridColumnUI.java
  21. 13
      designer-realize/src/main/java/com/fr/grid/GridCorner.java
  22. 16
      designer-realize/src/main/java/com/fr/grid/GridRowUI.java

62
designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java

@ -69,34 +69,35 @@ public class FineLightIconSet extends AbstractIconSet {
new SvgIconSource("new_folder", "com/fine/theme/icon/filetree/new_folder.svg", true),
// 属性面板Icon
new SvgIconSource("cellattr", "com/fine/theme/icon/propertiestab/cellattr.svg", false),
new SvgIconSource("cellattr_disabled", "com/fine/theme/icon/propertiestab/cellattr_disabled.svg", false),
new SvgIconSource("cellattr_selected", "com/fine/theme/icon/propertiestab/cellattr_selected.svg", false),
new SvgIconSource("cellelement", "com/fine/theme/icon/propertiestab/cellelement.svg", false),
new SvgIconSource("cellelement_disabled", "com/fine/theme/icon/propertiestab/cellelement_disabled.svg", false),
new SvgIconSource("cellelement_selected", "com/fine/theme/icon/propertiestab/cellelement_selected.svg", false),
new SvgIconSource("conditionattr", "com/fine/theme/icon/propertiestab/conditionattr.svg", false),
new SvgIconSource("conditionattr_disabled", "com/fine/theme/icon/propertiestab/conditionattr_disabled.svg", false),
new SvgIconSource("conditionattr_selected", "com/fine/theme/icon/propertiestab/conditionattr_selected.svg", false),
new SvgIconSource("floatelement", "com/fine/theme/icon/propertiestab/floatelement.svg", false),
new SvgIconSource("floatelement_disabled", "com/fine/theme/icon/propertiestab/floatelement_disabled.svg", false),
new SvgIconSource("floatelement_selected", "com/fine/theme/icon/propertiestab/floatelement_selected.svg", false),
new SvgIconSource("hyperlink", "com/fine/theme/icon/propertiestab/hyperlink.svg", false),
new SvgIconSource("hyperlink_disabled", "com/fine/theme/icon/propertiestab/hyperlink_disabled.svg", false),
new SvgIconSource("hyperlink_selected", "com/fine/theme/icon/propertiestab/hyperlink_selected.svg", false),
new SvgIconSource("widgetlib", "com/fine/theme/icon/propertiestab/widgetlib.svg", false),
new SvgIconSource("widgetlib_disabled", "com/fine/theme/icon/propertiestab/widgetlib_disabled.svg", false),
new SvgIconSource("widgetlib_selected", "com/fine/theme/icon/propertiestab/widgetlib_selected.svg", false),
new SvgIconSource("widgetsettings", "com/fine/theme/icon/propertiestab/widgetsettings.svg", false),
new SvgIconSource("widgetsettings_disabled", "com/fine/theme/icon/propertiestab/widgetsettings_disabled.svg", false),
new SvgIconSource("widgetsettings_selected", "com/fine/theme/icon/propertiestab/widgetsettings_selected.svg", false),
new SvgIconSource("cellattr", "com/fine/theme/icon/propertiestab/cellattr.svg", false, 18),
new SvgIconSource("cellattr_disabled", "com/fine/theme/icon/propertiestab/cellattr_disabled.svg", false, 18),
new SvgIconSource("cellattr_selected", "com/fine/theme/icon/propertiestab/cellattr_selected.svg", false, 18),
new SvgIconSource("cellelement", "com/fine/theme/icon/propertiestab/cellelement.svg", false, 18),
new SvgIconSource("cellelement_disabled", "com/fine/theme/icon/propertiestab/cellelement_disabled.svg", false, 18),
new SvgIconSource("cellelement_selected", "com/fine/theme/icon/propertiestab/cellelement_selected.svg", false, 18),
new SvgIconSource("conditionattr", "com/fine/theme/icon/propertiestab/conditionattr.svg", false, 18),
new SvgIconSource("conditionattr_disabled", "com/fine/theme/icon/propertiestab/conditionattr_disabled.svg", false, 18),
new SvgIconSource("conditionattr_selected", "com/fine/theme/icon/propertiestab/conditionattr_selected.svg", false, 18),
new SvgIconSource("floatelement", "com/fine/theme/icon/propertiestab/floatelement.svg", false, 18),
new SvgIconSource("floatelement_disabled", "com/fine/theme/icon/propertiestab/floatelement_disabled.svg", false, 18),
new SvgIconSource("floatelement_selected", "com/fine/theme/icon/propertiestab/floatelement_selected.svg", false, 18),
new SvgIconSource("hyperlink", "com/fine/theme/icon/propertiestab/hyperlink.svg", false, 18),
new SvgIconSource("hyperlink_disabled", "com/fine/theme/icon/propertiestab/hyperlink_disabled.svg", false, 18),
new SvgIconSource("hyperlink_selected", "com/fine/theme/icon/propertiestab/hyperlink_selected.svg", false, 18),
new SvgIconSource("widgetlib", "com/fine/theme/icon/propertiestab/widgetlib.svg", false, 18),
new SvgIconSource("widgetlib_disabled", "com/fine/theme/icon/propertiestab/widgetlib_disabled.svg", false, 18),
new SvgIconSource("widgetlib_selected", "com/fine/theme/icon/propertiestab/widgetlib_selected.svg", false, 18),
new SvgIconSource("widgetsettings", "com/fine/theme/icon/propertiestab/widgetsettings.svg", false, 18),
new SvgIconSource("widgetsettings_disabled", "com/fine/theme/icon/propertiestab/widgetsettings_disabled.svg", false, 18),
new SvgIconSource("widgetsettings_selected", "com/fine/theme/icon/propertiestab/widgetsettings_selected.svg", false, 18),
// TODO: 视觉未提供,先用旧的,待视觉提供后替换
new SvgIconSource("configuredroles", "com/fine/theme/icon/propertiestab/configuredroles.svg", false),
new SvgIconSource("configuredroles_selected", "com/fine/theme/icon/propertiestab/configuredroles_selected.svg", false),
new SvgIconSource("configuredroles_disabled", "com/fine/theme/icon/propertiestab/configuredroles_disabled.svg", false),
new SvgIconSource("authorityedit", "com/fine/theme/icon/propertiestab/authorityedit.svg", false),
new SvgIconSource("authorityedit_disabled", "com/fine/theme/icon/propertiestab/authorityedit_disabled.svg", false),
new SvgIconSource("authorityedit_selected", "com/fine/theme/icon/propertiestab/authorityedit_selected.svg", false),
new SvgIconSource("configuredroles", "com/fine/theme/icon/propertiestab/configuredroles.svg", false, 18),
new SvgIconSource("configuredroles_selected", "com/fine/theme/icon/propertiestab/configuredroles_selected.svg", false, 18),
new SvgIconSource("configuredroles_disabled", "com/fine/theme/icon/propertiestab/configuredroles_disabled.svg", false, 18),
new SvgIconSource("authorityedit", "com/fine/theme/icon/propertiestab/authorityedit.svg", false, 18),
new SvgIconSource("authorityedit_disabled", "com/fine/theme/icon/propertiestab/authorityedit_disabled.svg", false, 18),
new SvgIconSource("authorityedit_selected", "com/fine/theme/icon/propertiestab/authorityedit_selected.svg", false, 18),
// sheet标签栏相关icon
new SvgIconSource("add_worksheet", "com/fine/theme/icon/sheet/add_sheet.svg", true),
@ -133,6 +134,13 @@ public class FineLightIconSet extends AbstractIconSet {
new SvgIconSource("popup", "com/fine/theme/icon/popup/popup.svg", true),
new SvgIconSource("clear", "com/fine/theme/icon/clear.svg", true),
// 参数面板
new SvgIconSource("param_edit", "com/fine/theme/icon/param/edit.svg", true, 24),
new SvgIconSource("param_edit_pressed", "com/fine/theme/icon/param/edit_pressed.svg", true, 24),
new SvgIconSource("param_hide", "com/fine/theme/icon/param/hide.svg", true, 24),
new SvgIconSource("param_hide_pressed", "com/fine/theme/icon/param/hide_pressed.svg", true, 24),
new SvgIconSource("param_view", "com/fine/theme/icon/param/view.svg", true, 18),
// 北区菜单栏
new SvgIconSource("notification", "com/fine/theme/icon/notification/notification.svg")

29
designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java

@ -1,12 +1,17 @@
package com.fine.theme.utils;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.stable.os.OperatingSystem;
import com.fr.value.AtomicClearableLazyValue;
import javax.swing.UIManager;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Composite;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.geom.RoundRectangle2D;
import java.lang.reflect.Field;
/**
@ -87,4 +92,28 @@ public class FineUIUtils {
Object value = UIManager.get(key);
return (value instanceof Integer) ? (Integer) value : UIManager.getInt(defaultKey);
}
/**
* 绘制混合图像含圆角背景色设置
*
* @param g 图像
* @param composite 混合图像
* @param background 背景色
* @param width 宽度
* @param height 高度
* @param radius 圆角
*/
public static void paintWithComposite(Graphics g, Composite composite, Color background,
int width, int height, int radius) {
Graphics2D g2d = (Graphics2D) g;
FlatUIUtils.setRenderingHints(g2d);
Composite oldComposite = g2d.getComposite();
g2d.setComposite(composite);
g2d.setColor(background);
g2d.fill(new RoundRectangle2D.Float(0, 0, width, height, radius, radius));
g2d.setComposite(oldComposite);
}
}

1
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -249,7 +249,6 @@ public class TableDataTreePane extends BasicTableDataTreePane {
toolbarDef = new ToolBarDef();
toolbarDef.addShortCut(addMenuDef, SeparatorDef.DEFAULT, editAction, removeAction, SeparatorDef.DEFAULT, previewTableDataAction, connectionTableAction, esdAction, esdOffAction, switchAction);
UIToolbar toolBar = ToolBarDef.createJToolBar();
toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR));
toolBar.setBorderPainted(true);
toolbarDef.updateToolBar(toolBar);

2
designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -80,7 +80,7 @@ public class UIEastResizableContainer extends JPanel {
this.rightPane = rightPane;
this.topToolPane = new TopToolPane();
topToolPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 1, 0));
topToolPane.setBorder(BorderFactory.createMatteBorder(1 ,1, 0, 1, UIManager.getColor("East.border")));
topToolPane.setBorder(BorderFactory.createMatteBorder(0 ,1, 0, 1, UIManager.getColor("East.border")));
setLayout(containerLayout);
add(topToolPane);

59
designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java

@ -1,9 +1,12 @@
package com.fr.design.gui.icontainer;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonUI;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
@ -12,17 +15,18 @@ import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import javax.swing.Icon;
import javax.swing.UIManager;
import javax.swing.plaf.basic.BasicButtonUI;
import java.awt.AlphaComposite;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Composite;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.LayoutManager;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@ -47,7 +51,9 @@ public class UIModeControlContainer extends JLayeredPane {
private boolean isHideMode = false;
private boolean isSheeetCovered = false;
private AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f);
private AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.2f);
private Color coverBackground = UIManager.getColor("North.coverPane.background");
private int coverRadius = UIManager.getInt("North.coverPane.radius");
public UIModeControlContainer() {
this(new JPanel(), new JPanel());
@ -67,7 +73,6 @@ public class UIModeControlContainer extends JLayeredPane {
add(upPane);
add(horizontToolPane);
}
// setLayout(new VerticalFlowLayout(CENTER, 10, 10));
add(downPane);
add(coverPane = new CoverPane());
add(hidePane = new HidePane());
@ -112,9 +117,8 @@ public class UIModeControlContainer extends JLayeredPane {
horizontToolPane = new JPanel() {
@Override
public void paint(Graphics g) {
g.drawImage(UIConstants.DRAG_BAR, 0, 0, getWidth(), getHeight(), null);
if (upEditMode) {
g.drawImage(UIConstants.DRAG_DOT, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 5, null);
g.drawImage(UIConstants.DRAG_DOT, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 8, null);
}
}
};
@ -283,7 +287,7 @@ public class UIModeControlContainer extends JLayeredPane {
setLayout(new FlowLayout(FlowLayout.CENTER, 10, -3));
setBackground(UIConstants.NORMAL_BACKGROUND);
add(new UILabel("<html><font size='5' face='Microsoft YaHei' color='#999999999'><B>" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Parameter_Panel") + "</B></font></html>"));
UIButton viewButton = new UIButton(UIConstants.VIEW_NORMAL_ICON, UIConstants.VIEW_NORMAL_ICON, UIConstants.VIEW_NORMAL_ICON) {
UIButton viewButton = new LargeButton(new LazyIcon("param_view"), new LazyIcon("param_view"), new LazyIcon("param_view")) {
@Override
public Dimension getPreferredSize() {
return new Dimension(32, 32);
@ -352,16 +356,10 @@ public class UIModeControlContainer extends JLayeredPane {
@Override
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
Composite oldComposite = g2d.getComposite();
g2d.setComposite(composite);
g2d.setColor(Color.BLACK);
g2d.fillRect(0, 0, getWidth(), getHeight());
g2d.setComposite(oldComposite);
FineUIUtils.paintWithComposite(g, composite, coverBackground, getWidth(), getHeight(), coverRadius);
super.paint(g);
}
}
private class CoverPane extends JPanel {
@ -380,18 +378,8 @@ public class UIModeControlContainer extends JLayeredPane {
}
});
editButton = new UIButton(UIConstants.EDIT_NORMAL_ICON, UIConstants.EDIT_PRESSED_ICON, UIConstants.EDIT_PRESSED_ICON) {
@Override
public Dimension getPreferredSize() {
return new Dimension(40, 40);
}
};
hideButton = new UIButton(UIConstants.HIDE_NORMAL_ICON, UIConstants.HIDE_PRESSED_ICON, UIConstants.HIDE_PRESSED_ICON) {
@Override
public Dimension getPreferredSize() {
return new Dimension(40, 40);
}
};
editButton = new LargeButton(new LazyIcon("param_edit"), new LazyIcon("param_edit_pressed"), new LazyIcon("param_edit_pressed"));
hideButton = new LargeButton(new LazyIcon("param_hide"), new LazyIcon("param_hide_pressed"), new LazyIcon("param_hide_pressed"));
editButton.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
@ -454,16 +442,23 @@ public class UIModeControlContainer extends JLayeredPane {
@Override
public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
Composite oldComposite = g2d.getComposite();
g2d.setComposite(composite);
g2d.setColor(Color.BLACK);
g2d.fillRect(0, 0, getWidth(), getHeight());
g2d.setComposite(oldComposite);
FineUIUtils.paintWithComposite(g, composite, coverBackground, getWidth(), getHeight(), coverRadius);
super.paint(g);
}
}
static class LargeButton extends UIButton {
public LargeButton(Icon normal, Icon rollOver, Icon pressed) {
super(normal, rollOver, pressed);
setUI(new BasicButtonUI());
}
@Override
public Dimension getPreferredSize() {
return new Dimension(40, 40);
}
}
/**
* @param args
*/

8
designer-base/src/main/java/com/fr/design/mainframe/CenterRegionContainerPane.java

@ -16,6 +16,8 @@ import org.jetbrains.annotations.Nullable;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.BorderFactory;
import javax.swing.UIManager;
import javax.swing.border.MatteBorder;
import java.awt.BorderLayout;
import java.awt.Component;
@ -78,7 +80,9 @@ public class CenterRegionContainerPane extends JPanel {
return dim;
}
};
toolbarPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
toolbarPane.setLayout(FRGUIPaneFactory.createBorderLayout());
toolbarPane.setBackground(UIManager.getColor("Center.SpaceColor"));
eastPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
eastPane.add(largeToolbar = getToolBarMenuDock().createLargeToolbar(), BorderLayout.WEST);
eastCenterPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -95,7 +99,8 @@ public class CenterRegionContainerPane extends JPanel {
this.setLayout(new BorderLayout());
this.add(centerTemplateCardPane = new DesktopCardPane(), BorderLayout.CENTER);
this.add(toolbarPane, BorderLayout.NORTH);
this.setBackground(UIManager.getColor("Center.SpaceColor"));
this.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
}
public ToolBarMenuDock getToolBarMenuDock() {
@ -280,7 +285,6 @@ public class CenterRegionContainerPane extends JPanel {
}
JComponent getToolbarComponent() {
return this.toolbarComponent;

1
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -166,7 +166,6 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
setLayout(new BorderLayout());
toolBar = ToolBarDef.createJToolBar();
toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR));
toolBar.setBorderPainted(true);
JPanel tooBarPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel parent = new JPanel(new BorderLayout());

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

@ -1283,7 +1283,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setLayout(new BorderLayout());
add(contentPane, BorderLayout.CENTER);
setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, UIManager.getColor("East.border")));
setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIManager.getColor("East.border")));
initToolButton(buttonType);
}

3
designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java

@ -20,9 +20,11 @@ import com.fr.plugin.observer.PluginEventType;
import com.fr.stable.os.support.OSBasedAction;
import com.fr.stable.os.support.OSSupportCenter;
import javax.swing.BorderFactory;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
@ -66,6 +68,7 @@ public class NorthRegionContainerPane extends JPanel {
this.setLayout(new BorderLayout());
this.add(initNorthEastPane(ad), BorderLayout.EAST);
this.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIManager.getColor("North.border")));
}
/**

5
designer-base/src/main/resources/com/fine/theme/icon/param/edit.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="&#231;&#138;&#182;&#230;&#128;&#129;=&#230;&#173;&#163;&#229;&#184;&#184;">
<path id="Fill 1" fill-rule="evenodd" clip-rule="evenodd" d="M21.965 11.6514L8.83999 24.7764L7.22299 23.1614L20.348 10.0364L21.965 11.6514ZM2.875 22.5624L1 31.0004L9.438 29.1254L26.781 11.7814L20.219 5.21838L2.875 22.5624ZM26.313 1.0004C28.901 1.0004 31 3.0994 31 5.6874C31 6.7434 30.652 7.7154 30.063 8.5004L28.188 10.3754L21.625 3.8124L23.5 1.9374C24.284 1.3484 25.257 1.0004 26.313 1.0004Z" fill="#0A1C38" fill-opacity="0.9"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 621 B

5
designer-base/src/main/resources/com/fine/theme/icon/param/edit_disable.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="&#231;&#138;&#182;&#230;&#128;&#129;=disabled">
<path id="Fill 1" fill-rule="evenodd" clip-rule="evenodd" d="M21.965 11.6514L8.83999 24.7764L7.22299 23.1614L20.348 10.0364L21.965 11.6514ZM2.875 22.5624L1 31.0004L9.438 29.1254L26.781 11.7814L20.219 5.21838L2.875 22.5624ZM26.313 1.0004C28.901 1.0004 31 3.0994 31 5.6874C31 6.7434 30.652 7.7154 30.063 8.5004L28.188 10.3754L21.625 3.8124L23.5 1.9374C24.284 1.3484 25.257 1.0004 26.313 1.0004Z" fill="#0A1C38" fill-opacity="0.29"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 594 B

6
designer-base/src/main/resources/com/fine/theme/icon/param/edit_pressed.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="&#231;&#138;&#182;&#230;&#128;&#129;=press">
<rect id="Rectangle 98" width="32" height="32" rx="4" fill="#0A1C38" fill-opacity="0.37"/>
<path id="Fill 1" opacity="0.4" fill-rule="evenodd" clip-rule="evenodd" d="M21.965 11.6514L8.83999 24.7764L7.22299 23.1614L20.348 10.0364L21.965 11.6514ZM2.875 22.5624L1 31.0004L9.438 29.1254L26.781 11.7814L20.219 5.21838L2.875 22.5624ZM26.313 1.0004C28.901 1.0004 31 3.0994 31 5.6874C31 6.7434 30.652 7.7154 30.063 8.5004L28.188 10.3754L21.625 3.8124L23.5 1.9374C24.284 1.3484 25.257 1.0004 26.313 1.0004Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 674 B

5
designer-base/src/main/resources/com/fine/theme/icon/param/hide.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Property 1=&#230;&#173;&#163;&#229;&#184;&#184;">
<path id="Fill 1" fill-rule="evenodd" clip-rule="evenodd" d="M3.4415 17C4.6375 15.109 6.2315 13.502 8.1115 12.303C8.2335 12.225 8.3575 12.149 8.4825 12.075C8.1705 12.929 8.0005 13.851 8.0005 14.812C8.0005 16.642 8.6145 18.327 9.6475 19.674L7.8175 21.504C6.0655 20.327 4.5755 18.792 3.4415 17ZM30.0005 1H28.3215L21.4585 7.863C19.7375 7.303 17.9035 7 16.0005 7C9.02149 7 2.97149 11.064 0.000488281 17C1.33349 19.662 3.28549 21.947 5.66249 23.658L0.000488281 29.321V31H1.67849L30.0005 2.679V1ZM16.0005 22.812C15.2905 22.812 14.6005 22.72 13.9465 22.546L23.7335 12.759C23.9075 13.414 24.0005 14.102 24.0005 14.812C24.0005 19.231 20.4185 22.812 16.0005 22.812ZM26.2285 10.263C28.6555 11.983 30.6475 14.297 32.0005 17C29.0275 22.936 22.9785 27 16.0005 27C14.0455 27 12.1635 26.681 10.4015 26.091L12.8375 23.655C13.8705 23.883 14.9295 24 16.0005 24C18.7985 24 21.5275 23.204 23.8885 21.697C25.7685 20.497 27.3625 18.891 28.5585 17C27.4015 15.17 25.8715 13.608 24.0705 12.422L26.2285 10.263Z" fill="#0A1C38" fill-opacity="0.9"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

5
designer-base/src/main/resources/com/fine/theme/icon/param/hide_disable.svg

@ -0,0 +1,5 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Property 1=disabled">
<path id="Fill 1" fill-rule="evenodd" clip-rule="evenodd" d="M3.4415 17C4.6375 15.109 6.2315 13.502 8.1115 12.303C8.2335 12.225 8.3575 12.149 8.4825 12.075C8.1705 12.929 8.0005 13.851 8.0005 14.812C8.0005 16.642 8.6145 18.327 9.6475 19.674L7.8175 21.504C6.0655 20.327 4.5755 18.792 3.4415 17ZM30.0005 1H28.3215L21.4585 7.863C19.7375 7.303 17.9035 7 16.0005 7C9.02149 7 2.97149 11.064 0.000488281 17C1.33349 19.662 3.28549 21.947 5.66249 23.658L0.000488281 29.321V31H1.67849L30.0005 2.679V1ZM16.0005 22.812C15.2905 22.812 14.6005 22.72 13.9465 22.546L23.7335 12.759C23.9075 13.414 24.0005 14.102 24.0005 14.812C24.0005 19.231 20.4185 22.812 16.0005 22.812ZM26.2285 10.263C28.6555 11.983 30.6475 14.297 32.0005 17C29.0275 22.936 22.9785 27 16.0005 27C14.0455 27 12.1635 26.681 10.4015 26.091L12.8375 23.655C13.8705 23.883 14.9295 24 16.0005 24C18.7985 24 21.5275 23.204 23.8885 21.697C25.7685 20.497 27.3625 18.891 28.5585 17C27.4015 15.17 25.8715 13.608 24.0705 12.422L26.2285 10.263Z" fill="#0A1C38" fill-opacity="0.29"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

6
designer-base/src/main/resources/com/fine/theme/icon/param/hide_pressed.svg

@ -0,0 +1,6 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Property 1=press">
<rect id="Rectangle 98" width="32" height="32" rx="4" fill="#0A1C38" fill-opacity="0.37"/>
<path id="Fill 1" opacity="0.4" fill-rule="evenodd" clip-rule="evenodd" d="M3.4415 17C4.6375 15.109 6.2315 13.502 8.1115 12.303C8.2335 12.225 8.3575 12.149 8.4825 12.075C8.1705 12.929 8.0005 13.851 8.0005 14.812C8.0005 16.642 8.6145 18.327 9.6475 19.674L7.8175 21.504C6.0655 20.327 4.5755 18.792 3.4415 17ZM30.0005 1H28.3215L21.4585 7.863C19.7375 7.303 17.9035 7 16.0005 7C9.02149 7 2.97149 11.064 0.000488281 17C1.33349 19.662 3.28549 21.947 5.66249 23.658L0.000488281 29.321V31H1.67849L30.0005 2.679V1ZM16.0005 22.812C15.2905 22.812 14.6005 22.72 13.9465 22.546L23.7335 12.759C23.9075 13.414 24.0005 14.102 24.0005 14.812C24.0005 19.231 20.4185 22.812 16.0005 22.812ZM26.2285 10.263C28.6555 11.983 30.6475 14.297 32.0005 17C29.0275 22.936 22.9785 27 16.0005 27C14.0455 27 12.1635 26.681 10.4015 26.091L12.8375 23.655C13.8705 23.883 14.9295 24 16.0005 24C18.7985 24 21.5275 23.204 23.8885 21.697C25.7685 20.497 27.3625 18.891 28.5585 17C27.4015 15.17 25.8715 13.608 24.0705 12.422L26.2285 10.263Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

7
designer-base/src/main/resources/com/fine/theme/icon/param/view.svg

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon 显示</title>
<g id="icon-显示" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M8,3 C10.9455187,3 13.6121853,4.6 16,7.8 C13.6121853,11 10.9455187,12.6 8,12.6 C5.05448133,12.6 2.38781467,11 0,7.8 C2.38781467,4.6 5.05448133,3 8,3 Z M8,4.6 C6.2326888,4.6 4.8,6.0326888 4.8,7.8 C4.8,9.5673112 6.2326888,11 8,11 C9.7673112,11 11.2,9.5673112 11.2,7.8 C11.2,6.0326888 9.7673112,4.6 8,4.6 Z M8,6.2 C8.8836556,6.2 9.6,6.9163444 9.6,7.8 C9.6,8.6836556 8.8836556,9.4 8,9.4 C7.1163444,9.4 6.4,8.6836556 6.4,7.8 C6.4,6.9163444 7.1163444,6.2 8,6.2 Z" id="形状结合" fill="#484848"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 834 B

28
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -160,13 +160,6 @@ controlHighlight = lighten($controlShadow,12%)
controlLtHighlight = lighten($controlShadow,25%)
controlDkShadow = darken($controlShadow,15%)
DarkenedFontColor = #091E40
DesignerSpaceColor = #FFF
# ---- MainWorkArea ----
CenterOuterShadowColor = #F2F4F8
ZoneBorderColor = #E6E9EF
GridColumnRowColor = #F8F9FC
#---- Button ----
@ -632,7 +625,7 @@ RootPane.inactiveBorderColor = darken(@background,30%,derived)
#---- ScrollBar ----
ScrollBar.width = 10
ScrollBar.width = 16
ScrollBar.minimumButtonSize = 12,12
ScrollBar.minimumThumbSize = 10,10
ScrollBar.maximumThumbSize = 100000,100000
@ -642,7 +635,7 @@ ScrollBar.trackArc = 0
ScrollBar.thumbArc = 0
ScrollBar.hoverThumbWithTrack = false
ScrollBar.pressedThumbWithTrack = false
ScrollBar.showButtons = false
ScrollBar.showButtons = true
ScrollBar.squareButtons = false
ScrollBar.buttonArrowColor = @buttonArrowColor
ScrollBar.buttonDisabledArrowColor = @buttonDisabledArrowColor
@ -1066,6 +1059,9 @@ Tree.icon.closedColor = @icon
Tree.icon.openColor = @icon
Tree.hash = darken($Tree.background,10%)
#---- West ----
West.border = #DADEE7
#---- East ----
East.border = #DADEE7
East.TabSelectedColor = #B3CFF9
@ -1077,10 +1073,24 @@ South.SheetIconSepDistance = 16
South.SheetBarHeight = 24
South.SheetAddWidth = 6
South.SheetIconGap = 5
South.SheetSelectedColor = #FFF
#---- North ----
North.userinfoLabel.borderMargins=2, 16, 2, 16
North.userinfoLabel.width=80
North.userinfoLabel.height=24
North.border = #DADEE7
North.coverPane.background = #0a1c38
North.coverPane.radius = 8
# ---- Center ----
Center.OuterShadowColor = #F2F4F8
Center.ZoneBorderColor = #E6E9EF
Center.GridColumnRowColor = #F8F9FC
Center.SpaceColor = #FFF
Center.border = 0, 10, 10, 10
#---- Styles ------------------------------------------------------------------

3
designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java

@ -16,8 +16,10 @@ import com.fr.main.impl.WorkBook;
import com.fr.report.report.TemplateReport;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
@ -63,6 +65,7 @@ public class ReportComponentComposite extends JComponent implements RemoveListen
CellElementRegion = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(CellElementRegion, BorderLayout.NORTH);
this.add(createSouthControlPane(), BorderLayout.SOUTH);
this.setBorder(BorderFactory.createLineBorder(UIManager.getColor("Center.ZoneBorderColor")));
jSliderContainer.addValueChangeListener(showValSpinnerChangeListener);
}

8
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -61,9 +61,9 @@ import java.util.List;
*/
public class SheetNameTabPane extends JComponent implements MouseListener, MouseMotionListener, RemoveListener {
private static final Color BORDER_COLOR = UIManager.getColor("ZoneBorderColor");
private static final Color BACKGROUND_COLOR = UIManager.getColor("CenterOuterShadowColor");
private static final Color SELECTED_COLOR = UIManager.getColor("DesignerSpaceColor");
private static final Color BORDER_COLOR = UIManager.getColor("Center.ZoneBorderColor");
private static final Color BACKGROUND_COLOR = UIManager.getColor("Center.OuterShadowColor");
private static final Color SELECTED_COLOR = UIManager.getColor("South.SheetSelectedColor");
private static final Color FONT_COLOR = UIManager.getColor("DarkenedFontColor");
private static final Icon ADD_WORK_SHEET = new LazyIcon("add_worksheet");
@ -365,7 +365,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
int addIconlocation = 0;
WorkBook workBook = reportComposite.getEditingWorkBook();
int reportCount = workBook.getReportCount();
double textX = 0;
double textX = SHEET_ICON_GAP;
for (int i = scrollIndex; i < reportCount; i++) {
lastOneIndex = i;
TemplateReport templateReport = workBook.getTemplateReport(i);

16
designer-realize/src/main/java/com/fr/grid/GridColumnUI.java

@ -9,10 +9,8 @@ import javax.swing.JComponent;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList;
import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.cache.list.IntList;
import com.fr.design.constants.UIConstants;
@ -29,7 +27,7 @@ import com.fr.report.elementcase.ElementCase;
* @since 2012-3-22下午5:51:10
*/
public class GridColumnUI extends ComponentUI {
protected Color withoutDetailsBackground = UIConstants.GRID_COLUMN_DETAILS_BACKGROUND;
protected Color withoutDetailsBackground = UIManager.getColor("Center.GridColumnRowColor");
private int resolution ;
public GridColumnUI(int resolution){
@ -75,21 +73,15 @@ public class GridColumnUI extends ComponentUI {
if (gridColumn.getBackground() != null) {
g2d.setPaint(this.withoutDetailsBackground);
GraphHelper.fill(g2d, new Rectangle2D.Double(0, 0, columnLeftWidth, size.getHeight()));
g2d.setPaint(Color.WHITE);
GraphHelper.fill(g2d, new Rectangle2D.Double(columnLeftWidth, 0, size.getWidth() - columnLeftWidth, size.getHeight()));
}
// draw left border line.
g2d.setPaint(gridColumn.getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, 0, size.getHeight());
double tmpWidth2 = 0;
drawColumn(horizontalBeginValue, horizontalEndValue, columnWidthList, tmpWidth2, reportPane, g2d, gridColumn, size);
// 画上边的边框线.
g2d.setColor(gridColumn.getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, tmpWidth2, 0);
drawColumn(horizontalBeginValue, horizontalEndValue, columnWidthList, reportPane, g2d, gridColumn, size);
}
private void drawColumn(int horizontalBeginValue, int horizontalEndValue, DynamicUnitList columnWidthList, double tmpWidth2,
private void drawColumn(int horizontalBeginValue, int horizontalEndValue, DynamicUnitList columnWidthList,
ElementCasePane reportPane, Graphics2D g2d, GridColumn gridColumn, Dimension size) {
// draw column.
@ -112,7 +104,7 @@ public class GridColumnUI extends ComponentUI {
tmpIncreaseWidth = columnWidthList.get(i).toPixD(resolution);
// check these column wich width is zero.
tmpWidth2 = tmpIncreaseWidth <= 0 ? tmpWidth1 + 1 : tmpWidth1 + tmpIncreaseWidth;
double tmpWidth2 = tmpIncreaseWidth <= 0 ? tmpWidth1 + 1 : tmpWidth1 + tmpIncreaseWidth;
// marks:画出来多个选中的区域
Selection sel = reportPane.getSelection();
int[] selectedColumn = sel.getSelectedColumns();

13
designer-realize/src/main/java/com/fr/grid/GridCorner.java

@ -40,24 +40,11 @@ public class GridCorner extends BaseGridComponent {
//size
Dimension size = this.getSize();
Rectangle2D rect2D = new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight());
//paint background.
// if (this.getBackground() != null) {
// g2d.setPaint(this.getBackground());
// GraphHelper.fill(g2d, rect2D);
// } else {
g2d.setPaint(reportPane.getGrid().getBackground());
GraphHelper.fill(g2d, rect2D);
// }
paintArc(g2d, size, time);
//画左边的边框线.
g2d.setColor(reportPane.getGridColumn().getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, 0, size.getHeight());
//画上边的边框线.
g2d.setColor(reportPane.getGridRow().getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, size.getWidth(), 0);
}
/**

16
designer-realize/src/main/java/com/fr/grid/GridRowUI.java

@ -10,10 +10,8 @@ import javax.swing.plaf.ComponentUI;
import com.fr.design.mainframe.DesignerUIModeConfig;
import com.fr.stable.AssistUtils;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList;
import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.cache.list.IntList;
import com.fr.design.constants.UIConstants;
@ -29,7 +27,7 @@ import com.fr.report.elementcase.ElementCase;
* @since 2012-3-22下午5:54:21
*/
public class GridRowUI extends ComponentUI {
private Color detailsBackground = UIConstants.GRID_ROW_DETAILS_BACKGROUND;
private Color detailsBackground = UIManager.getColor("Center.GridColumnRowColor");
private int resolution ;
GridRowUI(int resolution){
@ -75,22 +73,16 @@ public class GridRowUI extends ComponentUI {
if (gridRow.getBackground() != null) {
g2d.setPaint(this.detailsBackground);
GraphHelper.fill(g2d, new Rectangle2D.Double(0, 0, size.getWidth(), rowTopHeight));
g2d.setPaint(Color.WHITE);
GraphHelper.fill(g2d, new Rectangle2D.Double(0, rowTopHeight, size.getHeight(), size.getHeight() - rowTopHeight));
}
// draw top border line.
g2d.setPaint(gridRow.getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, size.getWidth(), 0);
// draw row
double tmpHeight2 = 0;
drawRow(verticalBeginValue, verticalEndValue, rowHeightList, resolution, tmpHeight2, gridRow, g2d);
// 画左边的边框线.
g2d.setColor(gridRow.getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, 0, tmpHeight2);
drawRow(verticalBeginValue, verticalEndValue, rowHeightList, resolution, gridRow, g2d);
}
private void drawRow(int verticalBeginValue, int verticalEndValue, DynamicUnitList rowHeightList, int resolution,
double tmpHeight2, GridRow gridRow, Graphics2D g2d) {
GridRow gridRow, Graphics2D g2d) {
boolean isSelectedBounds;
double tmpHeight1 = 0;
double tmpIncreaseHeight = 0;
@ -108,7 +100,7 @@ public class GridRowUI extends ComponentUI {
tmpHeight1 += tmpIncreaseHeight;
tmpIncreaseHeight = rowHeightList.get(i).toPixD(resolution);
// check these row wich height is zero.
tmpHeight2 = AssistUtils.equals(tmpIncreaseHeight,0d) ? tmpHeight1 + 1 : tmpHeight1 + tmpIncreaseHeight;
double tmpHeight2 = AssistUtils.equals(tmpIncreaseHeight, 0d) ? tmpHeight1 + 1 : tmpHeight1 + tmpIncreaseHeight;
// check selection bound.
Selection sel = reportPane.getSelection();
int[] selectedRows = sel.getSelectedRows();

Loading…
Cancel
Save