This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 221144 - Rendering issues in SatelliteComponent
Summary: Rendering issues in SatelliteComponent
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Graph (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-31 07:24 UTC by arren
Modified: 2012-10-31 07:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arren 2012-10-31 07:24:09 UTC
a) SatelliteComponent does not render a background. Since it is doublebuffered, this means that one gets glitch-graphics if the scene scales to smaller than the satellite view.

b) SatelliteComponent overrides paint() instead of paintComponent().

Replace the top part of paint() thus:

    @Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);

        Graphics2D gr = (Graphics2D) g;

        Dimension size = getSize();

        if (isOpaque()) {
            gr.setPaint(getBackground());
            gr.fillRect(0, 0, size.width, size.height);
        }

Really, the background should be rendered by a ComponentUI or something, but this at least stops the graphics glitching.
Comment 1 arren 2012-10-31 07:25:29 UTC
Pretty sure this was visual library from netbeans 7.0.x.
Comment 2 arren 2012-10-31 07:27:35 UTC
Also please make the class not final. Why is it final? Like half of visual library is final. Grrr.