FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Cut/Copy/paste node question

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
Tom Wheeler
Posted via mailing list.





PostPosted: Mon Aug 11, 2008 3:40 pm    Post subject: Cut/Copy/paste node question Reply with quote

On 8/10/08, Johan <johan.grahn@kolumbus.fi> wrote:
Quote:
I enabled cut copy and paste on a "leafnode" to the node(type)
...
Quote:
The cut action also calls the createPasteType but how can I differentiate
between the cut and copy action after the method has been called? ...

Cut/copy/paste in the platform is something I find severely lacks both
thorough documentation and good examples.

Hopefully some people with a good understanding of how it works can
take a few minutes to give an explanation -- if so, I volunteer to
write the FAQ on the topic from their replies.

Until then, this might help you if you have not seen it already:

http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/doc-files/api.html#edit

--
Tom Wheeler
http://www.tomwheeler.com/
Back to top
Johan
Posted via mailing list.





PostPosted: Mon Aug 11, 2008 3:54 pm    Post subject: Cut/Copy/paste node question Reply with quote

Actually that was a new link for me, thx.

I agree, the cut/copy/paste lacks thorough documentation, I strongly believe
them to be the most important node actions with the exception of create and
destroy node.

It seems like overriding clipboardCut() could be helpful, but I'm not sure,
the documentation/examples are a bit confusing and moderate at best.

R
Johan

-----Original Message-----
From: Tom Wheeler [mailto:tomwheel@gmail.com]
Sent: 11. elokuuta 2008 18:40
To: dev@openide.netbeans.org
Subject: Re: [openide-dev] Cut/Copy/paste node question

On 8/10/08, Johan <johan.grahn@kolumbus.fi> wrote:
Quote:
I enabled cut copy and paste on a "leafnode" to the node(type)
...
Quote:
The cut action also calls the createPasteType but how can I differentiate
between the cut and copy action after the method has been called? ...

Cut/copy/paste in the platform is something I find severely lacks both
thorough documentation and good examples.

Hopefully some people with a good understanding of how it works can
take a few minutes to give an explanation -- if so, I volunteer to
write the FAQ on the topic from their replies.

Until then, this might help you if you have not seen it already:

http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/doc
-files/api.html#edit

--
Tom Wheeler
http://www.tomwheeler.com/
Back to top
Tom Wheeler
Posted via mailing list.





PostPosted: Mon Aug 11, 2008 3:57 pm    Post subject: Cut/Copy/paste node question Reply with quote

On 8/11/08, Tom Wheeler <tomwheel@gmail.com> wrote:
...
Quote:
Hopefully some people with a good understanding of how it works can
take a few minutes to give an explanation -- if so, I volunteer to
write the FAQ on the topic from their replies.

I was so hopeful that I started a FAQ topic already; please feel free
to update it based on what you learn:

http://wiki.netbeans.org/DevFaqCutCopyPaste

Also note that I linked to a section from NetBeans: The Definitive
Guide which explains cut/copy/paste in some detail.

--
Tom Wheeler
http://www.tomwheeler.com/
Back to top
Johan
Posted via mailing list.





PostPosted: Mon Aug 11, 2008 9:24 pm    Post subject: Cut/Copy/paste node question Reply with quote

Got it to work, I just needed to override clipBoardCut() on the node I
wanted the cut action on.

I will put together an extremely simplified example with copy/cut/paste and
drag&drop on nodes, I'm not much for writing tutorials but if I make short
sample app and add it to the wiki it might be of some help in the future...

Johan

-----Original Message-----
From: Tom Wheeler [mailto:tomwheel@gmail.com]
Sent: 11. elokuuta 2008 18:57
To: dev@openide.netbeans.org
Subject: Re: [openide-dev] Cut/Copy/paste node question

On 8/11/08, Tom Wheeler <tomwheel@gmail.com> wrote:
...
Quote:
Hopefully some people with a good understanding of how it works can
take a few minutes to give an explanation -- if so, I volunteer to
write the FAQ on the topic from their replies.

I was so hopeful that I started a FAQ topic already; please feel free
to update it based on what you learn:

http://wiki.netbeans.org/DevFaqCutCopyPaste

Also note that I linked to a section from NetBeans: The Definitive
Guide which explains cut/copy/paste in some detail.

--
Tom Wheeler
http://www.tomwheeler.com/
Back to top
Tom Wheeler
Posted via mailing list.





PostPosted: Mon Aug 11, 2008 10:16 pm    Post subject: Cut/Copy/paste node question Reply with quote

On 8/11/08, Johan <johan.grahn@kolumbus.fi> wrote:
Quote:
Got it to work, I just needed to override clipBoardCut() on the node I
wanted the cut action on.

I will put together an extremely simplified example with copy/cut/paste and
drag&drop on nodes, I'm not much for writing tutorials but if I make short
sample app and add it to the wiki it might be of some help in the future...

Fantastic! Feel free to update the FAQ entry I set up. Or if you'd
rather send everything to me, I will add it to the FAQ for you...
Just don't be shy about writing something, though, because whatever
you write will be helpful.

--
Tom Wheeler
http://www.tomwheeler.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB