|
From: Liu Z. <ntu...@ya...> - 2001-12-18 03:51:25
|
Hihi,
I am using ColorPickLabel in widgets subpackage.
I found that the label [r,g,b] does not reflect the changes of the color.
More specifically, when someone double click and use the popup dialog to
change the color, the background color of this label is changed, but the
[r,g,b] text is not changed.
This might be fixed by adding a line of code to change the text of the label
in the method setPickColor() when new color is set.
Below are the suggested changes. It seems working fine on my machine.
cvs -q diff ColorPickLabel.java (in directory
C:\Zehua\Work\src\geotools\src\uk\ac\leeds\ccg\widgets\)
Password: Index: ColorPickLabel.java
===================================================================
RCS file:
/cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets/ColorPickLabel.java,v
retrieving revision 1.5
diff -c -r1.5 ColorPickLabel.java
*** ColorPickLabel.java 2001/04/04 08:54:38 1.5
--- ColorPickLabel.java 2001/12/18 03:36:01
***************
*** 25,30 ****
--- 25,32 ----
public void setPickColor(java.awt.Color propValue)
{
setBackground(propValue);
+
setText("["+propValue.getRed()+","+propValue.getGreen()+","+propValue.getBlu
e()+"]");
+ if(DEBUG)System.out.println("CoPL>Color set to
["+propValue.getRed()+","+propValue.getGreen()+","+propValue.getBlue()+"]");
changes.firePropertyChange("pickColor", getPickColor(), propValue);
}
The other problem is about ColorDialog. When the slider is set to minimum,
it seems to return a value of 10, instead of 0. I am not able to suggest any
fix, as I have not looked at the code yet. Going to do that soon.
These kinds of problem seem to small to be put into the bug list. I am not
sure whether this way of fixing them appropriate? any opinion?
Regards,
Liu Zehua
Project Officer
Centre for Advanced Information Systems
Nanyang Technological University, Singapore
----- Original Message -----
From: "Liu Zehua" <ntu...@ya...>
To: <geo...@li...>
Sent: Wednesday, December 12, 2001 2:28 PM
Subject: [Geotools-devel] Removing themes from Viewer
> Hihi,
>
> I have some problem with removing an existing theme from the viewer.
> When I called Viewer.remove(Theme), the shapes in the theme are still
> visible, although I can not highlight or select them. and the
corresponding
> ThemePanel does not update, either.
> I looked throught the source code of Viewer.java, and found that when a
> theme is remove, it is not removed from themeStack. Since I am not very
> familiar with the codes in Viewer.java, I am not sure whether this is a
bug,
> or there is some other tricks. However, after I made the following
changes,
> the removing of themes seems to be working.
>
> here is the changes that I made in my local copy:
>
> cvs -q diff Viewer.java (in directory
> C:\Zehua\Work\src\geotools\src\uk\ac\leeds\ccg\geotools\)
> Password: Index: Viewer.java
> ===================================================================
> RCS file:
> /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools/Viewer.java,v
> retrieving revision 1.37
> diff -c -r1.37 Viewer.java
> *** Viewer.java 2001/11/23 18:51:46 1.37
> --- Viewer.java 2001/12/12 06:21:10
> ***************
> *** 325,330 ****
> --- 325,334 ----
> if(visibleThemes.contains(t)){visibleThemes.removeElement(t);}
> if(staticThemes.contains(t)){
> staticThemes.removeElement(t);
> + removeHighlightPositionChangedListener(t);
> + removeSelectionPositionChangedListener(t);
> + removeSelectionRegionChangedListener(t);
> + themeStack.removeTheme(t);
> themeCount--;
> updateStaticBuffer();
> }
>
>
> Regards,
>
> Liu Zehua
> Project Officer
> Centre for Advanced Information Systems
> Nanyang Technological University, Singapore
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _______________________________________________
> Geotools-devel mailing list
> Geo...@li...
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|