Java Code Examples for javax.swing.JMenuBar#paintAll()

The following examples show how to use javax.swing.JMenuBar#paintAll() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MisplacedBorder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar and border on top of it.
 */
private BufferedImage step2(final JMenuBar menubar) {
    final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d2 = bi2.createGraphics();
    g2d2.scale(2, 2);
    g2d2.setColor(Color.RED);
    g2d2.fillRect(0, 0, W, H);
    menubar.paintAll(g2d2);
    menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar
            .getX(), menubar.getWidth(), menubar.getHeight());
    g2d2.dispose();
    return bi2;
}
 
Example 2
Source File: MisplacedBorder.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar and border on top of it.
 */
private BufferedImage step2(final JMenuBar menubar) {
    final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d2 = bi2.createGraphics();
    g2d2.scale(2, 2);
    g2d2.setColor(Color.RED);
    g2d2.fillRect(0, 0, W, H);
    menubar.paintAll(g2d2);
    menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar
            .getX(), menubar.getWidth(), menubar.getHeight());
    g2d2.dispose();
    return bi2;
}
 
Example 3
Source File: MisplacedBorder.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar.
 */
private BufferedImage step1(final JMenuBar menubar) {
    final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d = bi1.createGraphics();
    g2d.scale(2, 2);
    g2d.setColor(Color.RED);
    g2d.fillRect(0, 0, W, H);
    menubar.paintAll(g2d);
    g2d.dispose();
    return bi1;
}
 
Example 4
Source File: MisplacedBorder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar and border on top of it.
 */
private BufferedImage step2(final JMenuBar menubar) {
    final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d2 = bi2.createGraphics();
    g2d2.scale(2, 2);
    g2d2.setColor(Color.RED);
    g2d2.fillRect(0, 0, W, H);
    menubar.paintAll(g2d2);
    menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar
            .getX(), menubar.getWidth(), menubar.getHeight());
    g2d2.dispose();
    return bi2;
}
 
Example 5
Source File: MisplacedBorder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar.
 */
private BufferedImage step1(final JMenuBar menubar) {
    final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d = bi1.createGraphics();
    g2d.scale(2, 2);
    g2d.setColor(Color.RED);
    g2d.fillRect(0, 0, W, H);
    menubar.paintAll(g2d);
    g2d.dispose();
    return bi1;
}
 
Example 6
Source File: MisplacedBorder.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar and border on top of it.
 */
private BufferedImage step2(final JMenuBar menubar) {
    final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d2 = bi2.createGraphics();
    g2d2.scale(2, 2);
    g2d2.setColor(Color.RED);
    g2d2.fillRect(0, 0, W, H);
    menubar.paintAll(g2d2);
    menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar
            .getX(), menubar.getWidth(), menubar.getHeight());
    g2d2.dispose();
    return bi2;
}
 
Example 7
Source File: MisplacedBorder.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar.
 */
private BufferedImage step1(final JMenuBar menubar) {
    final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d = bi1.createGraphics();
    g2d.scale(2, 2);
    g2d.setColor(Color.RED);
    g2d.fillRect(0, 0, W, H);
    menubar.paintAll(g2d);
    g2d.dispose();
    return bi1;
}
 
Example 8
Source File: MisplacedBorder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar and border on top of it.
 */
private BufferedImage step2(final JMenuBar menubar) {
    final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d2 = bi2.createGraphics();
    g2d2.scale(2, 2);
    g2d2.setColor(Color.RED);
    g2d2.fillRect(0, 0, W, H);
    menubar.paintAll(g2d2);
    menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar
            .getX(), menubar.getWidth(), menubar.getHeight());
    g2d2.dispose();
    return bi2;
}
 
Example 9
Source File: MisplacedBorder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar.
 */
private BufferedImage step1(final JMenuBar menubar) {
    final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d = bi1.createGraphics();
    g2d.scale(2, 2);
    g2d.setColor(Color.RED);
    g2d.fillRect(0, 0, W, H);
    menubar.paintAll(g2d);
    g2d.dispose();
    return bi1;
}
 
Example 10
Source File: MisplacedBorder.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar.
 */
private BufferedImage step1(final JMenuBar menubar) {
    final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d = bi1.createGraphics();
    g2d.scale(2, 2);
    g2d.setColor(Color.RED);
    g2d.fillRect(0, 0, W, H);
    menubar.paintAll(g2d);
    g2d.dispose();
    return bi1;
}
 
Example 11
Source File: MisplacedBorder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar.
 */
private BufferedImage step1(final JMenuBar menubar) {
    final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d = bi1.createGraphics();
    g2d.scale(2, 2);
    g2d.setColor(Color.RED);
    g2d.fillRect(0, 0, W, H);
    menubar.paintAll(g2d);
    g2d.dispose();
    return bi1;
}
 
Example 12
Source File: MisplacedBorder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar and border on top of it.
 */
private BufferedImage step2(final JMenuBar menubar) {
    final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d2 = bi2.createGraphics();
    g2d2.scale(2, 2);
    g2d2.setColor(Color.RED);
    g2d2.fillRect(0, 0, W, H);
    menubar.paintAll(g2d2);
    menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar
            .getX(), menubar.getWidth(), menubar.getHeight());
    g2d2.dispose();
    return bi2;
}
 
Example 13
Source File: MisplacedBorder.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar.
 */
private BufferedImage step1(final JMenuBar menubar) {
    final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d = bi1.createGraphics();
    g2d.scale(2, 2);
    g2d.setColor(Color.RED);
    g2d.fillRect(0, 0, W, H);
    menubar.paintAll(g2d);
    g2d.dispose();
    return bi1;
}
 
Example 14
Source File: MisplacedBorder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar and border on top of it.
 */
private BufferedImage step2(final JMenuBar menubar) {
    final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d2 = bi2.createGraphics();
    g2d2.scale(2, 2);
    g2d2.setColor(Color.RED);
    g2d2.fillRect(0, 0, W, H);
    menubar.paintAll(g2d2);
    menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar
            .getX(), menubar.getWidth(), menubar.getHeight());
    g2d2.dispose();
    return bi2;
}
 
Example 15
Source File: MisplacedBorder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar.
 */
private BufferedImage step1(final JMenuBar menubar) {
    final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d = bi1.createGraphics();
    g2d.scale(2, 2);
    g2d.setColor(Color.RED);
    g2d.fillRect(0, 0, W, H);
    menubar.paintAll(g2d);
    g2d.dispose();
    return bi1;
}
 
Example 16
Source File: MisplacedBorder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar and border on top of it.
 */
private BufferedImage step2(final JMenuBar menubar) {
    final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d2 = bi2.createGraphics();
    g2d2.scale(2, 2);
    g2d2.setColor(Color.RED);
    g2d2.fillRect(0, 0, W, H);
    menubar.paintAll(g2d2);
    menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar
            .getX(), menubar.getWidth(), menubar.getHeight());
    g2d2.dispose();
    return bi2;
}
 
Example 17
Source File: MisplacedBorder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar.
 */
private BufferedImage step1(final JMenuBar menubar) {
    final BufferedImage bi1 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d = bi1.createGraphics();
    g2d.scale(2, 2);
    g2d.setColor(Color.RED);
    g2d.fillRect(0, 0, W, H);
    menubar.paintAll(g2d);
    g2d.dispose();
    return bi1;
}
 
Example 18
Source File: MisplacedBorder.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws standard JMenuBar and border on top of it.
 */
private BufferedImage step2(final JMenuBar menubar) {
    final BufferedImage bi2 = new BufferedImage(W, H, TYPE_INT_ARGB_PRE);
    final Graphics2D g2d2 = bi2.createGraphics();
    g2d2.scale(2, 2);
    g2d2.setColor(Color.RED);
    g2d2.fillRect(0, 0, W, H);
    menubar.paintAll(g2d2);
    menubar.getBorder().paintBorder(menubar, g2d2, menubar.getX(), menubar
            .getX(), menubar.getWidth(), menubar.getHeight());
    g2d2.dispose();
    return bi2;
}