[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Re: fillGradient on a Figure
|
> Hi,
>
> I've got a Figure which contains a title bar and a content pane. The
> content pane is of type 'RectangleFigure'. I would like to fill the
> content pane with a gradient color.
> Overriding the paintFigure(Graphics g) method did not succeed:
>
> paintFigure(Graphics g) {
> super.paintFigure(g);
> g.fillGradient(this.getContentPane().getClientArea(), true);
> }
You could switch to using a plain Figure for the content pane and it
wouldn't cover up your gradient.
Or...
> Then I thought of overriding the method fillShape(Graphics g) of
> RectangleFigure but that did not work either. The colors aren't changed in
> any way.
Put a breakpoint to see if the method is called. Also, the foreground and BG
colors are important.