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:

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()'.

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

User avatar
Posts: 5
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.

Project Member
Posts: 2581
Joined: Wed Sep 16, 2009 10:05 am

Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests