Platform: border around glass-pane progress + progress dialog is always the same size now (I hope)

This commit is contained in:
Anton Makeev
2012-07-12 14:23:55 +02:00
parent b44b66fdde
commit 823c263645
3 changed files with 11 additions and 6 deletions
@@ -18,7 +18,7 @@
</properties>
<border type="none"/>
<children>
<grid id="2694" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="2694" binding="myInnerPanel" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="2" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
@@ -411,10 +411,11 @@ public class ProgressWindow extends BlockingProgressIndicator implements Disposa
private JProgressBar myProgressBar;
private boolean myRepaintedFlag = true;
private TitlePanel myTitlePanel;
private DialogWrapper myPopup;
private final Window myParentWindow;
private Point myLastClicked;
private TitlePanel myTitlePanel;
private JPanel myInnerPanel;
private DialogWrapper myPopup;
private final Window myParentWindow;
private Point myLastClicked;
public MyDialog(boolean shouldShowBackground, Project project, String cancelText) {
Window parentWindow = WindowManager.getInstance().suggestParentWindow(project);
@@ -437,7 +438,7 @@ public class ProgressWindow extends BlockingProgressIndicator implements Disposa
if (UIUtil.isUnderAquaLookAndFeel()) {
UIUtil.applyStyle(UIUtil.ComponentStyle.SMALL, myText2Label);
}
myProgressBar.setPreferredSize(new Dimension(UIUtil.isUnderAquaLookAndFeel() ? 350 : 450, -1));
myInnerPanel.setPreferredSize(new Dimension(UIUtil.isUnderAquaLookAndFeel() ? 350 : 450, -1));
myCancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -94,6 +94,10 @@ public class ShadowBorderPainter {
right.paintIcon(c, g, width - sideSize, _y);
}
g.setColor(new Color(0, 0, 0, 30));
g.drawRect(SIDE_SIZE - 1, TOP_SIZE - 1,
width - SIDE_SIZE * 2 + 1, height - TOP_SIZE - BOTTOM_SIZE + 1);
g.dispose();
return image;
}