Hi Peppe,
Good UI design is probably one of the most difficult task.
As I'm not an expert, I just give you some hints to start.
If all you want is to change the font size, then you probably have to
change the font size of your buttons ;o)
Your buttons are created line 136 of FormulaEditingPanel:
button = new JButton();
and JButton inherit a setFont method from JComponent
If you just want to change size of the currentFont, something like
button.setFont(button.getFont().deriveFont(float)) should do the trick
Not sure if it's enough to change the default size of the button.
Default size is also known as preferredSize, and all components derived from
JComponent have a setPreferredSize method along with a setMaximumSize
and setMinimumSize
The third thing is layout. If you add buttons, you may have to change
how your buttons are layed out.
Line 132, you can see that the buttons container uses a GridLayout.
Number of columns is computed in order to have two rows of buttons
You may want to change that.
Hope that helps
Michaël
Le 13/12/2011 21:14, Giuseppe Aruta a écrit :
Hi all developers
I started to work on OJ source to add some improvements I did on my
"Frankstain" Openjump Jufre (thank Michael that takes care to my
mistakes or things I forgot on OJ repository)
One of this improvements was connected to Pirol Calculator. I have
already done the 1st step: I added some classes to OJ trunk repository
that will give new math functions to Pirol Calculator (some
trigonometric ones. conversions between radians and degrees,
logarithmic, etc). I am going to do the second step: rework Pirol
calculator so that it shows those new functions (Pirol calculator is
very easy to customize, developers did a good job).
Before doing those modifications I would like other developers'
opinions (expecially Stefan's one who probabily gave a look to Oj
Jufre 0.4 calculator).
One developing problem that I have to face is the dimension of the
buttons (!). I want to reduce them. Until Pirol calculator has few
functions big buttons make sence. But if add these new functions
(trigonometric, rad to deg, log, log10), Pirol Calculator window
becomes very big (that's the problem of modified Pirol calculator in
OJ Jufre 0.4). How can I reduce these dimensions? Which is the class
that controls these dimensions?
regards and thanks for the help
Peppe
--
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and
improve service delivery. Take 5 minutes to use this Systems Optimization
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
--
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and
improve service delivery. Take 5 minutes to use this Systems Optimization
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel