Browse Source

Merge pull request #1253 in BA/design from ~MOMEAK/design9.0:release/9.0 to release/9.0

* commit 'd06e1b0219f719090bf8029b0c872d2767f1c355':
  REPORT-4604 设计器视觉修改 UIButtonGroup选中字体颜色变白 (19)
  REPORT-4604 设计器视觉修改 1.文件树、数据集的底色修改 2.UIHEADGROUP的配色修改,控件设置那边增加一个上边框
master
superman 7 years ago
parent
commit
d0d3b4ddf3
  1. 4
      designer/src/com/fr/design/widget/CellWidgetCardPane.java
  2. 2
      designer_base/src/com/fr/design/constants/UIConstants.java
  3. 21
      designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java
  4. 4
      designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java
  5. 4
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

4
designer/src/com/fr/design/widget/CellWidgetCardPane.java

@ -1,5 +1,6 @@
package com.fr.design.widget; package com.fr.design.widget;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
@ -91,7 +92,8 @@ public class CellWidgetCardPane extends BasicPane {
tabbedPane.show(center, tabTitles[index]); tabbedPane.show(center, tabTitles[index]);
} }
}; };
tabsHeaderIconPane.setNeedLeftRightOutLine(false); tabsHeaderIconPane.setNeedLeftRightOutLine(true);
tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY));
this.add(tabsHeaderIconPane, BorderLayout.NORTH); this.add(tabsHeaderIconPane, BorderLayout.NORTH);
widgetPropertyPane = new BasicWidgetPropertySettingPane(); widgetPropertyPane = new BasicWidgetPropertySettingPane();

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

@ -74,7 +74,7 @@ public interface UIConstants {
public static final Color OCEAN_BLUE = new Color(141, 179, 217); public static final Color OCEAN_BLUE = new Color(141, 179, 217);
public static final Color DARK_BLUE = new Color(0, 88, 144); public static final Color DARK_BLUE = new Color(0, 88, 144);
public static final Color NORMAL_BACKGROUND = new Color(212, 212, 216); public static final Color NORMAL_BACKGROUND = new Color(212, 212, 216);
public static final Color TREE_BACKGROUND = new Color(240, 240, 243); public static final Color TREE_BACKGROUND = new Color(245, 245, 247);
public static final Color TOOL_PANE_BACKGROUND = new Color(232, 232, 223); public static final Color TOOL_PANE_BACKGROUND = new Color(232, 232, 223);
public static final Color SELECT_TAB = new Color(245, 245, 247); public static final Color SELECT_TAB = new Color(245, 245, 247);
public static final Color TOOLBARUI_BACKGROUND = new Color(255, 255, 255); public static final Color TOOLBARUI_BACKGROUND = new Color(255, 255, 255);

21
designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -8,11 +8,14 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import sun.swing.SwingUtilities2;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import javax.swing.plaf.basic.BasicHTML;
import javax.swing.text.View;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
@ -145,6 +148,24 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
} }
}; };
labelButton.setUI(new UIButtonUI() {
protected void paintText(Graphics g, AbstractButton b, String text, Rectangle textRec) {
View v = (View) b.getClientProperty(BasicHTML.propertyKey);
if (v != null) {
v.paint(g, textRec);
return;
}
FontMetrics fm = SwingUtilities2.getFontMetrics(b, g);
int mnemonicIndex = b.getDisplayedMnemonicIndex();
if (isPressed(b)) {
g.setColor(Color.white);
} else {
g.setColor(Color.black);
}
SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemonicIndex, textRec.x + getTextShiftOffset(), textRec.y + fm.getAscent() + getTextShiftOffset());
}
});
initButton(labelButton); initButton(labelButton);
} }
} }

4
designer_base/src/com/fr/design/gui/ibutton/UIButtonUI.java

@ -68,6 +68,10 @@ public class UIButtonUI extends BasicButtonUI {
} }
private void paintText(Graphics g, AbstractButton b, String text) { private void paintText(Graphics g, AbstractButton b, String text) {
paintText(g, b, text ,textRec);
}
protected void paintText(Graphics g, AbstractButton b, String text, Rectangle textRec) {
View v = (View) b.getClientProperty(BasicHTML.propertyKey); View v = (View) b.getClientProperty(BasicHTML.propertyKey);
if (v != null) { if (v != null) {
v.paint(g, textRec); v.paint(g, textRec);

4
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.designer.beans.events.DesignerEditListener; import com.fr.design.designer.beans.events.DesignerEditListener;
import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.*; import com.fr.design.designer.creator.*;
@ -275,7 +276,8 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
tabbedPane.show(center, tabTitles[index]); tabbedPane.show(center, tabTitles[index]);
} }
}; };
tabsHeaderIconPane.setNeedLeftRightOutLine(false); tabsHeaderIconPane.setNeedLeftRightOutLine(true);
tabsHeaderIconPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.SHADOW_GREY));
this.add(tabsHeaderIconPane, BorderLayout.NORTH); this.add(tabsHeaderIconPane, BorderLayout.NORTH);
} }

Loading…
Cancel
Save