(mostly nonfunctional) GUI changes
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
(mostly nonfunctional) GUI changes
by silly freak » 01 Aug 2009, 15:11
it's really not much:
-changed show() in Display to setVisible(boolean), so that no deprecated code is used
-changed the sizing code in the GuiDisplays to use the full screen (setExtendedState)
-reworked the downloading GUI. It now uses a progress bar, and is a little shorter
-changed show() in Display to setVisible(boolean), so that no deprecated code is used
-changed the sizing code in the GuiDisplays to use the full screen (setExtendedState)
-reworked the downloading GUI. It now uses a progress bar, and is a little shorter
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: (mostly nonfunctional) GUI changes
by mtgrares » 01 Aug 2009, 15:24
Thanks.
I had to name the method in Display that showed things on the screen so I named it show() but if an object extends JFrame and implements Display the compiler will incorrectly say that you are using a depreciated method, which you aren't. The old show() method in GuiDisplay2 and GuiDisplay3 will have to be updated unless I'm wrong.-changed show() in Display to setVisible(boolean), so that no deprecated code is used
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: (mostly nonfunctional) GUI changes
by Rob Cashwalker » 01 Aug 2009, 15:31
A rare Saturday appearance for rares....
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: (mostly nonfunctional) GUI changes
by mtgrares » 03 Aug 2009, 19:41
Yeah, I keep a pretty regular schedule, . I love the Monday night show The Big Bang Theory, I'm afraid I'm half Sheldon and half Leonard.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: (mostly nonfunctional) GUI changes
by silly freak » 09 Aug 2009, 10:24
little update:
I added a standardized error reporting feature in the class ErrorViewer, which can save an error message to a file, including the stack trace.
I included it everywhere where it seemed meaningful - in existing catch blocks with explicit JOptionPane code, or just printStackTrace calls.
It's not included, for example, in the mana code, where a NumberFormatException is raised, intended to differentiate between colored and colorless mana.
the rar contains also all of my old changes, but it doesn't include the quick fix changes. I wouldn't mind to adapt them too if you point me to the source code
I added a standardized error reporting feature in the class ErrorViewer, which can save an error message to a file, including the stack trace.
I included it everywhere where it seemed meaningful - in existing catch blocks with explicit JOptionPane code, or just printStackTrace calls.
It's not included, for example, in the mana code, where a NumberFormatException is raised, intended to differentiate between colored and colorless mana.
the rar contains also all of my old changes, but it doesn't include the quick fix changes. I wouldn't mind to adapt them too if you point me to the source code
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: (mostly nonfunctional) GUI changes
by DennisBergkamp » 11 Aug 2009, 15:00
Thanks for these, silly freak No worries, I'm just merging your changes right now.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: (mostly nonfunctional) GUI changes
by DennisBergkamp » 11 Aug 2009, 15:51
After merging these changes, I'm getting two errors:
in Gui_NewGame, line 553:
in ErrorViewer.java, line 90 :
Help!
in Gui_NewGame, line 553:
- Code: Select all
AllZone.Display.show();
in ErrorViewer.java, line 90 :
- Code: Select all
public void actionPerformed(ActionEvent e) {
Help!
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: (mostly nonfunctional) GUI changes
by silly freak » 11 Aug 2009, 17:18
show() is replaced with setVisible(boolean) in my version, all classes using it are changed accordingly (that's the main reason why there are so many changed classes )
for ErrorViewer, i think this must be a missing import, though i don't get any errors. The @Override fails as long as the parameter classes aren't imported.
I hope this fixes the errors
for ErrorViewer, i think this must be a missing import, though i don't get any errors. The @Override fails as long as the parameter classes aren't imported.
I hope this fixes the errors
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: (mostly nonfunctional) GUI changes
by mtgrares » 11 Aug 2009, 17:41
That sounds very good. Feel free to setup some sort of source code control like CVS or SVN. I know that manually making changes is very hard.I added a standardized error reporting feature in the class ErrorViewer, which can save an error message to a file, including the stack trace.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: (mostly nonfunctional) GUI changes
by DennisBergkamp » 11 Aug 2009, 18:24
Oops, it seems I completely forgot to merge your changes in Gui_NewGame Either that, or I forgot to save the file.show() is replaced with setVisible(boolean) in my version, all classes using it are changed accordingly (that's the main reason why there are so many changed classes )
for ErrorViewer, i think this must be a missing import, though i don't get any errors. The @Override fails as long as the parameter classes aren't imported.
I hope this fixes the errors
But I'm still getting the @Override error in ErrorViewer.java... I just removed it for now, to prevent my eclipse from complaining.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: (mostly nonfunctional) GUI changes
by DennisBergkamp » 11 Aug 2009, 18:56
There's a few other things I've noticed:
- A lot of errors apparently get generated during my test matches, when getConvertedManaCost is called on manacosts that contain characters (try catch block with parseInt(cost) is called everytime). Anyway, it's always done this but the error was just never shown I've fixed this with a regular expression in CardUtil, it shouldn't try the parseInt anymore if there's a character in the manacost.
I do like the error viewer though, this should really help in the future and errors can just be saved + uploaded
- The look and feel of the GUI has changed ? I'm not sure I like the changes... is there a way to use the previous look?
- I still had quite a few pictures to download (Chris had sent me a bunch which I hadn't downloaded yet), but I'm not seeing a progress bar as I'm downloading them...
- A lot of errors apparently get generated during my test matches, when getConvertedManaCost is called on manacosts that contain characters (try catch block with parseInt(cost) is called everytime). Anyway, it's always done this but the error was just never shown I've fixed this with a regular expression in CardUtil, it shouldn't try the parseInt anymore if there's a character in the manacost.
I do like the error viewer though, this should really help in the future and errors can just be saved + uploaded
- The look and feel of the GUI has changed ? I'm not sure I like the changes... is there a way to use the previous look?
- I still had quite a few pictures to download (Chris had sent me a bunch which I hadn't downloaded yet), but I'm not seeing a progress bar as I'm downloading them...
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: (mostly nonfunctional) GUI changes
by silly freak » 11 Aug 2009, 20:02
Sorry, i have overseen that. The catch block below was commented that it is acceptable for an exception to be thrown, and so I have thought i'm on the save side. well, so goes life.DennisBergkamp wrote:- A lot of errors apparently get generated during my test matches, when getConvertedManaCost is called on manacosts that contain characters (try catch block with parseInt(cost) is called everytime). Anyway, it's always done this but the error was just never shown I've fixed this with a regular expression in CardUtil, it shouldn't try the parseInt anymore if there's a character in the manacost.
I do like the error viewer though, this should really help in the future and errors can just be saved + uploaded
that was a very stupid mistake of mine. it'sDennisBergkamp wrote:- The look and feel of the GUI has changed ? I'm not sure I like the changes... is there a way to use the previous look?
Gui_NewGame, line 85
- Code: Select all
old: UIManager.put(properties, background);
new: UIManager.put(properties[i], background);
i can't explain that... for me, it looks like this:DennisBergkamp wrote:- I still had quite a few pictures to download (Chris had sent me a bunch which I hadn't downloaded yet), but I'm not seeing a progress bar as I'm downloading them...
Download.png
is it just the progress bar, or the whole window?
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: (mostly nonfunctional) GUI changes
by DennisBergkamp » 11 Aug 2009, 21:54
Silly Freak,
That progress bar looks awesome!!!! No, for me it just looks like the regular window. I might have missed another thing from your merge
Anyway, I'm flying back to the US tomorrow, I'll play around with this while I'm on the plane.
That progress bar looks awesome!!!! No, for me it just looks like the regular window. I might have missed another thing from your merge
Anyway, I'm flying back to the US tomorrow, I'll play around with this while I'm on the plane.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: (mostly nonfunctional) GUI changes
by silly freak » 12 Aug 2009, 16:46
i have an idea...
Gui_DownloadPictures has a main method in my version. it should work relatively independent from the rest of the application, so at least that should work. otherwise there is something very weird going on...
Gui_DownloadPictures has a main method in my version. it should work relatively independent from the rest of the application, so at least that should work. otherwise there is something very weird going on...
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: (mostly nonfunctional) GUI changes
by DennisBergkamp » 13 Aug 2009, 15:04
Ah, yes I messed up. It works now! Looks awesome, great great job silly freak
I did also have to remove some of the @Override in that file though to shut up my Eclipse, but at least it's working now
I did also have to remove some of the @Override in that file though to shut up my Eclipse, but at least it's working now
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
15 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 96 guests