Java Code Examples for java.awt.Graphics#draw3DRect()

The following examples show how to use java.awt.Graphics#draw3DRect() . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: jdk8u_jdk   File: DrawTest.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 2
@Override
public void paint(Graphics g) {
    String fractalPath = cls.getPath();
    if (fractalPath == null) {
        super.paint(g);
        return;
    }
    if (savedPath == null || !savedPath.equals(fractalPath)) {
        savedPath = fractalPath;
        render(null, fractalPath);
    }

    for (int i = 0; i < border; i++) {
        g.draw3DRect(i, i, getSize().width - i * 2, getSize().height - i * 2,
                false);
    }
    render(g, fractalPath);
}
 
Example 3
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 4
@Override
public void paint(Graphics g) {
    String fractalPath = cls.getPath();
    if (fractalPath == null) {
        super.paint(g);
        return;
    }
    if (savedPath == null || !savedPath.equals(fractalPath)) {
        savedPath = fractalPath;
        render(null, fractalPath);
    }

    for (int i = 0; i < border; i++) {
        g.draw3DRect(i, i, getSize().width - i * 2, getSize().height - i * 2,
                false);
    }
    render(g, fractalPath);
}
 
Example 5
@Override
public void paint(Graphics g) {
    String fractalPath = cls.getPath();
    if (fractalPath == null) {
        super.paint(g);
        return;
    }
    if (savedPath == null || !savedPath.equals(fractalPath)) {
        savedPath = fractalPath;
        render(null, fractalPath);
    }

    for (int i = 0; i < border; i++) {
        g.draw3DRect(i, i, getSize().width - i * 2, getSize().height - i * 2,
                false);
    }
    render(g, fractalPath);
}
 
Example 6
Source Project: openjdk-8   File: DrawTest.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 7
Source Project: jdk8u60   File: DrawTest.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 8
@Override
public void paint(Graphics g) {
    String fractalPath = cls.getPath();
    if (fractalPath == null) {
        super.paint(g);
        return;
    }
    if (savedPath == null || !savedPath.equals(fractalPath)) {
        savedPath = fractalPath;
        render(null, fractalPath);
    }

    for (int i = 0; i < border; i++) {
        g.draw3DRect(i, i, getSize().width - i * 2, getSize().height - i * 2,
                false);
    }
    render(g, fractalPath);
}
 
Example 9
Source Project: jdk8u-jdk   File: DrawTest.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 10
@Override
public void paint(Graphics g) {
    String fractalPath = cls.getPath();
    if (fractalPath == null) {
        super.paint(g);
        return;
    }
    if (savedPath == null || !savedPath.equals(fractalPath)) {
        savedPath = fractalPath;
        render(null, fractalPath);
    }

    for (int i = 0; i < border; i++) {
        g.draw3DRect(i, i, getSize().width - i * 2, getSize().height - i * 2,
                false);
    }
    render(g, fractalPath);
}
 
Example 11
@Override
public void paint(Graphics g) {
    String fractalPath = cls.getPath();
    if (fractalPath == null) {
        super.paint(g);
        return;
    }
    if (savedPath == null || !savedPath.equals(fractalPath)) {
        savedPath = fractalPath;
        render(null, fractalPath);
    }

    for (int i = 0; i < border; i++) {
        g.draw3DRect(i, i, getSize().width - i * 2, getSize().height - i * 2,
                false);
    }
    render(g, fractalPath);
}
 
Example 12
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 13
@Override
public void paint(Graphics g) {
    String fractalPath = cls.getPath();
    if (fractalPath == null) {
        super.paint(g);
        return;
    }
    if (savedPath == null || !savedPath.equals(fractalPath)) {
        savedPath = fractalPath;
        render(null, fractalPath);
    }

    for (int i = 0; i < border; i++) {
        g.draw3DRect(i, i, getSize().width - i * 2, getSize().height - i * 2,
                false);
    }
    render(g, fractalPath);
}
 
Example 14
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 15
@Override
public void paint(Graphics g) {
    String fractalPath = cls.getPath();
    if (fractalPath == null) {
        super.paint(g);
        return;
    }
    if (savedPath == null || !savedPath.equals(fractalPath)) {
        savedPath = fractalPath;
        render(null, fractalPath);
    }

    for (int i = 0; i < border; i++) {
        g.draw3DRect(i, i, getSize().width - i * 2, getSize().height - i * 2,
                false);
    }
    render(g, fractalPath);
}
 
Example 16
Source Project: jdk8u-jdk   File: DrawTest.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 17
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 18
Source Project: hottub   File: DrawTest.java    License: GNU General Public License v2.0 6 votes vote down vote up
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}
 
Example 19
@Override
public void paint(Graphics g) {
    String fractalPath = cls.getPath();
    if (fractalPath == null) {
        super.paint(g);
        return;
    }
    if (savedPath == null || !savedPath.equals(fractalPath)) {
        savedPath = fractalPath;
        render(null, fractalPath);
    }

    for (int i = 0; i < border; i++) {
        g.draw3DRect(i, i, getSize().width - i * 2, getSize().height - i * 2,
                false);
    }
    render(g, fractalPath);
}
 
Example 20
@Override
public void paint(Graphics g) {
    Rectangle r = getBounds();
    g.setColor(Color.lightGray);
    g.draw3DRect(0, 0, r.width, r.height, false);

    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        Component comp = getComponent(i);
        if (comp instanceof Checkbox) {
            Point loc = comp.getLocation();
            Dimension d = comp.getSize();
            g.setColor(comp.getForeground());
            g.drawRect(loc.x - 1, loc.y - 1, d.width + 1, d.height + 1);
        }
    }
}