< prev index next >

src/java.desktop/share/classes/sun/font/TextSourceLabel.java

Print this page




 130     g.drawGlyphVector(getGV(), x, y);
 131   }
 132 
 133   protected Rectangle2D createLogicalBounds() {
 134     return getGV().getLogicalBounds();
 135   }
 136 
 137   protected Rectangle2D createVisualBounds() {
 138     return getGV().getVisualBounds();
 139   }
 140 
 141   protected Rectangle2D createItalicBounds() {
 142       // !!! fix
 143     return getGV().getLogicalBounds();
 144   }
 145 
 146   protected Rectangle2D createAlignBounds() {
 147     return createLogicalBounds();
 148   }
 149 
 150   private final GlyphVector getGV() {
 151     if (gv == null) {
 152       gv = createGV();
 153     }
 154 
 155     return gv;
 156   }
 157 
 158   protected GlyphVector createGV() {
 159     Font font = source.getFont();
 160     FontRenderContext frc = source.getFRC();
 161     int flags = source.getLayoutFlags();
 162     char[] context = source.getChars();
 163     int start = source.getStart();
 164     int length = source.getLength();
 165 
 166     GlyphLayout gl = GlyphLayout.get(null); // !!! no custom layout engines
 167     StandardGlyphVector gv = gl.layout(font, frc, context, start, length,
 168                                        flags, null); // ??? use textsource
 169     GlyphLayout.done(gl);
 170 


 130     g.drawGlyphVector(getGV(), x, y);
 131   }
 132 
 133   protected Rectangle2D createLogicalBounds() {
 134     return getGV().getLogicalBounds();
 135   }
 136 
 137   protected Rectangle2D createVisualBounds() {
 138     return getGV().getVisualBounds();
 139   }
 140 
 141   protected Rectangle2D createItalicBounds() {
 142       // !!! fix
 143     return getGV().getLogicalBounds();
 144   }
 145 
 146   protected Rectangle2D createAlignBounds() {
 147     return createLogicalBounds();
 148   }
 149 
 150   private GlyphVector getGV() {
 151     if (gv == null) {
 152       gv = createGV();
 153     }
 154 
 155     return gv;
 156   }
 157 
 158   protected GlyphVector createGV() {
 159     Font font = source.getFont();
 160     FontRenderContext frc = source.getFRC();
 161     int flags = source.getLayoutFlags();
 162     char[] context = source.getChars();
 163     int start = source.getStart();
 164     int length = source.getLength();
 165 
 166     GlyphLayout gl = GlyphLayout.get(null); // !!! no custom layout engines
 167     StandardGlyphVector gv = gl.layout(font, frc, context, start, length,
 168                                        flags, null); // ??? use textsource
 169     GlyphLayout.done(gl);
 170 
< prev index next >