Change the color of the selection frame [message #221404] |
Sat, 12 August 2006 13:32 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: rr.tiscali.de
I have a GEF editor based on the logic - example.
My problem is, that the background of the GraphicViewer has to be black.
Therefore one can't see the frame that the selection-tool draws around
a selected part and the handles are not shown with verry good contrast
( black handles with thin white frames on black background ).
My Question is: Where and how can I change the color of the frame
and the handles that are drawn around a selected part.
Thanks in advance
Rainer Rieder
|
|
|
|
Re: Change the color of the selection frame [message #221788 is a reply to message #221468] |
Fri, 18 August 2006 14:47 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: rr.tiscali.de
That worked perfectly:
/**
* @return
* @see org.eclipse.gef.editpolicies.ResizableEditPolicy#createSelec tionHandles()
*/
@Override
protected List createSelectionHandles() {
List l = super.createSelectionHandles();
for (Object obj : l) {
if(obj instanceof AbstractHandle) {
AbstractHandle handle = (AbstractHandle) obj;
Border border = handle.getBorder();
if(border instanceof LineBorder) {
LineBorder lborder = (LineBorder) border;
lborder.setColor(ColorConstants.red);
}
}
}
return l;
}
Thanks a lot.
Nhu Le wrote:
> Look in class ResizableEditPolicy/NonResizableEditPolicy.
>
> Nhu Le
>
> Rainer Rieder wrote:
>>
>> I have a GEF editor based on the logic - example.
>>
>>
>> My problem is, that the background of the GraphicViewer has to be black.
>>
>> Therefore one can't see the frame that the selection-tool draws around
>>
>> a selected part and the handles are not shown with verry good contrast
>>
>> ( black handles with thin white frames on black background ).
>>
>>
>> My Question is: Where and how can I change the color of the frame
>>
>> and the handles that are drawn around a selected part.
>>
>>
>>
>> Thanks in advance
>>
>> Rainer Rieder
|
|
|
Powered by
FUDForum. Page generated in 0.03273 seconds