Browse Source

预览按钮背景色

master
hzzz 7 years ago
parent
commit
ada421c6a8
  1. 33
      designer/src/com/fr/start/Designer.java

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

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

Loading…
Cancel
Save