Browse Source

Merge pull request #1304 in BA/design from ~HZZZ/design:REPORT-3410 to release/9.0

* commit '0cb007d2f8b78719d766590e16e3fb889206c887':
  数据集工具栏图标
  数据集工具栏图标
  预览按钮背景色
  toolbar背景色
master
superman 7 years ago
parent
commit
575658df0c
  1. 33
      designer/src/com/fr/start/Designer.java
  2. 27
      designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java
  3. 2
      designer_base/src/com/fr/design/icon/IconPathConstants.java
  4. BIN
      designer_base/src/com/fr/design/images/control/edit.png
  5. BIN
      designer_base/src/com/fr/design/images/control/tab/remove.png

33
designer/src/com/fr/start/Designer.java

@ -135,30 +135,31 @@ public class Designer extends BaseDesigner {
public UILargeToolbar createLargeToolbar() {
UILargeToolbar largeToolbar = super.createLargeToolbar();
largeToolbar.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 4));
largeToolbar.add(new JPanel() {
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.width = 1;
return dim;
}
});
largeToolbar.add(generateEmptyGap(1));
createRunButton(largeToolbar);
largeToolbar.add(run);
run.setBackground(UIConstants.TREE_BACKGROUND);
largeToolbar.add(new JPanel() {
run.setBackground(Color.WHITE);
largeToolbar.add(generateEmptyGap(GAP));
largeToolbar.addSeparator(new Dimension(2, 42));
largeToolbar.setBorder(new MatteBorder(new Insets(0, 0, 1, 0), UIConstants.LINE_COLOR));
return largeToolbar;
}
private JPanel generateEmptyGap(int width) {
JPanel panel = new JPanel() {
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.width = GAP;
dim.width = width;
return dim;
}
});
largeToolbar.addSeparator(new Dimension(2, 42));
largeToolbar.setBorder(new MatteBorder(new Insets(0, 0, 1, 0), UIConstants.LINE_COLOR));
return largeToolbar;
};
panel.setBackground(Color.WHITE);
return panel;
}
/**
* 创建上面一排的工具栏按钮
*
* @return 按钮
*/
public UIButton[] createUp() {
@ -290,6 +291,7 @@ public class Designer extends BaseDesigner {
/**
* 生成工具栏
*
* @param toolbarComponent 工具栏
* @param plus 对象
* @return 更新后的toolbar
@ -336,7 +338,6 @@ public class Designer extends BaseDesigner {
* 创建论坛登录面板, chart那边不需要
*
* @return 面板组件
*
*/
public Component createBBSLoginPane() {
if (userInfoPane == null) {
@ -361,7 +362,6 @@ public class Designer extends BaseDesigner {
/**
* 收集用户信息吗
*
*/
protected void collectUserInformation() {
//定制的就不弹出来了
@ -442,7 +442,6 @@ public class Designer extends BaseDesigner {
/**
* 设计器退出时, 做的一些操作.
*
*/
public void shutDown() {
InformationCollector collector = InformationCollector.getInstance();

27
designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java

@ -1,31 +1,16 @@
package com.fr.design.gui.itoolbar;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Window;
import java.awt.event.WindowListener;
import com.fr.design.gui.ibutton.UIToolButtonBorder;
import com.fr.design.gui.icheckbox.UICheckBox;
import javax.swing.AbstractButton;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JRadioButton;
import javax.swing.JToolBar;
import javax.swing.RootPaneContainer;
import javax.swing.SwingUtilities;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.metal.MetalToolBarUI;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIToolButtonBorder;
import com.fr.design.gui.icheckbox.UICheckBox;
import static com.fr.design.utils.ThemeUtils.BACK_COLOR;
import java.awt.*;
import java.awt.event.WindowListener;
public class UIToolBarUI extends MetalToolBarUI {
public static final String IS_TOOL_BAR_BUTTON_KEY = "JToolBar.isToolbarButton";
@ -91,7 +76,7 @@ public class UIToolBarUI extends MetalToolBarUI {
*/
public void paint(Graphics g, JComponent c) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(BACK_COLOR);
g2.setColor(Color.WHITE);
g2.fillRect(0, 0, c.getWidth(), c.getHeight());
}

2
designer_base/src/com/fr/design/icon/IconPathConstants.java

@ -1 +1 @@
package com.fr.design.icon; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 6.5.6 * Date: 12-12-18 * Time: 上午9:42 * 用于保存所有图标路径的类 */ public class IconPathConstants { private IconPathConstants() { } public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png"; public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png"; public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png"; public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png"; public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png"; public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png"; private IconPathConstants() { private IconPathConstants() { private IconPathConstants() { private IconPathConstants() { private IconPathConstants() { } private IconPathConstants() { public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png"; private IconPathConstants() { public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png"; private IconPathConstants() { public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png"; private IconPathConstants() { public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png"; private IconPathConstants() { public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png"; private IconPathConstants() { public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png"; private IconPathConstants() { "/com/fr/web/images/form/forbid.png"; }
package com.fr.design.icon; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 6.5.6 * Date: 12-12-18 * Time: 上午9:42 * 用于保存所有图标路径的类 */ public class IconPathConstants { } public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png"; } public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png"; public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png"; public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png"; public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png"; public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png"; } } private IconPathConstants() { } } } } public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png"; } public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png"; } public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png"; } public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png"; } public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png"; } public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png"; public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png"; public static final String XMLA_ICON_PATH = "/com/fr/design/images/data/cube.png"; public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png"; "/com/fr/web/images/form/forbid.png"; }

BIN
designer_base/src/com/fr/design/images/control/edit.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

After

Width:  |  Height:  |  Size: 352 B

BIN
designer_base/src/com/fr/design/images/control/tab/remove.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Loading…
Cancel
Save