From: Colin S. <col...@ex...> - 2001-08-02 21:50:35
|
I am trying to use jEdit on a new lcd monitor which I have to use at the (Windows) resolution of 1280x1024. I find that the default font sizes that jEdit comes up with (for things like menus, text in the various plugins, etc.) are way to small for day to day use. Is there _any_ way to set font sizes for items other than the editor view? |
From: Tom G. <gu...@ac...> - 2001-08-02 22:11:26
|
John Gellene posted the following bsh macro that sets the fonts up. Play around with the settings until you get what you like. Save it into your user/startup directory (ie.. ChangeUIFonts.bsh) and it will automatically set things up whenever you start jEdit. Thanks John and Dirk! tom -- -------------------------------------------------- Tom Gutwin P.Eng. Acterna Sr. Developer t.g...@ie... -------------------------------------------------- Colin Sampaleanu wrote: > > I am trying to use jEdit on a new lcd monitor which I have to use at the > (Windows) resolution of 1280x1024. I find that the default font sizes that > jEdit comes up with (for things like menus, text in the various plugins, > etc.) are way to small for day to day use. > > Is there _any_ way to set font sizes for items other than the editor view? > > -- > ----------------------------------------------- > jEdit Users' List > jEd...@li... > http://lists.sourceforge.net/lists/listinfo/jedit-users /* ChangeUIFonts.bsh -- changes display fonts used by jEdit and most * dockable plugins * * based on startup macro code prepared by Dirk Mobius * Copyright (C) 2001 Dirk Mobius * * Portions copyright (C) 2001 John Gellene * * Requires JDK1.1(plus Swing) or greater, jEdit3.1 or greater * Notes on use * * Place the text of the ChangeUIFonts() method in your startup.bsh macro. * It will cause the fonts to be updated to the font chosen by the * method's parameters. In jEdit3.1, the existing view and related * components including many plugins) will then be updated. In jEdit3.2, * the updating should be unnecessary because the startup macro is invoked * prior to creation of the first view. * * A typical invocation might be: * * ChangeUIFonts("Dialog", Font.PLAIN, 12); * * On a Windows installation, parameters that will produce compact yet * readable text are: * * ChangeUIFonts("Microsoft Sans Serif", Font.PLAIN, 10); * * Some plugins have hard-coded fonts and will not be affected by this method. * The JBrowse plugin is an example. It may be possible to modified display * fonts for Plugins with custom renderers using the technique employed below * for the File System Browser * */ ChangeUIFonts(String fontName, int fontStyle, int fontSize) { javax.swing.plaf.FontUIResource defaultFont = new javax.swing.plaf.FontUIResource(fontName, fontStyle, fontSize); javax.swing.plaf.FontUIResource defaultBoldFont = new javax.swing.plaf.FontUIResource(fontName, Font.BOLD, fontSize); javax.swing.UIManager.put("Button.font", defaultFont); javax.swing.UIManager.put("Label.font", defaultFont); javax.swing.UIManager.put("MenuItem.font", defaultFont); javax.swing.UIManager.put("Menu.font", defaultBoldFont); javax.swing.UIManager.put("PopupMenu.font", defaultFont); javax.swing.UIManager.put("MenuBar.font", defaultFont); javax.swing.UIManager.put("ComboBox.font", defaultFont); javax.swing.UIManager.put("Table.font", defaultFont); javax.swing.UIManager.put("Border.font", defaultFont); javax.swing.UIManager.put("RadioButton.font", defaultFont); javax.swing.UIManager.put("InternalFrameTitlePane.font", defaultFont); javax.swing.UIManager.put("OptionPane.font", defaultFont); javax.swing.UIManager.put("TabbedPane.font", defaultFont); javax.swing.UIManager.put("ColorChooser.font", defaultFont); javax.swing.UIManager.put("ToggleButton.font", defaultFont); javax.swing.UIManager.put("CheckBoxMenuItem.font", defaultFont); javax.swing.UIManager.put("CheckBox.font", defaultFont); javax.swing.UIManager.put("TitledBorder.font", defaultFont); javax.swing.UIManager.put("DesktopIcon.font", defaultFont); javax.swing.UIManager.put("Tree.font", defaultFont); javax.swing.UIManager.put("List.font", defaultFont); javax.swing.UIManager.put("ToolTip.font", defaultFont); javax.swing.UIManager.put("TextField.font", defaultFont); // in jEdit3.1, view and plugins are already created when // startup macro runs, so update the UI here javax.swing.SwingUtilities.updateComponentTreeUI(view); if(jEdit.getBuild().compareTo("03.01.99.00") > 0) return; Object[] dockables = EditBus.getNamedList(DockableWindow.DOCKABLE_WINDOW_LIST); DockableWindowManager mgr = view.getDockableWindowManager(); if (dockables != null) { for (int i = 0; i < dockables.length; i++) { String name = (String)dockables[i]; if (mgr.isDockableWindowVisible(name)) { DockableWindow win = mgr.getDockableWindow(name); if (win != null) { Component comp = win.getComponent(); if (comp != null) { javax.swing.SwingUtilities.updateComponentTreeUI(comp); } } } } } // set cell font for File Sysytem Browser plugin; // the cell renderer object is not part of the UI tree if(mgr.isDockableWindowVisible("vfs.browser")) mgr.getDockableWindow("vfs.browser").getBrowserView() .getComponent(0).getViewport().getComponent(0) .setCellRenderer(new FileCellRenderer()); // update popup menu (a member of the current JEditTextArea // object but not part of the UI tree) javax.swing.SwingUtilities.updateComponentTreeUI(textArea.getRightClickPopup()); } //ChangeUIFonts("Lucida Console", Font.PLAIN, 12); ChangeUIFonts("Arial", Font.PLAIN, 12); // end ChangeUIFonts.bsh |
From: Colin S. <col...@ex...> - 2001-08-03 02:34:33
|
Thanks! For anybody else trying to use the version from Tom (as opposed to the version from John also posted today), the lines // in jEdit3.1, view and plugins are already created when // startup macro runs, so update the UI here javax.swing.SwingUtilities.updateComponentTreeUI(view); if(jEdit.getBuild().compareTo("03.01.99.00") > 0) return; in Tom's version are out of order... -----Original Message----- From: jed...@li... [mailto:jed...@li...]On Behalf Of Tom Gutwin Sent: Thursday, August 02, 2001 6:13 PM To: jed...@li... Subject: Re: [ jEdit-users ] Setting font size for non-editor portions of jEdit John Gellene posted the following bsh macro that sets the fonts up. Play around with the settings until you get what you like. Save it into your user/startup directory (ie.. ChangeUIFonts.bsh) and it will automatically set things up whenever you start jEdit. Thanks John and Dirk! tom -- |
From: Slava P. <sl...@je...> - 2001-08-03 08:57:00
|
On Thu, Aug 02, 2001 at 03:12:44PM -0700, Tom Gutwin wrote: > John Gellene posted the following bsh macro that sets the fonts up. > > Play around with the settings until you get what you like. > Save it into your user/startup directory (ie.. ChangeUIFonts.bsh) and it > will automatically set things up whenever you start jEdit. > > Thanks John and Dirk! You will find this script in jEdit 3.2pre7 (by default, the changeUIFonts() call is commented out). Slava |
From: John G. <jge...@ny...> - 2001-08-02 22:34:08
Attachments:
Startup.bsh
|
> I am trying to use jEdit on a new lcd monitor which I have to use at the > (Windows) resolution of 1280x1024. I find that the default font sizes that > jEdit comes up with (for things like menus, text in the various plugins, > etc.) are way to small for day to day use. > > Is there _any_ way to set font sizes for items other than the editor view? > > If you are using version 3.2 of jEdit, put the attached script in the "startup" folder of either the jEdit installation directory or your user settings directory. Modify the last line to change the font characteristics to your liking, then restart jEdit. John |
From: John G. <jge...@ny...> - 2001-08-02 23:04:35
|
Tom Gutwin posted a version I had put together with better annotations, but the substance is the same as the version I posted earlier today. What a memory I've got! Jake, er, Joe, umm... John > -----Original Message----- > From: jed...@li... > [mailto:jed...@li...]On Behalf Of John > Gellene > Sent: Thursday, August 02, 2001 6:27 PM > To: jed...@li... > Subject: RE: [ jEdit-users ] Setting font size for non-editor portions > of jEdit > > > > I am trying to use jEdit on a new lcd monitor which I have to use at the > > (Windows) resolution of 1280x1024. I find that the default font > sizes that > > jEdit comes up with (for things like menus, text in the various plugins, > > etc.) are way to small for day to day use. > > > > Is there _any_ way to set font sizes for items other than the > editor view? > > > > > > If you are using version 3.2 of jEdit, put the attached script in the > "startup" folder of either the jEdit installation directory or your user > settings directory. Modify the last line to change the font > characteristics > to your liking, then restart jEdit. > > John > |