Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #31952
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Vertical Text - part 3 |
| Date | 2015-07-04 18:18 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <mn9828$i1q$1@dont-email.me> (permalink) |
| References | <mn160m$anb$1@dont-email.me> <mn1pfb$rqt$1@dont-email.me> <mn1s02$2kl$1@dont-email.me> <mn1u4i$a63$1@dont-email.me> <mn2030$bpm$1@dont-email.me> |
On Thu, 02 Jul 2015 00:19:44 +0000, Martin Gregorie wrote: > On Wed, 01 Jul 2015 19:44:46 -0400, Jeff Higgins wrote: > >> Message-ID: <31e57656-27e3-46a4-abbd-a793c463adba@googlegroups.com> >> From: e.d.programmer@gmail.com >> >> Message-ID: <028164e2-9cba-4ba3-ad34-0cf46ae7210b@googlegroups.com> >> From: FredK <fred.l.kleinschmidt@gmail.com> >> > Those don't work at all: not true URIs. Annoyingly, the first one gets > expanded to /home/myuser/31e57656-27e3-46a4-abbd- > a793c463adba@googlegroups.com and is reported as such in the resulting > error message, but diving in to googlegroups from the top found the > thread easily enough and you're right: it was e.d.programmer's second > example that pressed all the right buttons. > > Its late, so I'll scratch my head over a clean method of incorporating > it into an existing subclass of JLabel tomorrow. Currently I'm > considering making it into a Font creation class so I can hand its > output to the JLabel subclass instances via setFont(). Following up: I already had a standard font I was using for this screen (monospaced, plain, 60pt) so I derived a font from it by applying e.d.programmer's Affine transform. The NameButton, which is the class that displays vertically formatted names was modified by removing the HTML formatting method, using the derived font in place of the standard font, and changing the vertical alignment from BOTTOM to TOP (otherwise the vertical font put all the text off the bottom of the display area. Everything is now working as before but now the row of names is only 60% of the height it previously occupied and is at least as readable as before. In case anybody is interested, the code to create the derived font is: Font base = new Font(Font.MONOSPACED, Font.PLAIN, REFont.FONTSIZE); AffineTransform a = new AffineTransform(); a.rotate(Math.PI / 2.0); Font f = base.deriveFont(a); where REFont.FONTSIZE us defined as: public static int FONTSIZE = 10; In case you want to see the effect of making this change, the original HTML-verticalised screenshot is here: http://www.gregorie.org/temp/Screenshot%20-%20020715.jpg and the new, improved screenshot is here: http://www.gregorie.org/temp/Screenshot%20-%20040715.png This time round the screenshot shows how the screen looks on start-up because I didn't bother to light up all the pretty colours in the matrix, but they all work exactly as before and so does the click on/click off background colouring behind the names. Thanks again to all who helped with example code and suggestions: the end result is exactly what I hoped for and, as a bonus, I've learnt another way to modify fonts. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Vertical Text - part 3 Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-01 16:54 +0000
Re: Vertical Text - part 3 Jeff Higgins <jeff@invalid.invalid> - 2015-07-01 18:25 -0400
Re: Vertical Text - part 3 Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-01 23:09 +0000
Re: Vertical Text - part 3 Jeff Higgins <jeff@invalid.invalid> - 2015-07-01 19:44 -0400
Re: Vertical Text - part 3 Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-02 00:19 +0000
Re: Vertical Text - part 3 Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-04 18:18 +0000
Re: Vertical Text - part 3 Jeff Higgins <jeff@invalid.invalid> - 2015-07-02 09:09 -0400
Re: Vertical Text - part 3 e.d.programmer@gmail.com - 2015-07-02 07:24 -0700
Re: Vertical Text - part 3 Jeff Higgins <jeff@invalid.invalid> - 2015-07-02 10:36 -0400
Re: Vertical Text - part 3 Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-02 18:38 +0000
Re: Vertical Text - part 3 e.d.programmer@gmail.com - 2015-07-02 12:54 -0700
Re: Vertical Text - part 3 Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-02 21:55 +0000
Re: Vertical Text - part 3 Jeff Higgins <jeff@invalid.invalid> - 2015-07-02 18:46 -0400
Re: Vertical Text - part 3 Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-03 10:38 +0000
Re: Vertical Text - part 3 Eternal Hope <laughingspam99@gmail.com> - 2015-07-03 16:44 +0100
Re: Vertical Text - part 3 Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-07-02 16:21 -0700
Re: Vertical Text - part 3 Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2015-07-02 16:43 -0700
Re: Vertical Text - part 3 Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-02 18:01 +0000
Re: Vertical Text - part 3 Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-02 17:44 +0000
Re: Vertical Text - part 3 Jeff Higgins <jeff@invalid.invalid> - 2015-07-03 08:20 -0400
Re: Vertical Text - part 3 Jeff Higgins <jeff@invalid.invalid> - 2015-07-03 10:01 -0400
csiph-web