OK button actionlistener for plugins

Discuss issues related to PS3 Media Server development (only for programmers)

OK button actionlistener for plugins

Postby jpgview » Wed Jul 23, 2014 8:59 am

when a plugin is registered by PMS, a new 'plugin' appears in 'General Configuration' / 'Plugins'
this is (assumption) the result of addplugins (https://github.com/ps3mediaserver/ps3me ... alTab.java)

as you click on the 'plugin', a JPanel appears
I assume that, for example (no offence intended), PMSEncoder, has added no code to 'JComponent config()', thus showing the pms content only.
I have added 'JPanel myPanel = new JPanel(new GridBagLayout());' and some 'JCheckBox'es.
since I don't want to add an actionListener for every 'Jcheckbox' i've added, finally the question:

<question>
how do i add (also keep the original actions) actions to the actionlistener, associated with the 'OK' button, e.g. 'get the settings' of the components added to 'JComponent config()'.
</question>

a code example would be nice, new to JAVA...

tx
User avatar
jpgview
 
Posts: 4
Joined: Sun Jul 13, 2014 8:07 pm

Re: OK button actionlistener for plugins

Postby chocolateboy » Sun Aug 03, 2014 1:02 am

jpgview wrote:a code example would be nice, new to JAVA...


Take a look at the exisiting plugins. If you're not sure where to start, try PMS-EDL (e.g.):

chocolateboy wrote:PMS-EDL is a plugin that provides support for MEncoder edit decision lists (EDLs) in PMS. In addition, developers may find it useful as a sample/example "Hello, world!"-style plugin.


viewtopic.php?f=12&t=11286&p=52314#p52314
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am


Return to Developers

Who is online

Users browsing this forum: Google [Bot] and 1 guest