mabe02 / lanterna Goto Github PK
View Code? Open in Web Editor NEWJava library for creating text-based GUIs
License: GNU Lesser General Public License v3.0
Java library for creating text-based GUIs
License: GNU Lesser General Public License v3.0
I found that this was removed in the release 2.1.0. I found there was a padding
added to the layout manager. I have several panels on a window and to have
padding between components in the panels I am forced to use a layout manager
for each panel when I just do without it with just specifying the Orientation.
Could you get that feature back or have any alternatives?
Original issue reported on code.google.com by [email protected]
on 28 Sep 2012 at 8:17
It would be nice to exclude the test classes from the generated javadocs as
they're just adding clutter.
Original issue reported on code.google.com by [email protected]
on 3 Sep 2012 at 4:31
I don't think showing the cursor on items like Buttons (which you can't
navigate within) looks that good. I'd prefer to have the cursor made invisible
when those items are focused, relying solely on the Components alternate
display in its focused state. Or if the cursor can't be hidden, stick it in the
corner of the screen where it's less jarring.
Original issue reported on code.google.com by [email protected]
on 11 Sep 2012 at 9:25
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
I can only use java 142. Can you please, post the jar file that has class files
compiled with java142. I am restricted to use Java142 and I am trying out a
different Operating system. I am trying to use this on IBM 4690. I found this
useful, because it doesnt use any native DLLs. Please feel free advice. Also, I
would be grateful if you can compile the source against 142.
Thanks,
Sunil.
Original issue reported on code.google.com by [email protected]
on 18 Oct 2011 at 8:17
See this: http://myfreebsd.homeunix.net/freebsd/mouse_events_shell.html
We should expose these mouse events through the Terminal interface
Original issue reported on code.google.com by [email protected]
on 21 Sep 2012 at 12:29
Currently when the table cannot accomodate all rows in the screen I am seeing
an exception similar to the one when adding a checkbox to a table fails. It
would be useful if the table supported a scroll bar to run through the entries.
Original issue reported on code.google.com by [email protected]
on 30 Jul 2012 at 5:36
Window used to implement Container interface, but is no longer. We should
remove and clean-up the code in Window class to remove the traces of
implementing Container, by exposing the content pane.
Original issue reported on code.google.com by [email protected]
on 16 Sep 2012 at 9:07
Hi!
I noticed that the SwingTerminal crashes when resized to zero rows and then
resized again to more than zero rows. I have fixed it by adding checks to make
sure backbuffer.length > 0 and visibleScreen.length > 0.
The bugfix is available in my lanterna repo clone at
https://code.google.com/r/vassius-lanterna/
Feel free to merge it. :)
Link to specific revision:
https://code.google.com/r/vassius-lanterna/source/detail?r=96c213842b7cae8432995
b2d2f92a960d4daa56c
Affected version is 2.1.1
Stacktrace of error:
java.lang.ArrayIndexOutOfBoundsException: 0
at com.googlecode.lanterna.screen.Screen.resizeScreenIfNeeded(Screen.java:369)
at com.googlecode.lanterna.screen.Screen.refresh(Screen.java:310)
Original issue reported on code.google.com by [email protected]
on 15 Nov 2012 at 4:04
I pulled down the source and am looking through to see how one could implement
key-chording support but have a couple of questions:
a) are you amenable to receiving patches to this project?
b) what's your workflow like to ensure lack of regressions? I don't see any
automated test suites that I can run to make sure I'm not introducing bugs and
I'm not sure that I'd know what to look for in the manual test cases.
Original issue reported on code.google.com by [email protected]
on 19 Aug 2012 at 4:54
The version of the stty program included with OS X is a bit different from the
one Lantern seems to expect in two ways:
* It uses -f instead of -F to specify the TTY.
* It outputs "40 rows" instead of "rows 40".
Here's a patch that fixes both of these issues so querySize() works properly on
OS X (at least on Lion):
https://bitbucket.org/sjl/lanterna/changeset/7a339723fb24
My vanilla Java is a bit rusty, so there's probably a better way to do some of
that, but at least it's a start.
Original issue reported on code.google.com by [email protected]
on 11 Feb 2012 at 5:18
Something has broken the SizePolicy.MAXIMUM and SizePolicy.GROWING enums.
Original issue reported on code.google.com by [email protected]
on 16 Jul 2012 at 1:40
The SwingTerminal's title is static and can't be changed. I don't see why you
shouldn't be able to set it to whatever you like.
Original issue reported on code.google.com by [email protected]
on 12 Jul 2012 at 12:00
The SwingTerminal should prefer to use the "monospace" general font and then
depending on the platform switch to a different one. Defaulting to "Courier
New" is probably a bad thing.
Original issue reported on code.google.com by [email protected]
on 15 Jul 2012 at 7:31
Having mutually exclusive selection options are well worth adding to the GUI
component list.
Original issue reported on code.google.com by [email protected]
on 2 Jul 2012 at 7:28
Is there a way to set the size of GUIScreen so it remains constant and does not
keep changing when moving from one window to the other ?
Original issue reported on code.google.com by [email protected]
on 4 Sep 2012 at 10:41
So far, no computer with MacOSX has been available for testing Lanterna. Tests
should be carried out and it should be verified whether the Swing terminal
emulator works or not.
Original issue reported on code.google.com by [email protected]
on 25 Jun 2010 at 1:44
The classic terminal control codes ctrl+c, ctrl+d, etc, are not working after
exiting private mode, when running on Solaris.
Original issue reported on code.google.com by [email protected]
on 19 Nov 2012 at 1:03
Hello, when I try to run your example of GUIScreen (PanelTest) I get:
[x@dist]$ java -classpath lib/lanterna-1.0.1.jar -jar CDmenuPrototype.jar
Exception in thread "main" java.lang.IllegalArgumentException: Collection is
empty
at java.util.EnumSet.copyOf(EnumSet.java:166)
at org.lantern.gui.TextGraphics.drawString(Unknown Source)
at org.lantern.gui.TextGraphics.fillRectangle(Unknown Source)
at org.lantern.gui.GUIScreen.repaint(Unknown Source)
at org.lantern.gui.GUIScreen.update(Unknown Source)
at org.lantern.gui.GUIScreen.doEventLoop(Unknown Source)
at org.lantern.gui.GUIScreen.showWindow(Unknown Source)
at atest.PanelTest.main(PanelTest.java:85)
It is the same when I try simple stuff as well.
Thanks
Original issue reported on code.google.com by [email protected]
on 8 Dec 2011 at 4:02
I was just experimenting with ListSelectDialog which uses ActionListDialog,
passing Strings as the Objects. The selected item is only indicated by the
cursor. It would be nicer if the entry row in the list was highlighted.
Original issue reported on code.google.com by [email protected]
on 11 Sep 2012 at 9:22
I noticed the readInput function is non-blocking. So, in a loop the CPU usage
reaches 50% while the program waits for user presses a key.
Does a way exist to wait for a press key action by a sort of blocking readInput
function?
Original issue reported on code.google.com by [email protected]
on 5 Oct 2012 at 2:44
Please see attached screenshot. Characters are mangled as if only the left half
of them is being drawn. Happens on both the regular terminal (konsole) and via
Eclipse.
Could this be a font issue? Bad kerning? Is that being enforced via the
library? I don't see any font-related methods. Any pointers?
Thanks in advance.
$ stty
speed 38400 baud; line = 0;
-brkint ixoff -imaxbel
$ uname -a
Linux escher 2.6.39-gentoo-r3 #6 SMP PREEMPT Thu Dec 8 19:34:57 WET 2011 x86_64
Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel GNU/Linux
$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)
Original issue reported on code.google.com by [email protected]
on 4 May 2012 at 11:43
Attachments:
Specifically, the ability to read chars like Control/Alt/Meta+<char>, but
ideally even arbitrary chords such as two letters (e.g. ",.")
Original issue reported on code.google.com by [email protected]
on 19 Aug 2012 at 3:41
I currently see that even when controls are invisible I can tab to them giving
the feel that we are tabbing to some empty space in the window. This might be
similar to having a disable functionality for the components.
Original issue reported on code.google.com by [email protected]
on 24 Jul 2012 at 8:13
I am trying to add a checkbox to records in a table to enable operations on
multiple records and I see this error while showing the window.
java.lang.IllegalArgumentException: TerminalSize.columns cannot be less than 0!
at com.googlecode.lanterna.terminal.TerminalSize.setColumns(TerminalSize.java:49)
at com.googlecode.lanterna.gui.TextGraphics.subAreaGraphics(TextGraphics.java:80)
at com.googlecode.lanterna.gui.component.CommonCheckBox.repaint(CommonCheckBox.java:66)
at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
at com.googlecode.lanterna.gui.component.Table.repaint(Table.java:130)
at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:136)
at com.googlecode.lanterna.gui.Window.repaint(Window.java:109)
at com.googlecode.lanterna.gui.GUIScreen.repaint(GUIScreen.java:157)
at com.googlecode.lanterna.gui.GUIScreen.update(GUIScreen.java:170)
at com.googlecode.lanterna.gui.GUIScreen.doEventLoop(GUIScreen.java:204)
at com.googlecode.lanterna.gui.GUIScreen.showWindow(GUIScreen.java:272)
Original issue reported on code.google.com by [email protected]
on 24 Jul 2012 at 3:20
There has been a request to add functionality to make a GUI window take up the
whole screen.
Original issue reported on code.google.com by [email protected]
on 13 Jul 2012 at 8:02
It would be nice to have scrollbar for the ActionListBox if it cannot
accomodate all the elements in the screen. Currently the window just goes blank
and the listbox seems to just fill up the entire space over the other
components(I was filling up the listbox in an action event from one of the
components on the screen).
Original issue reported on code.google.com by [email protected]
on 21 Jun 2012 at 1:49
I found this to be extremely useful when I did not have a reference to the
active window that I need to close. Could you get this feature back?
Original issue reported on code.google.com by [email protected]
on 1 Oct 2012 at 3:18
It seems, after using lanterna in private mode, the keyboard shortcut ctrl+d
won't work. This has probably something to do with lanterna not properly
restoring some terminal settings after exiting.
Original issue reported on code.google.com by [email protected]
on 6 Jun 2012 at 1:46
There should be a way to customize how the background in the GUI is rendered,
rather than the current default blue color with an optional title.
Original issue reported on code.google.com by [email protected]
on 15 Jul 2012 at 7:33
I was trying to right align a button inside a panel. I have tried specifying
the alignment for both the button as well as the panel(using RIGHT_CENTER), but
the button still appears to be left aligned inside the panel. Am I doing
something wrong here?
Original issue reported on code.google.com by [email protected]
on 19 Oct 2012 at 4:50
I've got a program that reads data from network in a separate thread, then adds
a row to a Table using GuiScreen.runInEventThread. I'd expect that being a
separate thread it wouldn't have to wait for keyboard input to refresh, but the
new row doesn't appear until I press a key (any key). Maybe the key reading is
happening in the wrong (same) thread?
Original issue reported on code.google.com by [email protected]
on 30 Aug 2012 at 6:52
On Ubuntu 10.04, sometimes when launching the SwingTerminal, the window starts
all white and it doesn't draw anything. Seems very random, still haven't been
able to figure out to reproduce it.
Unverified on any other platform
Original issue reported on code.google.com by [email protected]
on 28 Jun 2010 at 7:32
I run into this issue and start getting exceptions in an infinite loop when I
show a table that's wider than a certain width. This happens with v2.1.1 of
lanterna. I am attaching the source file that reproduces this issue here.
However I was able to get the same code working with v2.0.3 of lanterna(with
minor API related changes ofcourse).
Generated exception
java.lang.IllegalArgumentException: TerminalSize.columns cannot be less than 0!
at com.googlecode.lanterna.terminal.TerminalSize.setColumns(TerminalSize.java:49)
at com.googlecode.lanterna.gui.TextGraphics.subAreaGraphics(TextGraphics.java:111)
at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:143)
at com.googlecode.lanterna.gui.component.Table.repaint(Table.java:147)
at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:147)
at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:147)
at com.googlecode.lanterna.gui.component.Panel.repaint(Panel.java:147)
at com.googlecode.lanterna.gui.Window.repaint(Window.java:133)
at com.googlecode.lanterna.gui.GUIScreen.repaint(GUIScreen.java:187)
at com.googlecode.lanterna.gui.GUIScreen.update(GUIScreen.java:200)
at com.googlecode.lanterna.gui.GUIScreen.doEventLoop(GUIScreen.java:235)
at com.googlecode.lanterna.gui.GUIScreen.showWindow(GUIScreen.java:307)
at com.googlecode.lanterna.gui.GUIScreen.showWindow(GUIScreen.java:263)
at TestMain.main(TestMain.java:65)
Original issue reported on code.google.com by [email protected]
on 15 Nov 2012 at 7:05
Attachments:
When using putString with a Swing Screen, the styles like Bold and Underline
don't seem to get applied -- all the text is normal. They work fine when I
swap the Swing screen for a console one.
I'm using OS X 10.7.4 in case that matters.
Original issue reported on code.google.com by [email protected]
on 7 Jul 2012 at 4:29
Creating a label and passing in null as the text will cause a
NullPointerException to be thrown. Rather, we should set the text to "null".
Affects all versions at the moment.
Original issue reported on code.google.com by [email protected]
on 21 Dec 2011 at 1:46
I dont know if it's because I've not downloaded the last branch(i still having
the 2.0.0) but in the TextArea class there aren't the:
getText(),setText(String text) and the append(String text) methods.
Is this because of the version i have?
I started fixing this adding the methods(just the getText() so far)
myself(kinda a fast,ugly and wrong work):
public String getText() { //TODO FIX THE STRING RETURN TO AN ARRAY/ARRAYLIST
String tmp="";
if(this.lines != null) {
for(int i=0;i<this.lines.size();i++) {
tmp +=" "+this.lines.get(i);
}
}
return tmp;
}
this fails obviously if the string is too long,so i suggest to DO NOT use this
solution :)
Hope i helped,somehow or gave u something to work on(I'm sorry I'm posting like
in a forum hehe) :)
Original issue reported on code.google.com by [email protected]
on 15 Jul 2012 at 1:15
The ActionListBox size seems to vary with its contents and cannot be set to a
constant. This used to work with the 2.0.x versions.
Original issue reported on code.google.com by [email protected]
on 1 Oct 2012 at 4:33
Currently we cannot trigger an action when users change the state of a checkbox
or choose a different option in a radio button group. It would be nice to have
this feature which provides more dynamic contents based on user input.
Original issue reported on code.google.com by [email protected]
on 22 Oct 2012 at 6:19
We need to investigate how well Chinese, Japanese and Korean characters work
with Lanterna. In theory it should work, but it hasn't really been tested.
Original issue reported on code.google.com by [email protected]
on 4 Jul 2012 at 8:12
Keyboard shortcuts to invoke action buttons will save a lot of tabbing and
moving around the screen to invoke a button.
Original issue reported on code.google.com by [email protected]
on 11 Jul 2012 at 5:41
Hello,i was checking out some more components and decided to test PasswordBox
class.
It has the same problem TextBox had:
public PasswordBox()
{
this(-1, "");
}
Also,since i noticed there weren't a:
public PasswordBox(String initialContent) {
this(0,initialContent);
}
or a:
public PasswordBox(int forceWidth) {
this(forceWidth,"");
}
i added them,i dont know if thats the right way to add them or if i should add
some checks or something,but it works for me :)
Hope i helped somehow.
Original issue reported on code.google.com by [email protected]
on 15 Jul 2012 at 12:33
It seems the LanterTerminal class is missing,i tried to check for the class
manually without results.
Im downloaded the lanterna-2.0.jar
http://img6.imagebanana.com/img/6qhk2ux5/GUItest1NetBeansIDE7.1.2_001.png
Original issue reported on code.google.com by [email protected]
on 10 Jul 2012 at 8:35
I have a very basic lanterna program but the text is not rendering properly on
the label.
Is this my Java settings causing this or something else? Perhaps I need to
specify something in my code. I have been able to reproduce this with different
machines and programs.
Thanks,
westforduk
Java source: http://pastebin.com/KLvd9PrP
Screenshot of error: http://i.imgur.com/umNPr.png
Original issue reported on code.google.com by [email protected]
on 30 Jul 2012 at 3:34
When using SwingTerminal, the keys send while holding ctrl down are incorrect
Original issue reported on code.google.com by [email protected]
on 16 Sep 2012 at 9:18
I see this issue with version 2.0.3. The selectedIndex in the RadioCheckBoxList
is different from checkedIndex in this case. The checkedIndex value is right.
But to retrieve the selected element I have to use getSelectedItem() which is
coming from AbstractListBox. I think the best thing is to override these
methods and return the checkedIndex when requesting the selectedItemIndex. This
way getSelectedItem() would return the item selected based on the checkedIndex.
Original issue reported on code.google.com by [email protected]
on 10 Oct 2012 at 2:57
As far as I can tell from the wiki, there are a limited set of constants to
represent the different colors. It would be good if we could have access to
full RGB colors (at least in consoles that support it). For consoles without
support, either the colors gracefully degrade to the nearest color in the
minimal set or it is up to the developer to detect the capabilities and adjust
colors accordingly.
Original issue reported on code.google.com by [email protected]
on 19 Aug 2012 at 3:53
We currently don't support the function keys F1-F12
Original issue reported on code.google.com by [email protected]
on 18 Jul 2012 at 10:53
While testing some components in a small demo-application i tried to use the
TextBox,i tried using the constructor:
TextBox(String initialContent)
that is provided in the library,but i find out it cant be used without using
the constructor:
TextBox(int forceWidth,String initialContent)
or it gives a "Exception in thread "main" java.lang.IllegalArgumentException:
TerminalSize.columns cannot be less than 0! [...]"
To temporally fix the problem i used the other constructor,the one with "int
forceWidth" specified and it seems to work.
public TextBox(String initialContent)
{
this(-1, initialContent); //this -1 seems to cause the problem
}
To fix it in a definitive way i took the lanterna sources and modified the line
(TextBox.java,line 47) and modified the -1 to 0. I hope this may help someone
:)
I still not sure it was the right solution,maybe there is something more
intelligent to do :P !
Original issue reported on code.google.com by [email protected]
on 14 Jul 2012 at 6:02
The Terminal class has a clearScreen() function which is pretty handy, but
Screens don't. Can I use screen.getTerminal().clearScreen() to clear the
screen, or is that going to mess with the screen's idea of what's dirty and
needs to be redrawn?
Original issue reported on code.google.com by [email protected]
on 9 Jul 2012 at 2:14
Hi!
I think I've found two issues with borders.
First issue: When a panel uses Border.Invisible and a title, the title overlaps
with the first row of the content.
Sample code:
Panel panel = new Panel("Panel");
panel.setBorder(new Border.Invisible());
panel.addComponent(new Label("Label 1"));
panel.addComponent(new Label("Label 2"));
panel.addComponent(new Label("Label 3"));
Result:
LaPanel
Label 2
Label 3
Expected:
Label 1
Label 2
Label 3
You could argue that the title should still be shown, but if no title is set
then it looks a little weird. My patch assumes that for an invisible border,
there is no title.
Second issue: When a panel uses Border.Standard, the innerAreaLocation and
innerAreaSize are calculated incorrectly, resulting in the contents being
pushed down by one line and the last line being truncated.
Sample code:
Panel panel = new Panel("Panel");
panel.setBorder(new Border.Standard());
panel.addComponent(new Label("Label 1"));
panel.addComponent(new Label("Label 2"));
panel.addComponent(new Label("Label 3"));
Result:
--Panel----
| |
| Label 1 |
| Label 2 |
-----------
Expected:
--Panel----
| Label 1 |
| Label 2 |
| Label 3 |
-----------
I've attached a patch that resolves these issues. It pushes the responsibility
for drawing the panel title to the Border, as the title forms part of the
window decoration rather than the contents. I felt this worked better for the
invisible border scenario, but I guess it really depends on how you want it to
work there.
I also suspect there'll be issues if a panel title exceeds the dimensions of
the Panel.
Cheers,
Chris.
Original issue reported on code.google.com by [email protected]
on 29 Apr 2012 at 9:13
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.