Browse Source

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

* commit '822cb519a8a05fa499de1af728bf830f56f94b0b':
  REPORT-3163 合作开发9.0设计器=>调整下拉框的边框颜色
  REPORT-3163 合作开发9.0设计器=>列表面板=》顶部按钮界面调整
master
superman 7 years ago
parent
commit
076ab2d938
  1. 9
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  2. 7
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java

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

@ -155,7 +155,14 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
leftContentPane.add(toolBarPane, BorderLayout.NORTH); leftContentPane.add(toolBarPane, BorderLayout.NORTH);
// 顶部标签及add按钮 // 顶部标签及add按钮
topToolBar = new UIToolbar(); topToolBar = new UIToolbar(FlowLayout.LEFT, new UIToolBarUI(){
@Override
public void paint(Graphics g, JComponent c) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(UIConstants.SELECT_TAB);
g2.fillRect(0, 0, c.getWidth(), c.getHeight());
}
});
topToolBar.setLayout(new BorderLayout()); topToolBar.setLayout(new BorderLayout());
ShortCut addItem = addItemShortCut().getShortCut(); ShortCut addItem = addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar); addItem.intoJToolBar(topToolBar);

7
designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java

@ -57,11 +57,12 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
super.paint(g, c); super.paint(g, c);
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Color linecolor = UIConstants.LINE_COLOR; Color linecolor = UIConstants.TITLED_BORDER_COLOR;
if (comboBox.isPopupVisible()) { if (comboBox.isPopupVisible()) {
arrowButton.setSelected(true); arrowButton.setSelected(true);
} else { } else {
linecolor = UIConstants.LINE_COLOR; linecolor = UIConstants.TITLED_BORDER_COLOR;
arrowButton.setSelected(false); arrowButton.setSelected(false);
} }
g2d.setColor(linecolor); g2d.setColor(linecolor);
@ -192,7 +193,7 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
@Override @Override
public void paintBorder(Graphics g) { public void paintBorder(Graphics g) {
Graphics2D g2 = (Graphics2D) g; Graphics2D g2 = (Graphics2D) g;
g2.setColor(UIConstants.LINE_COLOR); g2.setColor(UIConstants.TITLED_BORDER_COLOR);
g2.drawRoundRect(0, -arrowButton.getHeight(), getWidth() - 1, getHeight() + arrowButton.getHeight() - 1, UIConstants.ARC, UIConstants.ARC); g2.drawRoundRect(0, -arrowButton.getHeight(), getWidth() - 1, getHeight() + arrowButton.getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
} }

Loading…
Cancel
Save