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 221428 - Fields are not always marked as green if they are edited
Summary: Fields are not always marked as green if they are edited
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords: NETFIX
Depends on:
Blocks:
 
Reported: 2012-11-04 11:55 UTC by medeag
Modified: 2012-11-07 03:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
potential patch v1 (3.84 KB, patch)
2012-11-04 16:03 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description medeag 2012-11-04 11:55:01 UTC
Product Version: NetBeans IDE 7.3 Beta 2 (Build 201211020750)
Java: 1.7.0_10-ea; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b12
System: Mac OS X version 10.7.5 running on x86_64; US-ASCII; ka_GE (nb)

database mysql,
This works almost in all cases except boolean column, if you check/uncheck value nothing becomes green.

sample structure:
CREATE TABLE my_test (id BIGINT NOT NULL AUTO_INCREMENT, viewed BIT(1), updated BIT(1), change_date DATETIME, PRIMARY KEY (id));
Comment 1 matthias42 2012-11-04 16:03:57 UTC
Created attachment 127087 [details]
potential patch v1

Attached is a potential(!) fix. I fixed this by special casing the CheckBox case and putting then a frame around the whole cell with the right color. It's not perfect, but should work.

This would also work for other special cell renderers, that don't reflect the change in the foreground color done in UpdatedResultSetCellRenderer.

The alternative for the checkbox case (manipulating the checkbox display itself) seems to be to troublesome to consider - this would case problems with LAF specific behaviours later on.
Comment 2 Jaroslav Havlin 2012-11-05 10:56:42 UTC
Integrated as http://hg.netbeans.org/core-main/rev/953ae2376417.

> Attached is a potential(!) fix. I fixed this by special casing the CheckBox
> case and putting then a frame around the whole cell with the right color. It's
> not perfect, but should work.
I think that this solution is quite fine. If there are any complaints, we can change it later.

> The alternative for the checkbox case (manipulating the checkbox display
> itself) seems to be to troublesome to consider - this would case problems with
> LAF specific behaviours later on.
I agree.

Many thanks to Matthias for providing the fix, and to Honza for help with evaluation.
Comment 3 Quality Engineering 2012-11-07 03:40:55 UTC
Integrated into 'main-golden', will be available in build *201211070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/953ae2376417
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #221428: Fields are not always marked as green if they are edited