From 436a6bd227ca9a77c6b1d50064681225ebf63f69 Mon Sep 17 00:00:00 2001 From: hzzz Date: Wed, 20 Sep 2017 16:32:30 +0800 Subject: [PATCH] toolbar border --- .../src/com/fr/design/constants/UIConstants.java | 2 +- .../com/fr/design/data/datapane/TableDataTreePane.java | 3 +++ .../fr/design/mainframe/DesignerFrameFileDealerPane.java | 9 ++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index fd809bb81a..ae9f97d06f 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -64,6 +64,7 @@ public interface UIConstants { Constants.LINE_MEDIUM_DASH_DOT_DOT, //medium dash-dot-dot border Constants.LINE_SLANTED_DASH_DOT, //slanted dash-dot border }; + public static final Color TOOLBAR_BORDER_COLOR = new Color(0xD9DADD); public static final Color COMBOBOX_BTN_NORMAL = new Color(0xD9DADD); public static final Color COMBOBOX_BTN_ROLLOVER = new Color(0xC8C9CD); public static final Color COMBOBOX_BTN_PRESS = new Color(0xD8F2FD); @@ -116,7 +117,6 @@ public interface UIConstants { public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); - public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png"); public static final BufferedImage DRAG_BAR_RIGHT = BaseUtils.readImage("com/fr/design/images/control/barm.png"); public static final BufferedImage DRAG_BAR_LEFT = BaseUtils.readImage("com/fr/design/images/control/barl.png"); diff --git a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java index c507995f41..7a4cf52042 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java @@ -6,6 +6,7 @@ import com.fr.data.TableDataSource; import com.fr.design.DesignModelAdapter; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; +import com.fr.design.constants.UIConstants; import com.fr.design.data.BasicTableDataTreePane; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.tabledata.StoreProcedureWorkerListener; @@ -111,6 +112,8 @@ public class TableDataTreePane extends BasicTableDataTreePane { ToolBarDef toolbarDef = new ToolBarDef(); toolbarDef.addShortCut(addMenuDef, SeparatorDef.DEFAULT, editAction, removeAction, SeparatorDef.DEFAULT, previewTableDataAction, connectionTableAction); UIToolbar toolBar = ToolBarDef.createJToolBar(); + toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR)); + toolBar.setBorderPainted(true); toolbarDef.updateToolBar(toolBar); JPanel toolbarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index f89a0766f8..0c780fe941 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -79,10 +79,13 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt private DesignerFrameFileDealerPane() { setLayout(new BorderLayout()); toolBar = ToolBarDef.createJToolBar(); - toolBar.setBorder(BorderFactory.createEmptyBorder(3, 0, 4, 0)); + toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.TOOLBAR_BORDER_COLOR)); + toolBar.setBorderPainted(true); JPanel tooBarPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - - tooBarPane.add(toolBar, BorderLayout.CENTER); + JPanel parent = new JPanel(new BorderLayout()); + parent.add(toolBar, BorderLayout.CENTER); + parent.setBorder(BorderFactory.createEmptyBorder(3, 0, 4, 0)); + tooBarPane.add(parent, BorderLayout.CENTER); tooBarPane.add(new UIMenuHighLight(), BorderLayout.SOUTH); add(tooBarPane, BorderLayout.NORTH);