xiaoxia 8 years ago
parent
commit
b3bcd7085a
  1. 18
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java

18
designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -222,7 +222,11 @@ public class UIResizableContainer extends JPanel {
toolPaneY = getHeight() - toolPaneHeight;
}
parameterPane.setBounds(20, 0, 230, getParameterPaneHeight());
upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneY);
horizontToolPane.setBounds(toolPaneHeight, toolPaneY + getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneHeight);
downPane.setBounds(toolPaneHeight, toolPaneY + toolPaneHeight + getParameterPaneHeight(), containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight - getParameterPaneHeight());
verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight());
@ -232,7 +236,6 @@ public class UIResizableContainer extends JPanel {
verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight());
}
}
}
@Override
@ -302,6 +305,15 @@ public class UIResizableContainer extends JPanel {
return this.downPane;
}
/**
* 得到参数面板
*
* @return
*/
public JComponent getParameterPane() {
return this.parameterPane;
}
/**
* 刷新下面板
*/
@ -343,7 +355,7 @@ public class UIResizableContainer extends JPanel {
public void mouseDragged(MouseEvent e) {
toolPaneY = e.getYOnScreen() - UIResizableContainer.this.getLocationOnScreen().y;
toolPaneY = toolPaneY < 0 ? 0 : toolPaneY;
toolPaneY = toolPaneY > UIResizableContainer.this.getHeight() - toolPaneHeight ? UIResizableContainer.this.getHeight() - toolPaneHeight : toolPaneY;
toolPaneY = toolPaneY > UIResizableContainer.this.getHeight() - toolPaneHeight ? UIResizableContainer.this.getHeight() - toolPaneHeight - getParameterPaneHeight() : toolPaneY - getParameterPaneHeight();
refreshContainer();
}
});
@ -366,7 +378,7 @@ public class UIResizableContainer extends JPanel {
if (e.getX() <= ARROW_RANGE) {
toolPaneY = 0;
} else if (e.getX() >= getWidth() - ARROW_RANGE) {
toolPaneY = UIResizableContainer.this.getHeight() - toolPaneHeight;
toolPaneY = UIResizableContainer.this.getHeight() - toolPaneHeight - getParameterPaneHeight();
} else {
return;
}

Loading…
Cancel
Save