Merge remote-tracking branch 'origin/master'

This commit is contained in:
Vladimir.Orlov
2014-10-20 17:04:31 +04:00
5 changed files with 22 additions and 22 deletions
@@ -112,12 +112,12 @@ public final class HorizontalLayout implements LayoutManager2 {
@Override
public void addLayoutComponent(String name, Component component) {
synchronized (component.getTreeLock()) {
if (name == null || CENTER.equalsIgnoreCase(name)) {
myCenter.add(component);
}
else if (LEFT.equalsIgnoreCase(name)) {
if (name == null || LEFT.equalsIgnoreCase(name)) {
myLeft.add(component);
}
else if (CENTER.equalsIgnoreCase(name)) {
myCenter.add(component);
}
else if (RIGHT.equalsIgnoreCase(name)) {
myRight.add(component);
}
@@ -242,7 +242,7 @@ public final class HorizontalLayout implements LayoutManager2 {
if (result == null) {
result = new Dimension();
}
else if (aligned) {
else if (aligned && center != null) {
int leftWidth = left == null ? 0 : left.width;
int rightWidth = right == null ? 0 : right.width;
result.width += Math.abs(leftWidth - rightWidth);
@@ -112,12 +112,12 @@ public final class VerticalLayout implements LayoutManager2 {
@Override
public void addLayoutComponent(String name, Component component) {
synchronized (component.getTreeLock()) {
if (name == null || CENTER.equalsIgnoreCase(name)) {
myCenter.add(component);
}
else if (TOP.equalsIgnoreCase(name)) {
if (name == null || TOP.equalsIgnoreCase(name)) {
myTop.add(component);
}
else if (CENTER.equalsIgnoreCase(name)) {
myCenter.add(component);
}
else if (BOTTOM.equalsIgnoreCase(name)) {
myBottom.add(component);
}
@@ -242,7 +242,7 @@ public final class VerticalLayout implements LayoutManager2 {
if (result == null) {
result = new Dimension();
}
else if (aligned) {
else if (aligned && center != null) {
int topHeight = top == null ? 0 : top.height;
int bottomHeight = bottom == null ? 0 : bottom.height;
result.width += Math.abs(topHeight - bottomHeight);
@@ -66,9 +66,9 @@ final class Banner extends JPanel {
}
else {
if (i > 0) {
myLeftPanel.add(HorizontalLayout.LEFT, RelativeFont.HUGE.install(new JLabel("\u203A")));
myLeftPanel.add(RelativeFont.HUGE.install(new JLabel("\u203A")));
}
myLeftPanel.add(HorizontalLayout.LEFT, RelativeFont.BOLD.install(new JLabel(name)));
myLeftPanel.add(RelativeFont.BOLD.install(new JLabel(name)));
}
i += 2;
}
@@ -97,7 +97,7 @@ public class BytecodeSourceMapper {
buffer.append("Lines mapping:").appendLineSeparator();
Map<Integer, Integer> sorted = new TreeMap<Integer, Integer>(linesMapping);
for (Entry<Integer, Integer> entry : sorted.entrySet()) {
buffer.append(entry.getKey()).append(" <-> ").append(entry.getValue()).appendLineSeparator();
buffer.append(entry.getKey()).append(" <-> ").append(entry.getValue()+ offset_total + 1).appendLineSeparator();
}
}
@@ -58,12 +58,12 @@ class 'pkg/TestClassSimpleBytecodeMapping' {
}
Lines mapping:
12 <-> 2
14 <-> 3
17 <-> 5
21 <-> 8
22 <-> 9
23 <-> 10
25 <-> 12
26 <-> 13
31 <-> 18
12 <-> 5
14 <-> 6
17 <-> 8
21 <-> 11
22 <-> 12
23 <-> 13
25 <-> 15
26 <-> 16
31 <-> 21