Java Graphics Draw String drawTuplet(Graphics g, int x, int y, int x2, int y2, int bi, String s1, String s2)

Here you can find the source of drawTuplet(Graphics g, int x, int y, int x2, int y2, int bi, String s1, String s2)

Description

draw Tuplet

License

Open Source License

Declaration

private static void drawTuplet(Graphics g, int x, int y, int x2, int y2, int bi, String s1, String s2) 

Method Source Code

//package com.java2s;
/******************************************************************************
 *
 * Copyright (c) 1999-2011 Cryptzone Group AB. All Rights Reserved.
 * //from   w  w w . ja  v  a  2s.  c om
 * This file contains Original Code and/or Modifications of Original Code as
 * defined in and that are subject to the MindTerm Public Source License,
 * Version 2.0, (the 'License'). You may not use this file except in compliance
 * with the License.
 * 
 * You should have received a copy of the MindTerm Public Source License
 * along with this software; see the file LICENSE.  If not, write to
 * Cryptzone Group AB, Drakegatan 7, SE-41250 Goteborg, SWEDEN
 *
 *****************************************************************************/

import java.awt.Font;
import java.awt.Graphics;

public class Main {
    private static void drawTuplet(Graphics g, int x, int y, int x2, int y2, int bi, String s1, String s2) {
        Font font = g.getFont();
        g.setFont(new Font(font.getName(), font.getStyle(), font.getSize() / 2));
        g.drawString(s1, x + 1, y + 1 + bi / 2);
        g.drawString(s2, x2, y2 + bi / 2);
        g.setFont(font);
    }
}

Related

  1. drawSystemNameLabel(Graphics2D g, String sysName, Color color, double safetyOffset, boolean isLocationKnownUpToDate)
  2. drawText(Graphics graphics, int x, int y, String text)
  3. drawText(Graphics2D graphics, Font font, Dimension2D dimension, String text)
  4. drawTextCenter(Graphics2D g2, String str, int x, int y)
  5. drawTextInBoundedArea(Graphics2D g2d, int x1, int y1, int x2, int y2, String text)
  6. drawUnderlineCharAt(Graphics g, String text, int underlinedIndex, int x, int y)
  7. drawVerticalText(Graphics2D graphics, Font font, Dimension2D dimension, String text)
  8. drawVerticalTextCenter(Graphics2D g2, String str, int x, int y)
  9. drawWrappedText(Graphics2D g2, float x, float y, float width, String text)