Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Help in Palette
Help in Palette [message #224048] Wed, 11 October 2006 10:55 Go to next message
Eclipse UserFriend
Originally posted by: gaurav.v.bagga.gmail.com

Lets say my normal palette has the following entries

A
B
C
D
E


Now there is a requirement to add Entries with in the existing palete
Entry just like submenu...

A
B
|_F
|_G
C
D
|_H
|_I
E

Can someone guide me how can i add submenu kind of feature in my palette
!!
Re: Help in Palette [message #224104 is a reply to message #224048] Wed, 11 October 2006 15:27 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

It's not a tree, so there's no way to do exactly what you want. You can try
using a PaletteStack (see its use in the logic example's palette). Or just
list all 3 together and put a separator around them.

"Gaurav Bagga" <gaurav.v.bagga@gmail.com> wrote in message
news:eb3ae7210cc2538553050e574d6498ea$1@www.eclipse.org...
> Lets say my normal palette has the following entries
>
> A
> B
> C
> D
> E
>
>
> Now there is a requirement to add Entries with in the existing palete
> Entry just like submenu...
>
> A
> B
> |_F
> |_G
> C
> D
> |_H
> |_I
> E
>
> Can someone guide me how can i add submenu kind of feature in my palette
> !!
>
>
Re: Help in Palette [message #224148 is a reply to message #224104] Wed, 11 October 2006 13:47 Go to previous message
Sebastián Gurin is currently offline Sebastián GurinFriend
Messages: 43
Registered: July 2009
Member
On Wed, 11 Oct 2006 11:27:36 -0400
"Pratik Shah" <none@unknown.com> wrote:

> It's not a tree, so there's no way to do exactly what you want. You can try
> using a PaletteStack (see its use in the logic example's palette). Or just
> list all 3 together and put a separator around them.

you can also use a PaletteDrawer since it behaves like a tree (it is like a box of tools you can expand/colapse). For example, here is a Palette drawer with 2 creation tools:

private static PaletteContainer createComponentsDrawer() {
PaletteDrawer componentsDrawer = new PaletteDrawer("Components");

//label
ToolEntry label = new CombinedTemplateCreationEntry(
"Label",
"create a text label",
LabelWidget.class,
new org.spforms.model.WidgetFactory(LabelWidget.class, "pepe", "valorInicial"),
ImageDescriptor.createFromFile(SPFormsPlugin.class, "icons/text24.gif"),
ImageDescriptor.createFromFile(SPFormsPlugin.class, "icons/text24.gif"));
componentsDrawer.add(label);
tools.put(LABEL_TOOL_ID, label);

//text
ToolEntry text=new CombinedTemplateCreationEntry(
"Text",
"create a box with enriched text",
RichTextWidget.class,
new org.spforms.model.WidgetFactory(RichTextWidget.class, "pepe", "valorInicial"),
ImageDescriptor.createFromFile(SPFormsPlugin.class, "icons/richText24.png"),
ImageDescriptor.createFromFile(SPFormsPlugin.class, "icons/richText24.png"));
componentsDrawer.add(text);
tools.put(TEXT_TOOL_ID, text);

return componentsDrawer;
}


>
> "Gaurav Bagga" <gaurav.v.bagga@gmail.com> wrote in message
> news:eb3ae7210cc2538553050e574d6498ea$1@www.eclipse.org...
> > Lets say my normal palette has the following entries
> >
> > A
> > B
> > C
> > D
> > E
> >
> >
> > Now there is a requirement to add Entries with in the existing palete
> > Entry just like submenu...
> >
> > A
> > B
> > |_F
> > |_G
> > C
> > D
> > |_H
> > |_I
> > E
> >
> > Can someone guide me how can i add submenu kind of feature in my palette
> > !!
> >
> >
>
>
Previous Topic:Problems with gradients in rounded rectangles
Next Topic:Problem with connection and anchor
Goto Forum:
  


Current Time: Sat Dec 04 14:36:14 GMT 2021

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

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

Back to the top