|
|
|
|
Re: Changin the palette background and foreground colors [message #75544 is a reply to message #73661] |
Tue, 07 November 2006 13:02  |
Eclipse User |
|
|
|
Antoine Toulmé wrote:
Hi Antonie;
The Palette is constructed using EditParts, you can always have your
own PaletteEditPartFactory that creates a specialized edit parts for
your palette, or you can override the hookPaletteViewer method on the
PaletteViewerProvider and change the back ground color on the figure of
the palette edit part
For example; lets say i want to change the background color of all
palettes to be Red, i can override
PaletteViewerProvider#hookPaletteViewer inside the
DiagramEditorWithFlyOutPalette and implement it like this :
protected void hookPaletteViewer(PaletteViewer viewer) {
super.hookPaletteViewer(viewer);
RootEditPart rEP = viewer.getRootEditPart();
((AbstractGraphicalEditPart)(rEP.getChildren().get(0))).getF igure().setBackgroundColor(new
Color(null,255,0,0));
}
For sure this is not the practical way to do it, this is just an
example on how can i customize the palette ; you should do that only in
your editor to make sure you change only your palette, and it is better
to have your own palette edit parts and customize them in the way you like.
To provide a specialized editor for your diagram you can use
AbstractEditorProvider.
i hope this helps
> Hi Anthony,
> thank you for your answer.
>
> The discussion will continue on the bugzilla, I guess.
> Anthony Hunter wrote:
>> Antoine
>>
>> The settings for the palette match the workbench settings. You can
>> open the Palette view to move the palette into a view. You will see
>> exactly how the colours match the workbench settings (Font, colour,
>> etc.).
>>
>> There is no API to change these settings, so I will change your
>> Bugzilla below to an enhancement request.
>>
>> Cheers...
>> Anthony
>>
>> "Antoine Toulmé" <atoulme@intalio.com> wrote in message
>> news:eibhga$bke$1@utils.eclipse.org...
>>> I filed a bug regarding this question :
>>>
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=163163
>>>
>>> Regards,
>>>
>>> Antoine Toulmé
>>>
>>>
>>> Antoine Toulmé wrote:
>>>> Hi,
>>>> is there a way to change the palette colors ?
>>>>
>>>> Regards,
>>>>
>>>> Antoine Toulmé
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 1.05484 seconds