Browse Source

REPORT-4634 组件叠加体验优化=>视觉调整=>控件树视觉调整

master
plough 7 years ago
parent
commit
0ad73ca523
  1. 4
      designer_form/src/com/fr/design/mainframe/ComponentTree.java
  2. 11
      designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java
  3. 2
      designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java

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

@ -29,8 +29,8 @@ public class ComponentTree extends JTree {
private ComponentTreeModel model; private ComponentTreeModel model;
private UITreeUI uiTreeUI = new UITreeUI(); private UITreeUI uiTreeUI = new UITreeUI();
private PopupPreviewPane previewPane; private PopupPreviewPane previewPane;
private static final int PADDING_LEFT = 10; private static final int PADDING_LEFT = 5;
private static final int PADDING_TOP = 8; private static final int PADDING_TOP = 5;
public ComponentTree(FormDesigner designer) { public ComponentTree(FormDesigner designer) {
this.designer = designer; this.designer = designer;

11
designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java

@ -13,6 +13,7 @@ import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itoolbar.UIToolBarUI; import com.fr.design.gui.itoolbar.UIToolBarUI;
import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.gui.style.BorderPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
@ -33,6 +34,7 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
private static final int PARA = 0; private static final int PARA = 0;
private static final int BODY = 1; private static final int BODY = 1;
private static final int SHORTS_SEPARATOR_POS = 4; private static final int SHORTS_SEPARATOR_POS = 4;
private static final int TOOLBAR_PADDING_RIGHT = 10;
private ShortCut4JControlPane[] shorts; private ShortCut4JControlPane[] shorts;
private ComponentTree componentTree; private ComponentTree componentTree;
@ -114,12 +116,11 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
shorts = createShortcuts(); shorts = createShortcuts();
JPanel widgetPane = new JPanel(); JPanel widgetPane = new JPanel();
widgetPane.setBorder(BorderFactory.createLineBorder(UIConstants.RULER_LINE_COLOR));
widgetPane.setLayout(FRGUIPaneFactory.createBorderLayout()); widgetPane.setLayout(FRGUIPaneFactory.createBorderLayout());
widgetPane.add(getToolBarPane(), BorderLayout.CENTER); widgetPane.add(getToolBarPane(), BorderLayout.CENTER);
UIScrollPane scrollPane = new UIScrollPane(componentTree); UIScrollPane scrollPane = new UIScrollPane(componentTree);
scrollPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.RULER_LINE_COLOR)); scrollPane.setBorder(BorderFactory.createEmptyBorder());
scrollPane.setPreferredSize(new Dimension(210, 170)); scrollPane.setPreferredSize(new Dimension(210, 170));
widgetPane.add(scrollPane, BorderLayout.SOUTH); widgetPane.add(scrollPane, BorderLayout.SOUTH);
return widgetPane; return widgetPane;
@ -144,7 +145,11 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
JPanel toolBarPane = new JPanel(new BorderLayout()); JPanel toolBarPane = new JPanel(new BorderLayout());
toolBarPane.add(toolBar, BorderLayout.CENTER); toolBarPane.add(toolBar, BorderLayout.CENTER);
return toolBarPane; toolBarPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.BARNOMAL));
JPanel toolBarPaneWrapper = new JPanel(new BorderLayout());
toolBarPaneWrapper.add(toolBarPane, BorderLayout.CENTER);
toolBarPaneWrapper.setBorder(BorderFactory.createEmptyBorder(1, 0, 2, TOOLBAR_PADDING_RIGHT));
return toolBarPaneWrapper;
} }
protected ShortCut4JControlPane[] createShortcuts() { protected ShortCut4JControlPane[] createShortcuts() {

2
designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java

@ -118,7 +118,7 @@ public class ParameterPropertyPane extends JPanel{
private void setEditor(FormDesigner editor) { private void setEditor(FormDesigner editor) {
if (formHierarchyTreePaneWrapper == null) { if (formHierarchyTreePaneWrapper == null) {
formHierarchyTreePaneWrapper = new JPanel(new BorderLayout()); formHierarchyTreePaneWrapper = new JPanel(new BorderLayout());
formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(PADDING_MIDDLE, PADDING_MIDDLE, 0, PADDING_MIDDLE)); formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, 0, 0));
this.add(formHierarchyTreePaneWrapper, BorderLayout.SOUTH); this.add(formHierarchyTreePaneWrapper, BorderLayout.SOUTH);
} }
formHierarchyTreePaneWrapper.remove(FormHierarchyTreePane.getInstance()); formHierarchyTreePaneWrapper.remove(FormHierarchyTreePane.getInstance());

Loading…
Cancel
Save