X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fcom%2Fgooglecode%2Flanterna%2Fgui2%2FBorderLayout.java;h=446774c834e3434a0e8d1ceccc57cdf283bf2b6b;hb=bcb54330afff6a443ab43ee3d38cc7f863c701b7;hp=6cc6e85e8d5f779225f0f8355e249c494063e35d;hpb=0b0b2b0ff1f5e21f7b0feb955b4b54855fb3d508;p=jvcard.git diff --git a/src/com/googlecode/lanterna/gui2/BorderLayout.java b/src/com/googlecode/lanterna/gui2/BorderLayout.java index 6cc6e85..446774c 100644 --- a/src/com/googlecode/lanterna/gui2/BorderLayout.java +++ b/src/com/googlecode/lanterna/gui2/BorderLayout.java @@ -133,38 +133,16 @@ public class BorderLayout implements LayoutManager { if(layout.containsKey(Location.LEFT)) { Component leftComponent = layout.get(Location.LEFT); leftComponentWidth = Math.min(leftComponent.getPreferredSize().getColumns(), availableHorizontalSpace); - - /* - if(leftComponentWidth == availableHorizontalSpace ){ - if(layout.containsKey(Location.RIGHT)) - leftComponentWidth--; - if(layout.containsKey(Location.CENTER)) - leftComponentWidth--; - }*/ - leftComponent.setPosition(new TerminalPosition(0, topComponentHeight)); leftComponent.setSize(new TerminalSize(leftComponentWidth, availableVerticalSpace)); availableHorizontalSpace -= leftComponentWidth; - - if(availableHorizontalSpace<=0) - availableHorizontalSpace=1; } if(layout.containsKey(Location.RIGHT)) { Component rightComponent = layout.get(Location.RIGHT); int rightComponentWidth = Math.min(rightComponent.getPreferredSize().getColumns(), availableHorizontalSpace); - - /* - if(rightComponentWidth == availableHorizontalSpace ){ - if(layout.containsKey(Location.CENTER)) - rightComponentWidth--; - }*/ - rightComponent.setPosition(new TerminalPosition(area.getColumns() - rightComponentWidth, topComponentHeight)); rightComponent.setSize(new TerminalSize(rightComponentWidth, availableVerticalSpace)); availableHorizontalSpace -= rightComponentWidth; - - if(availableHorizontalSpace<=0) - availableHorizontalSpace=1; } if(layout.containsKey(Location.CENTER)) { Component centerComponent = layout.get(Location.CENTER);