RPTools.net

Discussion and Support

Skip to content

It is currently Thu Dec 14, 2017 12:13 pm 






Reply to topic  [ 36 posts ]  Go to page 1, 2, 3  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Demigod
 
Joined: Mon Jun 29, 2009 9:37 am
Posts: 3108
Location: Germany
 Post subject: Working on tokenTool
PostPosted: Wed Nov 10, 2010 7:05 am 
Hiho,

I'm working currently on two tokenTool features.

- incremental numbering for the file name (used by drag&drop)
- paste image from clipboard

Most if it already works fine, i have to invest more time in finetuning though. But before I do so ... has such a patch have any chance to be applied? Who has to be contacted?

_________________
HELP: GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC.

most complete list of my maptool stuff


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5412
 Post subject: Re: Working on tokenTool
PostPosted: Wed Nov 10, 2010 8:15 am 
CoveredInFish wrote:
Hiho,

I'm working currently on two tokenTool features.

- incremental numbering for the file name (used by drag&drop)
- paste image from clipboard

Most if it already works fine, i have to invest more time in finetuning though. But before I do so ... has such a patch have any chance to be applied? Who has to be contacted?


Azhrei, and I don't see any reason why not.

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: Working on tokenTool
PostPosted: Wed Nov 10, 2010 3:30 pm 
Those both sound like useful features, so yeah, I'd be willing to look at yoru patches.

One thing that has always bothered me about TT is how long it takes to start up?! :? I don't know what it's doing (that would be my first step) but on my Mac it takes about 20 seconds before the window opens. I can understand that with MT because I know of all the background stuff going on, but TT doesn't have any background stuff (that I know of)...


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Mon Jun 29, 2009 9:37 am
Posts: 3108
Location: Germany
 Post subject: Re: Working on tokenTool
PostPosted: Wed Nov 10, 2010 4:11 pm 
Azhrei wrote:
One thing that has always bothered me about TT is how long it takes to start up?! :?


I'm afraid I'm the wrong guy to hunt that down. I'm really pretty new to java and swing and stuff...

_________________
HELP: GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC.

most complete list of my maptool stuff


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: Working on tokenTool
PostPosted: Wed Nov 10, 2010 5:23 pm 
Yeah, no problem. I was just mentioning it in case you were in there looking around and noticed something...


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Fri Jan 05, 2007 7:53 pm
Posts: 178
Location: Wgtn, New Zealand
 Post subject: Re: Working on tokenTool
PostPosted: Thu Nov 11, 2010 2:55 pm 
CoveredInFish wrote:
Hiho,

I'm working currently on two tokenTool features.

- incremental numbering for the file name (used by drag&drop)
- paste image from clipboard

Most if it already works fine, i have to invest more time in finetuning though. But before I do so ... has such a patch have any chance to be applied? Who has to be contacted?


If you were not CoveredInFish. Id almost consider hugging you!

I look "super foward" to these updates!

_________________
---
Glock-9mm (Wgtn, NZ)
Shooting from the hip... Never the lip!


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Working on tokenTool
PostPosted: Fri Nov 12, 2010 10:58 am 
I'm guessing the startup slowness is for loading all of the token borders since they would be displayed immediately in the dropdown list.


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Mon Jun 29, 2009 9:37 am
Posts: 3108
Location: Germany
 Post subject: Re: Working on tokenTool
PostPosted: Fri Nov 12, 2010 6:47 pm 
Okay, here is the patch.

New features:

- user can select to either name the dragged file ".token.drag" or "<fileNamePrefix>_<fileNumber>" with file number incrementing by 1 each *DRAG* action. Note that if you cancel a drag-drop the file number still does get increased - i dont think you can check if the drop-action actually succeeded or not?!

- user can paste an image (like a win-screenshot made with PRINT key) from clipboard to tokentool)

- user can copy token-image to clipboard. (I think the transpareny gets lost with this but I dont see exactly why or have experience to handle it)


tokentool_patch_cif_v1.txt [53.56 KiB]
Downloaded 85 times

_________________
HELP: GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC.

most complete list of my maptool stuff
Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: Working on tokenTool
PostPosted: Fri Nov 12, 2010 8:25 pm 
CoveredInFish wrote:
- user can select to either name the dragged file ".token.drag" or "<fileNamePrefix>_<fileNumber>" with file number incrementing by 1 each *DRAG* action. Note that if you cancel a drag-drop the file number still does get increased - i dont think you can check if the drop-action actually succeeded or not?!

Yes, you can.

Check the TransferableHelper code that is part of MapTool. In particular, the importData() method, IIRC.

Quote:
- user can paste an image (like a win-screenshot made with PRINT key) from clipboard to tokentool)

This will be very handy. :)

Quote:
- user can copy token-image to clipboard. (I think the transpareny gets lost with this but I dont see exactly why or have experience to handle it)

This might be because the clipboard supports JPEG and not PNG? It may work on a Unix system but someone will need to test that.

I'll try applying your patch some time over the weekend and playing with it.

@Jay: Thanks for the hint. If I get time I'll take a look at it. That's something that could be deferred to a separate thread as long as the first one is loaded synchronously (so it appears correctly in the dropdown list).

Hm, what happens if the data model for the dropdown list were to use file: URLs? Then Swing would ask for the images and they could be loaded as-needed. In the meantime a separate thread could be loading them. If the ImageIO cache were turned on that should work out...


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Mon Jun 29, 2009 9:37 am
Posts: 3108
Location: Germany
 Post subject: Re: Working on tokenTool
PostPosted: Sat Nov 13, 2010 4:50 am 
Azhrei wrote:
Yes, you can.

Hah! Ineed I can. In fact all i had to do was using DragSourceDropEvent and its getDropSuccess() method. So easy if you know where to look. :-D

Anyway, now the counting works even better, increasing only on successful drops.

New patch attached..

PS: i just realized that I executed a Source->CleanUp on the token tool source so the patch contains some classes I didnt changed manually. Hope this is a robust feature not causing trouble ..


tokentool_patch_cif_v2.txt [53.97 KiB]
Downloaded 138 times

_________________
HELP: GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC.

most complete list of my maptool stuff
Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Mon Jun 29, 2009 9:37 am
Posts: 3108
Location: Germany
 Post subject: Re: Working on tokenTool
PostPosted: Sat Nov 13, 2010 7:52 am 
jay wrote:
...the startup slowness is for loading all of the token borders ...

This would be OverListModel.refresh()
Its called on startup and when you end the "manage overlays" dialog.

It takes roughly 2 .. 2.5 sec on my machine with some custom overlays.

_________________
HELP: GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC.

most complete list of my maptool stuff


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Working on tokenTool
PostPosted: Sat Nov 13, 2010 12:54 pm 
Azhrei wrote:
@Jay: Thanks for the hint. If I get time I'll take a look at it. That's something that could be deferred to a separate thread as long as the first one is loaded synchronously (so it appears correctly in the dropdown list).

Hm, what happens if the data model for the dropdown list were to use file: URLs? Then Swing would ask for the images and they could be loaded as-needed. In the meantime a separate thread could be loading them. If the ImageIO cache were turned on that should work out...
I updated TokenTool to load this code in the background. It's checked in if you would like to try it. It was written to rplib b87, so that is where some of those changes came from. The code needs some better error handling, but otherwise should be OK. Not sure how much faster it got :? You need to have rplib checked out since I made the TT project rely on it instead of the checked in lib.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12103
Location: Tampa, FL
 Post subject: Re: Working on tokenTool
PostPosted: Sat Nov 13, 2010 3:07 pm 
jay wrote:
I updated TokenTool to load this code in the background. It's checked in if you would like to try it. It was written to rplib b87, so that is where some of those changes came from.

Okay, cool. Thanks, jay. :)

@CiF: You'll probably need to generate a new patch for me. Since Jay has checked in updated code your patch (which changes a lot of files) likely won't apply cleanly (although I haven't tried, to be honest :(). When you generate the patch, you can uncheck all of the class files that you didn't modify to make your change. Then generate the patch. Now you can resynchronize from SVN and apply your newly created patch back to that project. Resynchronizing with SVN will give you exactly the same setup as what I'm going to have, so if your patch reapplies and works then I know it will with mine too. :)

Quote:
The code needs some better error handling, but otherwise should be OK. Not sure how much faster it got :? You need to have rplib checked out since I made the TT project rely on it instead of the checked in lib.

Hm. I think it was more than just 2 seconds (like about 5-6) but it could have something to do with it being a Web Start app. I don't start timing it until the icon shows up in the Mac's docking bar though, which means the check for newer network resources has already been accomplished. I'm obviously going to need to profile it, I think.

Thanks again, Jay. I'll take a look tomorrow as today is going to be pretty busy.


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Working on tokenTool
PostPosted: Sat Nov 13, 2010 3:49 pm 
I only checked in 3, so it shouldn't be too bad (OverlayListModel, OverlayPanelModel & TokenCompositionPanel) You also now need to checkout the latest rplib into Eclipse, I made the TT project rely on it.


Top
 Profile  
 
User avatar  Offline
Demigod
 
Joined: Mon Jun 29, 2009 9:37 am
Posts: 3108
Location: Germany
 Post subject: Re: Working on tokenTool
PostPosted: Sat Nov 13, 2010 5:37 pm 
Azhrei wrote:
You'll probably need to generate a new patch for me.


No problem, I'll do that. Not sure I find time to do so on sunday ..

_________________
HELP: GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC.

most complete list of my maptool stuff


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 36 posts ]  Go to page 1, 2, 3  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman