Posted by
Sinan Yordem on
Oct 31, 2007; 3:06pm
URL: http://imagej.273.s1.nabble.com/imageJ-front-panel-fonts-size-tp3697649p3697659.html
Dear All,
Is there a way to get automated live imaging and simultaneous analysis with
ImageJ?
Thanks,
Sinan Yordem
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Nicola
B.
Sent: Wednesday, October 31, 2007 10:02 AM
To:
[hidden email]
Subject: Re: imageJ front panel fonts size
Thanks, it work great!!
A last thing..
Does someone know any method to avoid run plugin every time by hand, and
automate process when imageJ is lunched (as parameters I need
"MenuFontSize=15" and "noBold") ?
Thanks,
Nicola
Plugin is make by Dscho..
Gabriel Landini ha scritto:
>> I have hight screen resolution (1920x1200) and ImageJ-fonts results very
>> small.
>> Exist any possibilities to make them bigger? (maybe in some way changing
>> the script)
>>
>
> We discussed this some time ago. I also have that screen size and it is
almost
> unreadable...
> I use the plugin below, run from the startupmacros.txt file.
> I cannot remember who wrote it... (Dscho? Wayne? Albert? if somebody
knows,
> please let me know).
>
> Mind the line breaks:
>
>
> //----------------------
> import ij.IJ;
> import ij.ImageJ;
> import ij.Menus;
> import ij.gui.GenericDialog;
> import ij.plugin.PlugIn;
> import java.awt.Font;
> import java.awt.Menu;
> import java.awt.MenuBar;
>
> public class Menu_Font implements ij.plugin.PlugIn {
> public void run(String arg) {
> GenericDialog gd = new GenericDialog("New Menu Font
Size");
> gd.addNumericField("menuFontSize", 16, 0);
> gd.addCheckbox("Bold", true);
>
> gd.showDialog();
> if (gd.wasCanceled())
> return;
>
> int size = (int)gd.getNextNumber();
> String bold="";
> if (gd.getNextBoolean())
> bold="bold-";
>
> MenuBar menuBar = Menus.getMenuBar();
> Font font = menuBar.getFont();
> int oldSize = font.getSize();
>
> // this does not work, because default is "fixed"
> //menuBar.setFont(font.deriveFont(size));
> menuBar.setFont(Font.decode("sansserif-"+bold + size));
>
> // work around AWT not recalculating the menu bar size
> int i, count = menuBar.getMenuCount();
> Menu[] menus = new Menu[count];
> for (i = 0; i < count; i++) {
> menus[i] = menuBar.getMenu(0);
> menuBar.remove(menus[i]);
> }
> for (i = 0; i < count; i++)
> menuBar.add(menus[i]);
> ImageJ ij = IJ.getInstance();
> ij.pack();
> ij.setSize(new java.awt.Dimension(ij.getWidth() *size /
> oldSize, ij.getHeight()));
> }
> }
>
> //----------------------
>
>