Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Change the color of the selection frame
Change the color of the selection frame [message #221404] Sat, 12 August 2006 13:32 Go to next message
Eclipse UserFriend
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 #221468 is a reply to message #221404] Mon, 14 August 2006 18:33 Go to previous messageGo to next message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
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
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
Eclipse UserFriend
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
Previous Topic:Child drop offset problem
Next Topic:selecting connections
Goto Forum:
  


Current Time: Sat Jan 18 08:40:10 GMT 2025

Powered by FUDForum. Page generated in 0.02320 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top