public void setSelectedFont( Font font ) { dialog.Font = font.font; }
public void setFont( Font font ) { m_font = font.font; }
private void GenerateAuthorList() { const float shadow_shift = 2f; const string font_name = "Arial"; const int font_size = 10; Font font = new Font( font_name, java.awt.Font.PLAIN, font_size ); Dimension size = com.github.cadencii.apputil.Util.measureString( "Qjqp", font ); float width = this.Width; float height = size.height; //StringFormat sf = new StringFormat(); m_scroll = new BufferedImage( (int)width, (int)(40f + m_credit.Length * height * 1.1f), BufferedImage.TYPE_INT_BGR ); Graphics2D g = m_scroll.createGraphics(); //sf.Alignment = StringAlignment.Center; g.setFont( new Font( font_name, java.awt.Font.BOLD, (int)(font_size * 1.1f) ) ); if ( m_shadow_enablde ) { g.setColor( new Color( 0, 0, 0, 40 ) ); g.drawString( m_app_name, shadow_shift, shadow_shift ); //, width, height ), sf ); } g.setColor( Color.black ); g.drawString( m_app_name, 0f, 0f ); //, width, height ), sf ); for ( int i = 0; i < m_credit.Length; i++ ) { g.setFont( new Font( font_name, m_credit[i].getStyle(), font_size ) ); if ( m_shadow_enablde ) { g.setColor( new Color( 0, 0, 0, 40 ) ); g.drawString( m_credit[i].getName(), 0f + shadow_shift, 40f + i * height * 1.1f + shadow_shift ); //, width, height ), sf ); } g.setColor( Color.black ); g.drawString( m_credit[i].getName(), 0f, 40f + i * height * 1.1f );// , width, height ), sf ); } }