Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » changing background color of palette
changing background color of palette [message #151404] Mon, 20 September 2004 09:17 Go to next message
Marion Schmid is currently offline Marion SchmidFriend
Messages: 35
Registered: July 2009
Member
Hello!
I'm currently trying to somehow change the background color of the palette
from windows standard grey to white for example. Unfortunately, I did not
yet succeed, only changed the color of the FlyoutPaletteComposite splitter,
but that was not actually what I wanted. Could anyone of you give me some
hints, please?
Thanks a lot!

marion
Re: changing background color of palette [message #151415 is a reply to message #151404] Mon, 20 September 2004 14:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You will get a white background if you use TemplateEntry instead of
ToolEntry inside the drawers. But with tools, the buttons will not be
painted correctly if the background were white. I've never seen a white
toolbar before. It's intentially gray to look like the rest of the UI.

Templates are drag sources only similar to the visio palette.

"Marion Schmid" <marion.schmid@sap.com> wrote in message
news:cim702$qhi$1@eclipse.org...
> Hello!
> I'm currently trying to somehow change the background color of the palette
> from windows standard grey to white for example. Unfortunately, I did not
> yet succeed, only changed the color of the FlyoutPaletteComposite
splitter,
> but that was not actually what I wanted. Could anyone of you give me some
> hints, please?
> Thanks a lot!
>
> marion
>
>
Re: changing background color of palette [message #151691 is a reply to message #151415] Wed, 22 September 2004 15:32 Go to previous messageGo to next message
Marion Schmid is currently offline Marion SchmidFriend
Messages: 35
Registered: July 2009
Member
Hello Randy and community,

I suppose you meant PaletteTemplateEntry, as I could not find a
TemplateEntry class.
Anyway, I don't really understand the meaning of the PaletteTemplateEntry,
i.e. what kind of template to set.
Can I change the look of the palette with this template somehow or am I
totally wrong here?

I tried out a little bit with replacing the ToolEntries in my drawers with
PaletteTemplateEntry in the probably strange way

// ToolEntry tool = new PanningSelectionToolEntry(); /* replaced by ...*/
PaletteTemplateEntry tool = new
PaletteTemplateEntry(GEFMessages.SelectionTool_Label,null,nu ll,SharedImages.
DESC_SELECTION_TOOL_16,
SharedImages.DESC_SELECTION_TOOL_24);

- but the behaviour was quite strange: grey palette background,
on-mouse-over on the tools, the text label's background changed to a darker
grey - so I did not really understand what I was doing here...
I suppose I forgot something... ?

I wonder, if there are any plans to make some kind of FlatLook-Palette, i.e.
a look and feel like in the PDE. Wouldn't this look nice?

Why I got this idea: I saw a screenshot in eclipsewiki:
http://eclipsewiki.swiki.net/50#hellogef6 and wonder if a palette could also
look somehow like this.

Except changing the GEF-Palette's background color with a hack I got from a
colleague - it was sth. like
getPaletteViewer.getRootEditPart.getContentPane.getChildren. get(0) and then
with multiple casts changed the background color of the figure, I did not
really succeed ...
Maybe it wasn't meant to do so, hm?

Best regards,
Marion


"Randy Hudson" <none@us.ibm.com> wrote in message
news:cimp65$1lq$1@eclipse.org...
> You will get a white background if you use TemplateEntry instead of
> ToolEntry inside the drawers. But with tools, the buttons will not be
> painted correctly if the background were white. I've never seen a white
> toolbar before. It's intentially gray to look like the rest of the UI.
>
> Templates are drag sources only similar to the visio palette.
>
> "Marion Schmid" <marion.schmid@sap.com> wrote in message
> news:cim702$qhi$1@eclipse.org...
> > Hello!
> > I'm currently trying to somehow change the background color of the
palette
> > from windows standard grey to white for example. Unfortunately, I did
not
> > yet succeed, only changed the color of the FlyoutPaletteComposite
> splitter,
> > but that was not actually what I wanted. Could anyone of you give me
some
> > hints, please?
> > Thanks a lot!
> >
> > marion
> >
> >
>
>
Re: changing background color of palette [message #151707 is a reply to message #151691] Wed, 22 September 2004 17:41 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
"Marion Schmid" <marion.schmid@sap.com> wrote in message
news:cis5mv$uh4$1@eclipse.org...
> Hello Randy and community,
>
> I suppose you meant PaletteTemplateEntry, as I could not find a
> TemplateEntry class.
> Anyway, I don't really understand the meaning of the PaletteTemplateEntry,
> i.e. what kind of template to set.
> Can I change the look of the palette with this template somehow or am I
> totally wrong here?
>
> I tried out a little bit with replacing the ToolEntries in my drawers with
> PaletteTemplateEntry in the probably strange way
>
> // ToolEntry tool = new PanningSelectionToolEntry(); /* replaced by
....*/
> PaletteTemplateEntry tool = new
>
PaletteTemplateEntry(GEFMessages.SelectionTool_Label,null,nu ll,SharedImages.
> DESC_SELECTION_TOOL_16,
> SharedImages.DESC_SELECTION_TOOL_24);
>
> - but the behaviour was quite strange: grey palette background,
> on-mouse-over on the tools, the text label's background changed to a
darker
> grey - so I did not really understand what I was doing here...
> I suppose I forgot something... ?

####
Can you attach a screenshot of what you saw? You can't have a mix of tools
and templates in a drawer.

>
> I wonder, if there are any plans to make some kind of FlatLook-Palette,
i.e.
> a look and feel like in the PDE. Wouldn't this look nice?
>
> Why I got this idea: I saw a screenshot in eclipsewiki:
> http://eclipsewiki.swiki.net/50#hellogef6 and wonder if a palette could
also
> look somehow like this.

####
That is the old look of this palette. It was changed to conserve space and
to make the palette look native when it has "buttons" on it.

>
> Except changing the GEF-Palette's background color with a hack I got from
a
> colleague - it was sth. like
> getPaletteViewer.getRootEditPart.getContentPane.getChildren. get(0) and
then
> with multiple casts changed the background color of the figure, I did not
> really succeed ...
> Maybe it wasn't meant to do so, hm?
>
> Best regards,
> Marion
>
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:cimp65$1lq$1@eclipse.org...
> > You will get a white background if you use TemplateEntry instead of
> > ToolEntry inside the drawers. But with tools, the buttons will not be
> > painted correctly if the background were white. I've never seen a white
> > toolbar before. It's intentially gray to look like the rest of the UI.
> >
> > Templates are drag sources only similar to the visio palette.
> >
> > "Marion Schmid" <marion.schmid@sap.com> wrote in message
> > news:cim702$qhi$1@eclipse.org...
> > > Hello!
> > > I'm currently trying to somehow change the background color of the
> palette
> > > from windows standard grey to white for example. Unfortunately, I did
> not
> > > yet succeed, only changed the color of the FlyoutPaletteComposite
> > splitter,
> > > but that was not actually what I wanted. Could anyone of you give me
> some
> > > hints, please?
> > > Thanks a lot!
> > >
> > > marion
> > >
> > >
> >
> >
>
>
Re: changing background color of palette [message #151767 is a reply to message #151691] Wed, 22 September 2004 22:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Templates are meant to be used with Drag and Drop, not tools. I believe
there is commented code in the logic example which you can uncomment which
will create template drawers. Templates are not tools, they are just drag
sources. Clicking on them does not do anything.

The template Object can be anything you want for your application. Your
DropTargetListener must interpret the template object and update the create
command appropriately.

The logic example uses combined Tool+Template entries, so you can see the
functionality, but not the white background.

"Marion Schmid" <marion.schmid@sap.com> wrote in message
news:cis5mv$uh4$1@eclipse.org...
> Hello Randy and community,
>
> I suppose you meant PaletteTemplateEntry, as I could not find a
> TemplateEntry class.
> Anyway, I don't really understand the meaning of the PaletteTemplateEntry,
> i.e. what kind of template to set.
> Can I change the look of the palette with this template somehow or am I
> totally wrong here?
>
> I tried out a little bit with replacing the ToolEntries in my drawers with
> PaletteTemplateEntry in the probably strange way
>
> // ToolEntry tool = new PanningSelectionToolEntry(); /* replaced by
....*/
> PaletteTemplateEntry tool = new
>
PaletteTemplateEntry(GEFMessages.SelectionTool_Label,null,nu ll,SharedImages.
> DESC_SELECTION_TOOL_16,
> SharedImages.DESC_SELECTION_TOOL_24);
>
> - but the behaviour was quite strange: grey palette background,
> on-mouse-over on the tools, the text label's background changed to a
darker
> grey - so I did not really understand what I was doing here...
> I suppose I forgot something... ?
>
> I wonder, if there are any plans to make some kind of FlatLook-Palette,
i.e.
> a look and feel like in the PDE. Wouldn't this look nice?
>
> Why I got this idea: I saw a screenshot in eclipsewiki:
> http://eclipsewiki.swiki.net/50#hellogef6 and wonder if a palette could
also
> look somehow like this.
>
> Except changing the GEF-Palette's background color with a hack I got from
a
> colleague - it was sth. like
> getPaletteViewer.getRootEditPart.getContentPane.getChildren. get(0) and
then
> with multiple casts changed the background color of the figure, I did not
> really succeed ...
> Maybe it wasn't meant to do so, hm?
>
> Best regards,
> Marion
>
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:cimp65$1lq$1@eclipse.org...
> > You will get a white background if you use TemplateEntry instead of
> > ToolEntry inside the drawers. But with tools, the buttons will not be
> > painted correctly if the background were white. I've never seen a white
> > toolbar before. It's intentially gray to look like the rest of the UI.
> >
> > Templates are drag sources only similar to the visio palette.
> >
> > "Marion Schmid" <marion.schmid@sap.com> wrote in message
> > news:cim702$qhi$1@eclipse.org...
> > > Hello!
> > > I'm currently trying to somehow change the background color of the
> palette
> > > from windows standard grey to white for example. Unfortunately, I did
> not
> > > yet succeed, only changed the color of the FlyoutPaletteComposite
> > splitter,
> > > but that was not actually what I wanted. Could anyone of you give me
> some
> > > hints, please?
> > > Thanks a lot!
> > >
> > > marion
> > >
> > >
> >
> >
>
>
Re: changing background color of palette [message #151797 is a reply to message #151707] Thu, 23 September 2004 08:21 Go to previous messageGo to next message
Marion Schmid is currently offline Marion SchmidFriend
Messages: 35
Registered: July 2009
Member
Hello !

> Templates are meant to be used with Drag and Drop, not tools. I believe
> there is commented code in the logic example which you can uncomment which
> will create template drawers. Templates are not tools, they are just drag
> sources. Clicking on them does not do anything.

You're right, sorry for the commotion - it was my mistake - I used a
PaletteGroup instead of the Drawer, that's why the palette's background
looks grey as in the screenshot I (now unnecessarily) added.

// PaletteGroup controlGroup = new
PaletteGroup(GenericEditorPlugin.getString("%_palette_standard_group "));
PaletteDrawer drawer = new
PaletteDrawer(GenericEditorPlugin.getString("%_palette_standard_group "));

List entries = new ArrayList();

// selection tool
PaletteTemplateEntry tool = new
PaletteTemplateEntry(GEFMessages.SelectionTool_Label,null,nu ll,SharedImages.
DESC_SELECTION_TOOL_16,
SharedImages.DESC_SELECTION_TOOL_24);

So, Pratik, with the PaletteGroup it looks like in the screenshot, with the
drawer white, but as I don't need this drag'n'drop stuff here, it does not
make sense for me to use it.

> > - but the behaviour was quite strange: grey palette background,
> > on-mouse-over on the tools, the text label's background changed to a
> darker
> > grey - so I did not really understand what I was doing here...
> > I suppose I forgot something... ?
>
> ####
> Can you attach a screenshot of what you saw? You can't have a mix of
tools
> and templates in a drawer.

well, in the screenshot the creation tools are still ToolEntries, but of
course mixing does not make great sense...

> > Why I got this idea: I saw a screenshot in eclipsewiki:
> > http://eclipsewiki.swiki.net/50#hellogef6 and wonder if a palette could
> also
> > look somehow like this.
>
> ####
> That is the old look of this palette. It was changed to conserve space
and
> to make the palette look native when it has "buttons" on it.

Ok, now I see - I supposed something like this, because I could not find
anything special in these examples ;-)

Another question - I saw that the palette is only accessible when you
provide a description to each entry. For me that's enough, but I wonder if
there are any plans to make the palette totally accessible.

Thank you !

marion

------------------------------------------------------------ ----------------
-------------
"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:cisd7l$el5$1@eclipse.org...
>
> "Marion Schmid" <marion.schmid@sap.com> wrote in message
> news:cis5mv$uh4$1@eclipse.org...
> > Hello Randy and community,
> >
> > I suppose you meant PaletteTemplateEntry, as I could not find a
> > TemplateEntry class.
> > Anyway, I don't really understand the meaning of the
PaletteTemplateEntry,
> > i.e. what kind of template to set.
> > Can I change the look of the palette with this template somehow or am I
> > totally wrong here?
> >
> > I tried out a little bit with replacing the ToolEntries in my drawers
with
> > PaletteTemplateEntry in the probably strange way
> >
> > // ToolEntry tool = new PanningSelectionToolEntry(); /* replaced by
> ...*/
> > PaletteTemplateEntry tool = new
> >
>
PaletteTemplateEntry(GEFMessages.SelectionTool_Label,null,nu ll,SharedImages.
> > DESC_SELECTION_TOOL_16,
> > SharedImages.DESC_SELECTION_TOOL_24);
> >
> > - but the behaviour was quite strange: grey palette background,
> > on-mouse-over on the tools, the text label's background changed to a
> darker
> > grey - so I did not really understand what I was doing here...
> > I suppose I forgot something... ?
>
> ####
> Can you attach a screenshot of what you saw? You can't have a mix of
tools
> and templates in a drawer.
>
> >
> > I wonder, if there are any plans to make some kind of FlatLook-Palette,
> i.e.
> > a look and feel like in the PDE. Wouldn't this look nice?
> >
> > Why I got this idea: I saw a screenshot in eclipsewiki:
> > http://eclipsewiki.swiki.net/50#hellogef6 and wonder if a palette could
> also
> > look somehow like this.
>
> ####
> That is the old look of this palette. It was changed to conserve space
and
> to make the palette look native when it has "buttons" on it.
>
> >
> > Except changing the GEF-Palette's background color with a hack I got
from
> a
> > colleague - it was sth. like
> > getPaletteViewer.getRootEditPart.getContentPane.getChildren. get(0) and
> then
> > with multiple casts changed the background color of the figure, I did
not
> > really succeed ...
> > Maybe it wasn't meant to do so, hm?
> >
> > Best regards,
> > Marion
> >
> >
> > "Randy Hudson" <none@us.ibm.com> wrote in message
> > news:cimp65$1lq$1@eclipse.org...
> > > You will get a white background if you use TemplateEntry instead of
> > > ToolEntry inside the drawers. But with tools, the buttons will not be
> > > painted correctly if the background were white. I've never seen a
white
> > > toolbar before. It's intentially gray to look like the rest of the
UI.
> > >
> > > Templates are drag sources only similar to the visio palette.
> > >
> > > "Marion Schmid" <marion.schmid@sap.com> wrote in message
> > > news:cim702$qhi$1@eclipse.org...
> > > > Hello!
> > > > I'm currently trying to somehow change the background color of the
> > palette
> > > > from windows standard grey to white for example. Unfortunately, I
did
> > not
> > > > yet succeed, only changed the color of the FlyoutPaletteComposite
> > > splitter,
> > > > but that was not actually what I wanted. Could anyone of you give me
> > some
> > > > hints, please?
> > > > Thanks a lot!
> > > >
> > > > marion
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Re: changing background color of palette [message #151873 is a reply to message #151797] Thu, 23 September 2004 22:07 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
> Another question - I saw that the palette is only accessible when you
> provide a description to each entry. For me that's enough, but I wonder if
> there are any plans to make the palette totally accessible.

I am not sure what you mean by that. The palette IS completely accessible.


"Marion Schmid" <marion.schmid@sap.com> wrote in message
news:ciu0pj$u3f$1@eclipse.org...
> Hello !
>
> > Templates are meant to be used with Drag and Drop, not tools. I believe
> > there is commented code in the logic example which you can uncomment
which
> > will create template drawers. Templates are not tools, they are just
drag
> > sources. Clicking on them does not do anything.
>
> You're right, sorry for the commotion - it was my mistake - I used a
> PaletteGroup instead of the Drawer, that's why the palette's background
> looks grey as in the screenshot I (now unnecessarily) added.
>
> // PaletteGroup controlGroup = new
> PaletteGroup(GenericEditorPlugin.getString("%_palette_standard_group "));
> PaletteDrawer drawer = new
> PaletteDrawer(GenericEditorPlugin.getString("%_palette_standard_group "));
>
> List entries = new ArrayList();
>
> // selection tool
> PaletteTemplateEntry tool = new
>
PaletteTemplateEntry(GEFMessages.SelectionTool_Label,null,nu ll,SharedImages.
> DESC_SELECTION_TOOL_16,
> SharedImages.DESC_SELECTION_TOOL_24);
>
> So, Pratik, with the PaletteGroup it looks like in the screenshot, with
the
> drawer white, but as I don't need this drag'n'drop stuff here, it does not
> make sense for me to use it.
>
> > > - but the behaviour was quite strange: grey palette background,
> > > on-mouse-over on the tools, the text label's background changed to a
> > darker
> > > grey - so I did not really understand what I was doing here...
> > > I suppose I forgot something... ?
> >
> > ####
> > Can you attach a screenshot of what you saw? You can't have a mix of
> tools
> > and templates in a drawer.
>
> well, in the screenshot the creation tools are still ToolEntries, but of
> course mixing does not make great sense...
>
> > > Why I got this idea: I saw a screenshot in eclipsewiki:
> > > http://eclipsewiki.swiki.net/50#hellogef6 and wonder if a palette
could
> > also
> > > look somehow like this.
> >
> > ####
> > That is the old look of this palette. It was changed to conserve space
> and
> > to make the palette look native when it has "buttons" on it.
>
> Ok, now I see - I supposed something like this, because I could not find
> anything special in these examples ;-)
>
> Another question - I saw that the palette is only accessible when you
> provide a description to each entry. For me that's enough, but I wonder if
> there are any plans to make the palette totally accessible.
>
> Thank you !
>
> marion
>
> ------------------------------------------------------------ --------------
--
> -------------
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:cisd7l$el5$1@eclipse.org...
> >
> > "Marion Schmid" <marion.schmid@sap.com> wrote in message
> > news:cis5mv$uh4$1@eclipse.org...
> > > Hello Randy and community,
> > >
> > > I suppose you meant PaletteTemplateEntry, as I could not find a
> > > TemplateEntry class.
> > > Anyway, I don't really understand the meaning of the
> PaletteTemplateEntry,
> > > i.e. what kind of template to set.
> > > Can I change the look of the palette with this template somehow or am
I
> > > totally wrong here?
> > >
> > > I tried out a little bit with replacing the ToolEntries in my drawers
> with
> > > PaletteTemplateEntry in the probably strange way
> > >
> > > // ToolEntry tool = new PanningSelectionToolEntry(); /* replaced by
> > ...*/
> > > PaletteTemplateEntry tool = new
> > >
> >
>
PaletteTemplateEntry(GEFMessages.SelectionTool_Label,null,nu ll,SharedImages.
> > > DESC_SELECTION_TOOL_16,
> > > SharedImages.DESC_SELECTION_TOOL_24);
> > >
> > > - but the behaviour was quite strange: grey palette background,
> > > on-mouse-over on the tools, the text label's background changed to a
> > darker
> > > grey - so I did not really understand what I was doing here...
> > > I suppose I forgot something... ?
> >
> > ####
> > Can you attach a screenshot of what you saw? You can't have a mix of
> tools
> > and templates in a drawer.
> >
> > >
> > > I wonder, if there are any plans to make some kind of
FlatLook-Palette,
> > i.e.
> > > a look and feel like in the PDE. Wouldn't this look nice?
> > >
> > > Why I got this idea: I saw a screenshot in eclipsewiki:
> > > http://eclipsewiki.swiki.net/50#hellogef6 and wonder if a palette
could
> > also
> > > look somehow like this.
> >
> > ####
> > That is the old look of this palette. It was changed to conserve space
> and
> > to make the palette look native when it has "buttons" on it.
> >
> > >
> > > Except changing the GEF-Palette's background color with a hack I got
> from
> > a
> > > colleague - it was sth. like
> > > getPaletteViewer.getRootEditPart.getContentPane.getChildren. get(0) and
> > then
> > > with multiple casts changed the background color of the figure, I did
> not
> > > really succeed ...
> > > Maybe it wasn't meant to do so, hm?
> > >
> > > Best regards,
> > > Marion
> > >
> > >
> > > "Randy Hudson" <none@us.ibm.com> wrote in message
> > > news:cimp65$1lq$1@eclipse.org...
> > > > You will get a white background if you use TemplateEntry instead of
> > > > ToolEntry inside the drawers. But with tools, the buttons will not
be
> > > > painted correctly if the background were white. I've never seen a
> white
> > > > toolbar before. It's intentially gray to look like the rest of the
> UI.
> > > >
> > > > Templates are drag sources only similar to the visio palette.
> > > >
> > > > "Marion Schmid" <marion.schmid@sap.com> wrote in message
> > > > news:cim702$qhi$1@eclipse.org...
> > > > > Hello!
> > > > > I'm currently trying to somehow change the background color of the
> > > palette
> > > > > from windows standard grey to white for example. Unfortunately, I
> did
> > > not
> > > > > yet succeed, only changed the color of the FlyoutPaletteComposite
> > > > splitter,
> > > > > but that was not actually what I wanted. Could anyone of you give
me
> > > some
> > > > > hints, please?
> > > > > Thanks a lot!
> > > > >
> > > > > marion
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
>
Previous Topic:MS Project style interface
Next Topic:TreeViewer Plugin
Goto Forum:
  


Current Time: Sat Sep 21 21:31:09 GMT 2024

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

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

Back to the top