Home » Jalbum forums » Skins, Plugins, and Tools » General development

This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 7 - Pages: 1 - Last Post: 16-Sep-2009 04:13 Last Post By: ctwist Threads: [ Previous | Next ]
TomCee

Posts: 1,034
Registered: 07/11/05
custom gui builders: expand your window !
Posted: 14-Sep-2009 23:04
 
  Click to reply to this thread Reply
Sometimes there's not enough room in the custom_UI to place all your image bound variables, here's a way to expand it!

Inluded in the example skin is also a java file for the custom ui, you can put it to use by changing:

CustomUI customUI = new CustomUI(context);

to

CustomUI2 customUI=new CustomUI2(context);

in onload.bsh.

It then will load the .java file.

And David: thanks again for the great custom_UI interface, it's a joy to work with!!
davidekholm

Posts: 12,555
Registered: 10/18/02
Re: custom gui builders: expand your window !
Posted: 14-Sep-2009 23:16   in response to: TomCee in response to: TomCee
 
  Click to reply to this thread Reply
Thanks for those words and for going bananaz with Java! :-)
TomCee

Posts: 1,034
Registered: 07/11/05
Re: custom gui builders: expand your window !
Posted: 14-Sep-2009 23:19   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
yes, 'java' : next to sex the best thing..... hahahaha!
TomCee

Posts: 1,034
Registered: 07/11/05
Re: custom gui builders: expand your window !
Posted: 14-Sep-2009 23:29   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
btw, I can't get compiled classes get to wotk with the custom UI, it complains:

Details:
Sourced file: inline evaluation of: ``/** * This script is being run when a skin is selected * The script installs . . . '' : Typed variable declaration : Constructor error: We don't have permission to create an instance.Use setAccessibility(true) to enable access.

My side or yours??
davidekholm

Posts: 12,555
Registered: 10/18/02
Re: custom gui builders: expand your window !
Posted: 14-Sep-2009 23:34   in response to: TomCee in response to: TomCee
 
  Click to reply to this thread Reply
When declaring your class, add the "public" keyword, like this:
public class CustomUI2 extends JCustomPanel {
TomCee

Posts: 1,034
Registered: 07/11/05
Re: custom gui builders: expand your window !
Posted: 14-Sep-2009 23:40   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
ahh, thanks!! I thought when left out, it defaults to public!
davidekholm

Posts: 12,555
Registered: 10/18/02
Re: custom gui builders: expand your window !
Posted: 15-Sep-2009 11:47   in response to: TomCee in response to: TomCee
 
  Click to reply to this thread Reply
Nope. Default is "package private". In BeanShell there is however a trick that gives you access to any class, field or method no matter the privacy setting, and that is the setAccessibility(true); call. In this case, it's better to make the class public though.
ctwist

Posts: 538
Registered: 09/27/03
Re: custom gui builders: expand your window !
Posted: 16-Sep-2009 04:13   in response to: TomCee in response to: TomCee
 
  Click to reply to this thread Reply
A few months ago, I had problems with setPreferredSize(), because this is just a suggestion, and Java may choose to ignore this, depending on other layout components. Instead, I now use setMinimumSize(), which is a stronger statement.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums