From: Toby D. <tj...@sf...> - 2005-06-01 00:29:49
|
Sounds great. Interestingly, I can=B9t quite get this to work on my Linux computer. The men= u and context menu don=B9t appear at all. On Mac OS X, the menu appears to work= , but not the context menu (although this might be a quirk of the single-button mouse-pad I am using at the moment). By default, I think the context menu should always be enabled. Toby On 5/31/05 4:11 PM, "Daryl Van Humbeck" <dva...@sf...> wrote: > I've added a main menubar, a context menu and added a kind of hack to > TheMatrix. >=20 > The "hack" I added to TheMatrix is a method called superPaint(Graphics g)= that > just calls super.paint(g) so I don't have to compensate for TheMatrix's > paint() method not calling super.paint(). >=20 > The main menubar and the context menu have buttons with the same labels a= nd > actions as the default buttons (save, load & close). >=20 > Daryl. >=20 > Toby Donaldson wrote: >> Re: [csjava-developer] TheButtonMatrix comments For now, the menus shou= ld >> just be an option for displaying the load/save/close buttons. Since no o= ne >> seems to need to the ability to add extra buttons, don=B9t worry about it = for >> now. If it=B9s easy to arrange the code in a way so that in the future add= ing >> extra buttons is easy, then that=B9s a bonus; but don=B9t do it if makes the >> implementation too complex or hard to understand. Simplicity is more >> important than flexibility or completeness, for now. >> =20 >> Toby >> =20 >> =20 >> On 5/26/05 9:15 AM, "Daryl Van Humbeck" <dva...@sf...> >> <mailto:dva...@sf...> wrote: >> =20 >> =20 >>> Ok, I found out what I was doing wrong. >>> =20 >>> I was calling _refit() which resizes the window to the image's size the= n >>> centers the window, when I should have been calling center() which just >>> centers the window. >>> I fixed that and that solved the overlap problem. >>> =20 >>> Though I'm still a little uncertain about how to implement the menu. >>> Should I let the user add things to it? >>> Should I let the user have the option of implementing the things with >>> buttons or menu items? >>> Maybe just have the default (load, save & close) as menu items and the >>> user-added stuff as buttons? >>> I'm not sure. >>> =20 >>> I've added a debug line drawing option to the ImagePainter component so= you >>> can check to make sure the whole image is being displayed. >>> Just call .enableDebugLines(true) on TheButtonMatrix object to enable t= hem. >>> =20 >>> Daryl. >>> =20 >>> Toby Donaldson wrote: >>> =20 >>>> =20 >>>> Hi Daryl, >>>> =20 >>>> Actually, I've check it in Windows XP, Linux, and Mac OS X (i.e. Unix)= , and >>>> they each show framing problems. I don't always check them on all thre= e, >>>> but >>>> in this case I did. >>>> =20 >>>> Even the most recent versions show the same sort of problem. When I ru= n the >>>> test1(), test2(), test3() methods of the ButtonTest class, there is st= ill >>>> overlap at the bottom of the image. >>>> =20 >>>> Toby >>>> =20 >>>> =20 >>>> On 5/20/05 10:23 AM, "Daryl Van Humbeck" <dva...@sf...> >>>> <mailto:dva...@sf...> <mailto:dva...@sf...> wrote: >>>> =20 >>>> =20 >>>> =20 >>>> =20 >>>>> =20 >>>>> Unfortunately, I didn't see what you saw. >>>>> =20 >>>>> Another problem I have is I only have one platform to test things on >>>>> (Windows 98SE), whereas you're probably using Windows XP. >>>>> =20 >>>>> So, I've looked at my code and tried to figure out what might cause t= he >>>>> problems you mention, and discovered that I'm not packing the window = and >>>>> then refitting it. >>>>> I added that code and think it solves some problems. >>>>> =20 >>>>> I haven't done anything about the ragged buttons yet, but I'll get to >>>>> that soon. Maybe I can use a different Layout manager... >>>>> =20 >>>>> Please update and test again and see if that solves those problems. >>>>> =20 >>>>> I do agree that the buttons take up space and a menu would probably d= o >>>>> better. >>>>> Maybe some sort of system that lets the user choose from a variety of >>>>> different methods of displaying a bunch of actions? >>>>> i.e., some buttons, some menu items, some property (right-click) menu >>>>> items, etc. >>>>> =20 >>>>> Just some thoughts. >>>>> =20 >>>>> Daryl. >>>>> =20 >>>>> Toby Donaldson wrote: >>>>> =20 >>>>> =20 >>>>> =20 >>>>> =20 >>>>>> =20 >>>>>> Daryl, >>>>>> =20 >>>>>> I've been looking at TheButtonMatrix, and I think it's nearly read t= o >>>>>> add to TheMatrix. An essential fix is needed, though: >>>>>> =20 >>>>>> - The image is not correctly set in the frame. The bottom of the fra= me >>>>>> is too low, and so a gray line is visible. Also, the right side of t= he >>>>>> entire image is apparently covered by the button panel. The image mu= st >>>>>> appear precisely in the frame, with no excess space or overlapping. >>>>>> =20 >>>>>> In addition, there are some possible improvements that would probabl= y >>>>>> make it better, although we can live without them: >>>>>> =20 >>>>>> - The button panel background is big, gray, and unappealing. Can it = be >>>>>> white instead? Can a method to set the button panel background be ad= ded? >>>>>> - When the button panel is put on the left side of the image, the >>>>>> right edge of the buttons is ragged because the buttons are not the >>>>>> same width. This looks messy and should be fixed, i.e. the buttons >>>>>> should be made the same width. >>>>>> - After seeing the button panels, I think a menu bar with a menu >>>>>> containing the save/load/close features would probably look nicer. F= or >>>>>> beginners, having the buttons right on the screen where they can see >>>>>> them is good, because then they don't need to hunt around or guess >>>>>> what features are available. But there is so much unused space, that >>>>>> after a while I suspect many users will find that to be a bit of an >>>>>> eyesore. So a menu bar might be the nicest way to deal with this. >>>>>> - And speaking of the menu bar, another possibility is to use a >>>>>> mouse-click menu, e.g. when the user, say, right-clicks on the image= , >>>>>> a menu with the save/load/close options would pop up. For frequent >>>>>> users of TheMatrix, this might be popular. >>>>>> =20 >>>>>> I added the file ButtonTest into your developer package on CVS with = a >>>>>> few more test rungs, including a few comments. I also add the method >>>>>> "enableAllButtons" to TheButtonMatrix. >>>>>> =20 >>>>>> Toby >>>>>> =20 >>>>>> =20 >>>>>> ------------------------------------------------------- >>>>>> This SF.Net email is sponsored by Oracle Space Sweepstakes >>>>>> Want to be the first software developer in space? >>>>>> Enter now for the Oracle Space Sweepstakes! >>>>>> http://ads.osdn.com/?ad_id=3D7412&alloc_id=3D16344&op=3Dclick >>>>>> <http://ads.osdn.com/?ad_id=3D7412&alloc_id=3D16344&op=3Dclick> >>>>>> _______________________________________________ >>>>>> csjava-developer mailing list >>>>>> csj...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/csjava-developer >>>>>> =20 >>>>>> =20 >>>>>> =20 >>>>>> =20 >>>>>> =20 >>>>>> =20 >>>>> =20 >>>>> =20 >>>>> =20 >>>>> =20 >>>>> =20 >>>> =20 >>>> =20 >>>> =20 >>>> =20 >>> =20 >>> =20 >>> =20 >>>=20 >>> No virus found in this outgoing message. >>> Checked by AVG Anti-Virus. >>> Version: 7.0.322 / Virus Database: 266.11.17 - Release Date: 25/05/05 >>> =20 >> =20 >> =20 >> --=20 >> Dr. Toby Donaldson >> School of Computing Science >> Simon Fraser University >> =20 >>=20 >>=20 >>=20 >> No virus found in this incoming message. >> Checked by AVG Anti-Virus. >> Version: 7.0.322 / Virus Database: 266.11.17 - Release Date: 25/05/05 >> =20 >=20 >=20 >=20 > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.322 / Virus Database: 267.3.3 - Release Date: 31/05/05 --=20 Dr. Toby Donaldson School of Computing Science Simon Fraser University |