|
|
@ -172,7 +172,7 @@ public class UIEastResizableContainer extends JPanel { |
|
|
|
leftPane.setBounds(0, topToolPaneHeight, leftPaneWidth, getHeight() - topToolPaneHeight); |
|
|
|
leftPane.setBounds(0, topToolPaneHeight, leftPaneWidth, getHeight() - topToolPaneHeight); |
|
|
|
|
|
|
|
|
|
|
|
// parameterPane.setBounds(20, 0, 230, getParameterPaneHeight());//10,0,230,462
|
|
|
|
// parameterPane.setBounds(20, 0, 230, getParameterPaneHeight());//10,0,230,462
|
|
|
|
rightPane.setBounds(leftPaneWidth, 0, containerWidth-leftPaneWidth, getHeight());//20,0,230,0
|
|
|
|
rightPane.setBounds(leftPaneWidth, 0, containerWidth - leftPaneWidth, getHeight());//20,0,230,0
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -242,7 +242,27 @@ public class UIEastResizableContainer extends JPanel { |
|
|
|
* 伸缩右子面板时,触发此方法 |
|
|
|
* 伸缩右子面板时,触发此方法 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void onResize() { |
|
|
|
public void onResize() { |
|
|
|
// do nothing here
|
|
|
|
refreshContainer(); |
|
|
|
|
|
|
|
if (DesignModeContext.isAuthorityEditing()) { |
|
|
|
|
|
|
|
DesignerContext.getDesignerFrame().doResize(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void showContainer() { |
|
|
|
|
|
|
|
if (containerWidth != leftPaneWidth) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
containerWidth = preferredWidth; |
|
|
|
|
|
|
|
onResize(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void hideContainer() { |
|
|
|
|
|
|
|
if (containerWidth == leftPaneWidth) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
setPreferredWidth(containerWidth); |
|
|
|
|
|
|
|
containerWidth = leftPaneWidth; |
|
|
|
|
|
|
|
onResize(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private class TopToolPane extends JPanel { |
|
|
|
private class TopToolPane extends JPanel { |
|
|
@ -281,15 +301,9 @@ public class UIEastResizableContainer extends JPanel { |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
if (e.getX() <= ARROW_RANGE) { |
|
|
|
if (e.getX() <= ARROW_RANGE) { |
|
|
|
if (containerWidth == leftPaneWidth) { |
|
|
|
if (containerWidth == leftPaneWidth) { |
|
|
|
containerWidth = preferredWidth; |
|
|
|
showContainer(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
setPreferredWidth(containerWidth); |
|
|
|
hideContainer(); |
|
|
|
containerWidth = leftPaneWidth; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
onResize(); |
|
|
|
|
|
|
|
refreshContainer(); |
|
|
|
|
|
|
|
if (DesignModeContext.isAuthorityEditing()) { |
|
|
|
|
|
|
|
DesignerContext.getDesignerFrame().doResize(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -316,5 +330,4 @@ public class UIEastResizableContainer extends JPanel { |
|
|
|
g.drawImage(button, 18, 7, 5, 10, null); |
|
|
|
g.drawImage(button, 18, 7, 5, 10, null); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |