Commits

mabe02 committed 1b2a4b7 Merge

[Merge from default]

Comments (0)

Files changed (6)

deploy-build.xml

File contents unchanged.

src/org/lantern/BuildInformation.java

 public class BuildInformation
 {
     public static final String VERSION = "1.0.2-SNAPSHOT";
-    public static final int BUILD = 48;
+    public static final int BUILD = 50;
 }
 
         

src/org/lantern/gui/TextGraphics.java

         if(string.length() + column > areaSize.getColumns())
             string = string.substring(0, areaSize.getColumns() - column);
 
-        EnumSet<Terminal.Style> stylesSet = EnumSet.copyOf(Arrays.asList(styles));
+        EnumSet<Terminal.Style> stylesSet = EnumSet.noneOf(Terminal.Style.class);
+        stylesSet.addAll(Arrays.asList(styles));
         if(currentlyBold)
             stylesSet.add(Terminal.Style.Bold);
 

src/org/lantern/screen/Screen.java

 import java.util.LinkedList;
 import java.util.Map;
 import java.util.TreeMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 import org.lantern.LanternException;
 import org.lantern.input.InputProvider;

src/org/lantern/test/gui/ActionListTest.java

 
         Panel mainPanel = new Panel(new Border.Invisible(), Panel.Orientation.VERTICAL);
         ActionListBox actionListBox = new ActionListBox();
-        for(int i = 0; i < 5; i++) {
-            actionListBox.addItem(new ActionListBox.Item() {
-                public String getTitle()
-                {
-                    return "ActionListBox item";
-                }
-
-                public void doAction() throws LanternException
-                {
-                }
-            });
-        }
+        for(int i = 0; i < 5; i++)
+            actionListBox.addItem(new ActionListBoxItem());
+        
         mainPanel.addComponent(actionListBox);
         window1.addComponent(mainPanel);
 
         terminalGUIScreen.showWindow(window1, GUIScreen.Position.CENTER);
         terminal.stopAndRestoreTerminal();
     }
+    
+    private static class ActionListBoxItem implements ActionListBox.Item {             
+        private static int counter = 1;
+        private int nr;
+
+        public ActionListBoxItem() {
+            nr = counter++;
+        }
+        
+        public String getTitle() {
+            return "ActionListBox item #" + nr;
+        }
+
+        public void doAction() throws LanternException {
+        }
+    }
 }

src/org/lantern/test/gui/ListBoxTest.java

             }
         }
 
-        LanternTerminal terminal = new LanternTerminal(new TerminalFactory.Common());
+        LanternTerminal terminal = new LanternTerminal();
         final GUIScreen terminalGUIScreen = terminal.getGUIScreen();
         if(terminalGUIScreen == null) {
             System.err.println("Couldn't allocate a terminal!");