use of com.intellij.openapi.wm.impl.ToolWindowsPane in project intellij-community by JetBrains.
the class BalloonLayoutImpl method doLayout.
private void doLayout(List<Balloon> balloons, int startX, int bottomY) {
int y = bottomY;
ToolWindowsPane pane = UIUtil.findComponentOfType(myParent, ToolWindowsPane.class);
if (pane != null) {
y -= pane.getBottomHeight();
}
if (myParent instanceof IdeRootPane) {
y -= ((IdeRootPane) myParent).getStatusBarHeight();
}
for (Balloon balloon : balloons) {
Rectangle bounds = new Rectangle(getSize(balloon));
y -= bounds.height;
bounds.setLocation(startX - bounds.width, y);
balloon.setBounds(bounds);
}
}
use of com.intellij.openapi.wm.impl.ToolWindowsPane in project intellij-community by JetBrains.
the class BalloonLayoutImpl method relayout.
private void relayout() {
final Dimension size = myLayeredPane.getSize();
JBInsets.removeFrom(size, myInsets);
final Rectangle layoutRec = new Rectangle(new Point(myInsets.left, myInsets.top), size);
List<ArrayList<Balloon>> columns = createColumns(layoutRec);
while (columns.size() > 1) {
remove(myBalloons.get(0), true);
columns = createColumns(layoutRec);
}
ToolWindowsPane pane = UIUtil.findComponentOfType(myParent, ToolWindowsPane.class);
JComponent layeredPane = pane != null ? pane.getMyLayeredPane() : null;
int eachColumnX = (layeredPane == null ? myLayeredPane.getWidth() : layeredPane.getX() + layeredPane.getWidth()) - 4;
doLayout(columns.get(0), eachColumnX + 4, (int) myLayeredPane.getBounds().getMaxY());
}
Aggregations