Browse Source

REPORT-5284 公测客户反馈设计器配色和交互问题修改=>设计器配色修改

master
plough 7 years ago
parent
commit
a68219588d
  1. 3
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java
  2. 3
      designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java
  3. 2
      designer/src/com/fr/grid/GridColumnUI.java
  4. 2
      designer/src/com/fr/grid/GridRowUI.java
  5. 5
      designer/src/com/fr/start/Designer.java
  6. 8
      designer_base/src/com/fr/design/constants/UIConstants.java
  7. 4
      designer_base/src/com/fr/design/file/MutilTempalteTabPane.java
  8. 2
      designer_base/src/com/fr/design/file/NewTemplatePane.java
  9. 2
      designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  10. 2
      designer_base/src/com/fr/design/gui/imenu/UIMenuBarUI.java
  11. 2
      designer_base/src/com/fr/design/gui/imenu/UIMenuUI.java
  12. 3
      designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java
  13. 24
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  14. 6
      designer_base/src/com/fr/design/mainframe/loghandler/LogMessageBar.java

3
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe.alphafine.component;
import com.bulenkov.iconloader.IconLoader; import com.bulenkov.iconloader.IconLoader;
import com.fr.design.actions.help.alphafine.AlphaFineContext; import com.fr.design.actions.help.alphafine.AlphaFineContext;
import com.fr.design.actions.help.alphafine.AlphaFineListener; import com.fr.design.actions.help.alphafine.AlphaFineListener;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.alphafine.AlphaFineHelper; import com.fr.design.mainframe.alphafine.AlphaFineHelper;
@ -32,7 +33,7 @@ public class AlphaFinePane extends BasicPane {
refreshButton.set4ToolbarButton(); refreshButton.set4ToolbarButton();
refreshButton.setRolloverEnabled(false); refreshButton.setRolloverEnabled(false);
this.add(refreshButton); this.add(refreshButton);
this.setBackground(ThemeUtils.WHITE_BORDER_COLOR); this.setBackground(UIConstants.TEMPLATE_TAB_PANE_BACKGROUND);
refreshButton.addActionListener(new ActionListener() { refreshButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {

3
designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -6,6 +6,7 @@ package com.fr.design.mainframe.bbs;
import com.fr.base.ConfigManager; import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.general.DateUtils; import com.fr.general.DateUtils;
@ -32,7 +33,7 @@ import java.util.Date;
public class UserInfoPane extends BasicPane{ public class UserInfoPane extends BasicPane{
//默认未登录颜色 //默认未登录颜色
private static final Color UN_LOGIN_BACKGROUND = new Color(210, 210, 210); private static final Color UN_LOGIN_BACKGROUND = UIConstants.TEMPLATE_TAB_PANE_BACKGROUND;
private static final Color LOGIN_BACKGROUND = new Color(184, 220, 242); private static final Color LOGIN_BACKGROUND = new Color(184, 220, 242);
private static final int WIDTH = 104; private static final int WIDTH = 104;
private static final int HEIGHT = 24; private static final int HEIGHT = 24;

2
designer/src/com/fr/grid/GridColumnUI.java

@ -27,7 +27,7 @@ import com.fr.report.elementcase.ElementCase;
* @since 2012-3-22下午5:51:10 * @since 2012-3-22下午5:51:10
*/ */
public class GridColumnUI extends ComponentUI { public class GridColumnUI extends ComponentUI {
protected Color withoutDetailsBackground = new Color(0xf0f0f3); protected Color withoutDetailsBackground = UIConstants.GRID_COLUMN_DETAILS_BACKGROUND;
private int resolution ; private int resolution ;
public GridColumnUI(int resolution){ public GridColumnUI(int resolution){

2
designer/src/com/fr/grid/GridRowUI.java

@ -26,7 +26,7 @@ import com.fr.report.elementcase.ElementCase;
* @since 2012-3-22下午5:54:21 * @since 2012-3-22下午5:54:21
*/ */
public class GridRowUI extends ComponentUI { public class GridRowUI extends ComponentUI {
private Color detailsBackground = new Color(0xf0f0f3); private Color detailsBackground = UIConstants.GRID_ROW_DETAILS_BACKGROUND;
private int resolution ; private int resolution ;
GridRowUI(int resolution){ GridRowUI(int resolution){

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

@ -139,7 +139,6 @@ public class Designer extends BaseDesigner {
largeToolbar.add(generateEmptyGap(1)); largeToolbar.add(generateEmptyGap(1));
createRunButton(largeToolbar); createRunButton(largeToolbar);
largeToolbar.add(run); largeToolbar.add(run);
run.setBackground(Color.WHITE);
largeToolbar.add(generateEmptyGap(GAP)); largeToolbar.add(generateEmptyGap(GAP));
largeToolbar.addSeparator(new Dimension(2, 42)); largeToolbar.addSeparator(new Dimension(2, 42));
largeToolbar.setBorder(new MatteBorder(new Insets(0, 0, 1, 0), UIConstants.LINE_COLOR)); largeToolbar.setBorder(new MatteBorder(new Insets(0, 0, 1, 0), UIConstants.LINE_COLOR));
@ -154,7 +153,8 @@ public class Designer extends BaseDesigner {
return dim; return dim;
} }
}; };
panel.setBackground(Color.WHITE); panel.setBackground(null);
panel.setOpaque(false);
return panel; return panel;
} }
@ -266,7 +266,6 @@ public class Designer extends BaseDesigner {
run.set4Toolbar(); run.set4Toolbar();
run.getUpButton().setToolTipText(Inter.getLocText("FR-Designer_Preview")); run.getUpButton().setToolTipText(Inter.getLocText("FR-Designer_Preview"));
run.getDownButton().setToolTipText(Inter.getLocText("FR-Designer_Dropdown-More-Preview")); run.getDownButton().setToolTipText(Inter.getLocText("FR-Designer_Dropdown-More-Preview"));
run.setBackground(Color.WHITE);
} }
@Override @Override

8
designer_base/src/com/fr/design/constants/UIConstants.java

@ -97,6 +97,7 @@ public interface UIConstants {
public static final Color NORMAL_BLUE = new Color(0x419BF9); public static final Color NORMAL_BLUE = new Color(0x419BF9);
public static final Color ATTRIBUTE_NORMAL = Color.WHITE; public static final Color ATTRIBUTE_NORMAL = Color.WHITE;
public static final Color ATTRIBUTE_HOVER = new Color(0xF5F5F7); public static final Color ATTRIBUTE_HOVER = new Color(0xF5F5F7);
public static final Color UI_TOOLBAR_COLOR = new Color(0xF5F5F7);
public static final Color CHECKBOX_HOVER_SELECTED = new Color(0x3394f0); public static final Color CHECKBOX_HOVER_SELECTED = new Color(0x3394f0);
public static final Color TEXT_FILED_BORDER_SELECTED = new Color(0x3384f0); public static final Color TEXT_FILED_BORDER_SELECTED = new Color(0x3384f0);
public static final Color SHEET_NORMAL = new Color(0xc8c8ca); public static final Color SHEET_NORMAL = new Color(0xc8c8ca);
@ -105,9 +106,14 @@ public interface UIConstants {
public static final Color DEFAULT_BG_RULER = new Color(0xffffff); public static final Color DEFAULT_BG_RULER = new Color(0xffffff);
public static final Color RULER_LINE_COLOR = new Color(0xD9DADD); public static final Color RULER_LINE_COLOR = new Color(0xD9DADD);
public static final Color RULER_SCALE_COLOR = new Color(0x4e504f); public static final Color RULER_SCALE_COLOR = new Color(0x4e504f);
public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xdadadd); public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xe8e8e9);
public static final Color SPLIT_LINE = new Color(201, 198, 184); public static final Color SPLIT_LINE = new Color(201, 198, 184);
public static final Color TITLED_BORDER_COLOR = new Color(0xe8e8e9); public static final Color TITLED_BORDER_COLOR = new Color(0xe8e8e9);
public static final Color GRID_ROW_DETAILS_BACKGROUND = new Color(0xe8e8e9);
public static final Color GRID_COLUMN_DETAILS_BACKGROUND = GRID_ROW_DETAILS_BACKGROUND;
public static final Color TEMPLATE_TAB_PANE_BACKGROUND = new Color(0xe0e0e3);
public static final Color LOG_MESSAGE_BAR_BACKGROUND = TEMPLATE_TAB_PANE_BACKGROUND;
public static final Color UI_MENU_BACKGOURND = TEMPLATE_TAB_PANE_BACKGROUND;
public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221); public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221);
public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd); public static final Color PROPERTY_DIALOG_BORDER = new Color(0xc9c9cd);
public static final Color TAB_BUTTON_HOVER = new Color(231, 230, 235); public static final Color TAB_BUTTON_HOVER = new Color(231, 230, 235);

4
designer_base/src/com/fr/design/file/MutilTempalteTabPane.java

@ -372,7 +372,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
private void paintDefaultBackground(Graphics2D g2d) { private void paintDefaultBackground(Graphics2D g2d) {
//画默认背景 //画默认背景
g2d.setPaint(new GradientPaint(1, 1, new Color(217, 218, 221), 1, getHeight() - 1, new Color(217, 218, 221))); g2d.setPaint(new GradientPaint(1, 1, UIConstants.TEMPLATE_TAB_PANE_BACKGROUND, 1, getHeight() - 1, UIConstants.TEMPLATE_TAB_PANE_BACKGROUND));
g2d.fillRect(0, 0, getWidth(), getHeight()); g2d.fillRect(0, 0, getWidth(), getHeight());
} }
@ -562,7 +562,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
unSelectedClosedPath(generalPath, isLeft, x, y); unSelectedClosedPath(generalPath, isLeft, x, y);
g2d.fill(generalPath); g2d.fill(generalPath);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setPaint(new Color(200, 201, 205)); g2d.setPaint(UIConstants.TEMPLATE_TAB_PANE_BACKGROUND);
//TODO hzzz delete //TODO hzzz delete
// if (isLeft) { // if (isLeft) {
// g2d.draw(new Arc2D.Double(x[0], y[0], CORNOR_RADIUS * 2, CORNOR_RADIUS * 2, 90, 90, 0)); // g2d.draw(new Arc2D.Double(x[0], y[0], CORNOR_RADIUS * 2, CORNOR_RADIUS * 2, 90, 90, 0));

2
designer_base/src/com/fr/design/file/NewTemplatePane.java

@ -46,7 +46,7 @@ public abstract class NewTemplatePane extends JComponent implements MouseListene
public void paintComponent(Graphics g) { public void paintComponent(Graphics g) {
super.paintComponent(g); super.paintComponent(g);
g2d = (Graphics2D) g; g2d = (Graphics2D) g;
g2d.setColor(UIConstants.COMBOBOX_BTN_NORMAL); g2d.setColor(UIConstants.TEMPLATE_TAB_PANE_BACKGROUND);
g2d.fill(new Rectangle2D.Double(0, 0, getWidth(),getHeight())); g2d.fill(new Rectangle2D.Double(0, 0, getWidth(),getHeight()));
int sheetIconY = (getHeight() - newWorkBookIconMode.getIconHeight()) / 2; int sheetIconY = (getHeight() - newWorkBookIconMode.getIconHeight()) / 2;
newWorkBookIconMode.paintIcon(this, g2d, newIconStartX, sheetIconY); newWorkBookIconMode.paintIcon(this, g2d, newIconStartX, sheetIconY);

2
designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -293,7 +293,6 @@ public class UIEastResizableContainer extends JPanel {
public void paint(Graphics g) { public void paint(Graphics g) {
Image button; Image button;
g.drawImage(UIConstants.DRAG_BAR, 0, 0, containerWidth, topToolPaneHeight, null);
if (containerWidth == leftPaneWidth) { if (containerWidth == leftPaneWidth) {
if (model == UIConstants.MODEL_NORMAL) { if (model == UIConstants.MODEL_NORMAL) {
button = UIConstants.DRAG_LEFT_NORMAL; button = UIConstants.DRAG_LEFT_NORMAL;
@ -307,7 +306,6 @@ public class UIEastResizableContainer extends JPanel {
button = UIConstants.DRAG_RIGHT_PRESS; button = UIConstants.DRAG_RIGHT_PRESS;
} }
} }
// g.drawImage(button, 2, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null);
g.drawImage(button, 18, 7, 5, 10, null); g.drawImage(button, 18, 7, 5, 10, null);
} }
} }

2
designer_base/src/com/fr/design/gui/imenu/UIMenuBarUI.java

@ -24,7 +24,7 @@ public class UIMenuBarUI extends BasicMenuBarUI {
return; return;
} }
Color oldColor = g.getColor(); Color oldColor = g.getColor();
g.setColor(UIConstants.NORMAL_BACKGROUND); g.setColor(UIConstants.TEMPLATE_TAB_PANE_BACKGROUND);
g.fillRect(0, 0, c.getWidth(), c.getHeight()); g.fillRect(0, 0, c.getWidth(), c.getHeight());
g.setColor(oldColor); g.setColor(oldColor);
} }

2
designer_base/src/com/fr/design/gui/imenu/UIMenuUI.java

@ -46,7 +46,7 @@ public class UIMenuUI extends BasicMenuUI {
protected void paintRollOver(Graphics g, int w, int h) { protected void paintRollOver(Graphics g, int w, int h) {
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
g2d.setColor(UIConstants.NORMAL_BACKGROUND); g2d.setColor(UIConstants.UI_MENU_BACKGOURND);
g2d.fillRect(0, 0, w, h); g2d.fillRect(0, 0, w, h);
} }

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

@ -1,6 +1,7 @@
package com.fr.design.gui.itoolbar; package com.fr.design.gui.itoolbar;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIToolButtonBorder; import com.fr.design.gui.ibutton.UIToolButtonBorder;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
@ -76,7 +77,7 @@ public class UIToolBarUI extends MetalToolBarUI {
*/ */
public void paint(Graphics g, JComponent c) { public void paint(Graphics g, JComponent c) {
Graphics2D g2 = (Graphics2D) g; Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.WHITE); g2.setColor(UIConstants.UI_TOOLBAR_COLOR);
g2.fillRect(0, 0, c.getWidth(), c.getHeight()); g2.fillRect(0, 0, c.getWidth(), c.getHeight());
} }

24
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -40,7 +40,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private static final int TAB_BUTTON_WIDTH = 32; private static final int TAB_BUTTON_WIDTH = 32;
private static final int TAB_BUTTON_HEIGHT = 28; private static final int TAB_BUTTON_HEIGHT = 28;
private static final int CONTENT_WIDTH = CONTAINER_WIDTH - TAB_WIDTH; private static final int CONTENT_WIDTH = CONTAINER_WIDTH - TAB_WIDTH;
private static final int POPUP_TOOLPANE_HEIGHT = 25; private static final int POPUP_TOOLPANE_HEIGHT = 27;
private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30; private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30;
// 弹出对话框高度 // 弹出对话框高度
private static final int POPUP_MIN_HEIGHT = 145; private static final int POPUP_MIN_HEIGHT = 145;
@ -826,6 +826,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private String buttonType; private String buttonType;
private JDialog parentDialog; // 如果不在对话框中,值为null private JDialog parentDialog; // 如果不在对话框中,值为null
private Color originColor; // 初始背景 private Color originColor; // 初始背景
private JPanel contentPane;
private boolean isMovable = false; private boolean isMovable = false;
private Point mouseDownCompCoords; // 存储按下左键的位置,移动对话框时会用到 private Point mouseDownCompCoords; // 存储按下左键的位置,移动对话框时会用到
@ -842,7 +843,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void mouseExited(MouseEvent e) { public void mouseExited(MouseEvent e) {
setCursor(Cursor.getDefaultCursor()); setCursor(Cursor.getDefaultCursor());
if (mouseDownCompCoords == null) { if (mouseDownCompCoords == null) {
setBackground(originColor); contentPane.setBackground(originColor);
} }
repaint(); repaint();
} }
@ -856,7 +857,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
mouseDownCompCoords = null; mouseDownCompCoords = null;
if (!getBounds().contains(e.getPoint())) { if (!getBounds().contains(e.getPoint())) {
setBackground(originColor); contentPane.setBackground(originColor);
} }
} }
@Override @Override
@ -874,7 +875,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
} else if (isMovable) { } else if (isMovable) {
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
setBackground(UIConstants.POPUP_TITLE_BACKGROUND); contentPane.setBackground(UIConstants.POPUP_TITLE_BACKGROUND);
} else { } else {
setCursor(Cursor.getDefaultCursor()); setCursor(Cursor.getDefaultCursor());
} }
@ -916,13 +917,18 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
super(); super();
this.propertyItem = propertyItem; this.propertyItem = propertyItem;
this.title = propertyItem.getTitle(); this.title = propertyItem.getTitle();
originColor = Color.WHITE; originColor = UIConstants.UI_TOOLBAR_COLOR;
setBackground(originColor);
setLayout(new BorderLayout()); contentPane = new JPanel();
contentPane.setBackground(originColor);
contentPane.setLayout(new BorderLayout());
UILabel label = new UILabel(title); UILabel label = new UILabel(title);
add(label, BorderLayout.WEST); contentPane.add(label, BorderLayout.WEST);
setBorder(new EmptyBorder(5, 10, 5, 0)); contentPane.setBorder(new EmptyBorder(5, 10, 5, 0));
setLayout(new BorderLayout());
add(contentPane, BorderLayout.CENTER);
setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR));
initToolButton(buttonType); initToolButton(buttonType);
} }

6
designer_base/src/com/fr/design/mainframe/loghandler/LogMessageBar.java

@ -6,13 +6,13 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import javax.swing.JFrame; import javax.swing.JFrame;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.JPanel; import javax.swing.JPanel;
import static com.fr.design.constants.UIConstants.NORMAL_BACKGROUND;
public class LogMessageBar extends JPanel { public class LogMessageBar extends JPanel {
private UILabel messageLabel; private UILabel messageLabel;
private int width = 600; private int width = 600;
@ -36,7 +36,7 @@ public class LogMessageBar extends JPanel {
messageLabel = new UILabel(); messageLabel = new UILabel();
setLayout(new BorderLayout()); setLayout(new BorderLayout());
add(messageLabel, BorderLayout.CENTER); add(messageLabel, BorderLayout.CENTER);
setBackground(NORMAL_BACKGROUND); setBackground(UIConstants.LOG_MESSAGE_BAR_BACKGROUND);
addMouseListener(new MouseAdapter() { addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {

Loading…
Cancel
Save