Browse Source

Merge pull request #1300 in BA/design from ~PLOUGH/design:release/9.0 to release/9.0

* commit 'c919184561d632af068849171ddc53b067196639':
  REPORT-4868 设计器视觉bug修改(二)部分=>5(滚动条) 校正中点位置
  REPORT-4868 设计器视觉bug修改(二)部分=>19 三点居中
  REPORT-4868 设计器视觉bug修改(二)部分=>19 修复改出的bug
  REPORT-4868 设计器视觉bug修改(二)部分=>19 下拉框样式统一
  无JIRA任务,设计器视觉调整=》选中列表项发生轻微移动问题
  REPORT-4868 设计器视觉bug修改(二)部分=>12(边框线)视觉调整
  REPORT-4868 设计器视觉bug修改(二)部分=>5(滚动条)Mac下向右滑动的残影问题
  REPORT-4868 设计器视觉bug修改(二)部分=>10 下拉框风格统一
master
superman 7 years ago
parent
commit
b66d70a816
  1. 2
      designer_base/src/com/fr/design/constants/UIConstants.java
  2. 12
      designer_base/src/com/fr/design/editor/ValueEditorPane.java
  3. 3
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  4. 17
      designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java
  5. 6
      designer_base/src/com/fr/design/mainframe/JSliderPane.java
  6. 9
      designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java
  7. 2
      designer_base/src/com/fr/design/utils/ThemeUtils.java
  8. 20
      designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java

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

@ -115,6 +115,7 @@ public interface UIConstants {
public static final Color TAB_BUTTON_PRESS = new Color(228, 227, 232);
public static final Color TAB_BUTTON_PRESS_SELECTED = new Color(236, 236, 238);
public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd);
public static final Color LIST_ITEM_SPLIT_LINE = new Color(0xf0f0f3);
@ -130,6 +131,7 @@ public interface UIConstants {
public static final BufferedImage DRAG_LEFT_NORMAL = BaseUtils.readImage("com/fr/design/images/control/leftnor.png");
public static final BufferedImage DRAG_LEFT_PRESS = BaseUtils.readImage("com/fr/design/images/control/leftpre.png");
public static final BufferedImage DRAG_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png");
public static final BufferedImage ACCESSIBLE_EDITOR_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png");
public static final BufferedImage DRAG_DOT_VERTICAL = BaseUtils.readImage("com/fr/design/images/control/dotv.png");
public static final BufferedImage POP_BUTTON_DOWN = BaseUtils.readImage("com/fr/design/images/buttonicon/popdownarrow.png");
public static final BufferedImage POP_BUTTON_UP = BaseUtils.readImage("com/fr/design/images/buttonicon/popuparrow.png");

12
designer_base/src/com/fr/design/editor/ValueEditorPane.java

@ -2,16 +2,17 @@ package com.fr.design.editor;
import com.fr.base.Formula;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.BasicPane;
import com.fr.design.editor.editor.*;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.gui.imenu.UIMenuEastAttrItem;
import com.fr.design.gui.imenu.UIPopupEastAttrMenu;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.dialog.BasicPane;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
@ -136,14 +137,14 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
private JPopupMenu createPopMenu() {
JPopupMenu scate = new JPopupMenu();
JPopupMenu scate = new UIPopupEastAttrMenu();
if (this.cards == null) {
return scate;
}
for (int i = 0; i < this.cards.length; i++) {
UIMenuItem item = new UIMenuItem(cards[i].getName());
JMenuItem item = new UIMenuEastAttrItem(cards[i].getName());
final int j = i;
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@ -162,9 +163,6 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName
}
});
scate.add(item);
if (i < cards.length - 1) {
scate.addSeparator();
}
}
return scate;
}

3
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -178,7 +178,8 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
// 封装一层,加边框
JPanel toolBarPane = new JPanel(new BorderLayout());
toolBarPane.add(toolBar, BorderLayout.CENTER);
toolBarPane.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, new Color(201, 198, 184)));
toolBarPane.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, UIConstants.RULER_LINE_COLOR));
leftContentPane.add(toolBarPane, BorderLayout.NORTH);
// 顶部标签及add按钮

17
designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java

@ -51,7 +51,7 @@ public class UINameableListCellRenderer extends
}
};
editButton.setIcon(listControlPane.isNewStyle() ? UIConstants.LIST_EDIT_ICON : UIConstants.CPT_ICON);
editButton.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, BORDER_COLOR));
editButton.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, UIConstants.LIST_ITEM_SPLIT_LINE));
editButton.setHorizontalAlignment(SwingConstants.CENTER);
label = new UILabel();
label.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
@ -62,7 +62,7 @@ public class UINameableListCellRenderer extends
}
private Border getNoFocusBorder() {
return BorderFactory.createMatteBorder(0, 0, 1, 0, BORDER_COLOR);
return BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.LIST_ITEM_SPLIT_LINE);
}
private void setText(String t) {
@ -110,19 +110,6 @@ public class UINameableListCellRenderer extends
setEnabled(list.isEnabled());
setFont(list.getFont());
Border border = null;
if (cellHasFocus) {
if (isSelected) {
border = DefaultLookup.getBorder(this, ui, "List.focusSelectedCellHighlightBorder");
}
if (border == null) {
border = DefaultLookup.getBorder(this, ui, "List.focusCellHighlightBorder");
}
} else {
border = getNoFocusBorder();
}
setBorder(border);
if (value instanceof ListModelElement) {
Nameable wrappee = ((ListModelElement) value).wrapper;
this.setText(((ListModelElement) value).wrapper.getName());

6
designer_base/src/com/fr/design/mainframe/JSliderPane.java

@ -438,6 +438,7 @@ class JSliderPaneUI extends BasicSliderUI {
private static final int FOUR = 4;
private static final int FIVE = 5;
private static final int SIX = 6;
private static final int MID_X_SHIFT = 2; // 中点标记的水平位置偏移
public JSliderPaneUI(UISlider b) {
super(b);
@ -455,10 +456,7 @@ class JSliderPaneUI extends BasicSliderUI {
Graphics2D g2d = (Graphics2D) g;
g2d.translate(knobBounds.x, knobBounds.y);
// g2d.setColor(slider.getBackground());
// g2d.fillRect(0, FOUR, FOUR, 9);
g2d.setColor(new Color(51, 51, 52));
g2d.drawRoundRect(0, SIX, FOUR, 9, 2, 2);
g2d.fillRoundRect(0, SIX, FOUR, 9, 2, 2);
}
@ -477,7 +475,7 @@ class JSliderPaneUI extends BasicSliderUI {
g2.fillRect(0, -cy, cw + 10, cy * 4);
g.setColor(new Color(216, 216, 216));
g.drawLine(0, cy, cw + 3, cy);
g.drawLine(FIVE + cw / 2, cy - FOUR, FIVE + cw / 2, cy + FOUR);
g.drawLine(MID_X_SHIFT + cw / 2, cy - FOUR, MID_X_SHIFT + cw / 2, cy + FOUR);
} else {
super.paintTrack(g);
}

9
designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java

@ -9,12 +9,11 @@ import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.AbstractButton;
import javax.swing.BorderFactory;
import javax.swing.*;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.plaf.ButtonUI;
@ -128,7 +127,7 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor
protected void initPopupButton() {
if (!isComboButton()) {
btPopup.setText("...");
btPopup.setIcon(new ImageIcon(UIConstants.ACCESSIBLE_EDITOR_DOT));
btPopup.setPreferredSize(new Dimension(20, 20));
} else {
btPopup.setRolloverEnabled(true);

2
designer_base/src/com/fr/design/utils/ThemeUtils.java

@ -145,7 +145,7 @@ public class ThemeUtils {
public static final boolean MENU_ROLLOVER = true;
public static final ColorUIResource SCROLL_PANE_BORDER_COLOR = new ColorUIResource(201, 198, 184);
public static final ColorUIResource SCROLL_PANE_BORDER_COLOR = new ColorUIResource(0xD9DADD);
public static final ColorUIResource TABLE_BORDER_LIGHT_COLOR = new ColorUIResource(210, 210, 210);
public static final ColorUIResource TABLE_BORDER_DARK_COLOR = new ColorUIResource(210, 210, 210);

20
designer_form/src/com/fr/design/mainframe/widget/UITreeComboBox.java

@ -16,6 +16,8 @@ import com.fr.design.designer.beans.*;
import com.fr.design.designer.beans.events.DesignerEditListener;
import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxUI;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.mainframe.ComponentTree;
import com.sun.java.swing.plaf.motif.*;
@ -24,7 +26,7 @@ import com.sun.java.swing.plaf.windows.*;
/**
* 控件树下拉列表框
*/
public class UITreeComboBox extends JComboBox{
public class UITreeComboBox extends UIComboBox {
/**
* 显示用的树
*/
@ -53,6 +55,14 @@ public class UITreeComboBox extends JComboBox{
this.updateUI();
}
@Override
public void setRenderer(ListCellRenderer aRenderer) {
ListCellRenderer oldRenderer = renderer;
renderer = aRenderer;
firePropertyChange( "renderer", oldRenderer, renderer );
invalidate();
}
/**
* 取得树
* @return JTree
@ -76,7 +86,7 @@ public class UITreeComboBox extends JComboBox{
} else if(cui instanceof MotifComboBoxUI){
cui = new MotifJTreeComboBoxUI();
} else {
cui = new WindowsJTreeComboBoxUI();
cui = new UIJTreeComboBoxUI();
}
setUI(cui);
}
@ -107,6 +117,12 @@ public class UITreeComboBox extends JComboBox{
}
}
class UIJTreeComboBoxUI extends UIComboBoxUI {
protected ComboPopup createPopup() {
return new TreePopup(comboBox);
}
}
class MotifJTreeComboBoxUI extends MotifComboBoxUI{
protected ComboPopup createPopup() {
return new TreePopup(comboBox);

Loading…
Cancel
Save