Use a particular font for the group titles. Removed bogus setFont() from

top level.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@190 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2001-07-17 05:28:46 +00:00
parent f572956f73
commit ee3e32fe5a
2 changed files with 6 additions and 8 deletions
@@ -1,5 +1,5 @@
//
// $Id: ChainGroup.java,v 1.4 2001/07/17 05:23:49 mdb Exp $
// $Id: ChainGroup.java,v 1.5 2001/07/17 05:28:46 mdb Exp $
package com.samskivert.viztool.viz;
@@ -44,7 +44,7 @@ public class ChainGroup
}
// we'll need room to incorporate our title
TextLayout layout = new TextLayout(_pkg, gfx.getFont(),
TextLayout layout = new TextLayout(_pkg, _titleFont,
gfx.getFontRenderContext());
// we let the title stick halfway up out of our rectangular
@@ -82,7 +82,7 @@ public class ChainGroup
*/
public void render (Graphics2D gfx, double x, double y)
{
TextLayout layout = new TextLayout(_pkg, gfx.getFont(),
TextLayout layout = new TextLayout(_pkg, _titleFont,
gfx.getFontRenderContext());
// we let the title stick halfway up out of our rectangular
@@ -137,4 +137,6 @@ public class ChainGroup
protected Rectangle2D _size;
protected static final double BORDER = 72/8;
protected static Font _titleFont = new Font("Helvetica", Font.BOLD, 8);
}
@@ -1,5 +1,5 @@
//
// $Id: HierarchyVisualizer.java,v 1.5 2001/07/17 05:23:49 mdb Exp $
// $Id: HierarchyVisualizer.java,v 1.6 2001/07/17 05:28:46 mdb Exp $
package com.samskivert.viztool.viz;
@@ -80,10 +80,6 @@ public class HierarchyVisualizer implements Printable
// adjust the stroke
gfx.setStroke(new BasicStroke(0.1f));
// and the font
Font font = new Font("Courier", Font.PLAIN, 8);
gfx.setFont(font);
// only relay things out if the page format has changed
if (!pf.equals(_format)) {
// keep this around