Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Palette and Editor
Palette and Editor [message #232494] Mon, 02 April 2007 06:29 Go to next message
Eclipse UserFriend
Originally posted by: tan.janice.gmail.com

hi,

i have a palette which creates some shapes on my graphical editor.
however, i had set some constrains when the shapes a created when dragged
from the palette. such that a particular shape can only be created once.
when i open multiple editors, and have already created that shape in one
of the editors, i am not able to drag out/ create the shape on the other
editor. is this due to all editors sharing the same palette?
or am i doing it wrongly by constraining the execute() method in the
ShapeCreateCommand class?
is there a way that each instance of the editor created will have its one
palette ...?
Re: Palette and Editor [message #232509 is a reply to message #232494] Mon, 02 April 2007 11:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: till.tillamma.de

Hi,

I'm not sure what you want to do, But wouldnt it be easier to create an
EditPolicy which holds the constraint and install it on the editor?

That way you wouldnt limit the palette(-tool) functionality and you
could set a limit on the shapes for each editor.

It is the way i would try to solve the problem but as i am not sure what
you are trying to do there might be a diffrent solution.

---
Till
Re: Palette and Editor [message #232523 is a reply to message #232494] Mon, 02 April 2007 17:50 Go to previous message
Eclipse UserFriend
Originally posted by: ""modica\".$nospam$cs.tu-berlin.de"

I'm a bit confused about what you have in your editor.
Do you mean shapes as Figures in your editor or are there Shapes (as
classes) in your model?
And where or how do you set constrains when dragging? In the model?

Cheers

Tony

janice schrieb:
> hi,
>
> i have a palette which creates some shapes on my graphical editor.
> however, i had set some constrains when the shapes a created when
> dragged from the palette. such that a particular shape can only be
> created once. when i open multiple editors, and have already created
> that shape in one of the editors, i am not able to drag out/ create the
> shape on the other editor. is this due to all editors sharing the same
> palette?
> or am i doing it wrongly by constraining the execute() method in the
> ShapeCreateCommand class?
> is there a way that each instance of the editor created will have its
> one palette ...?
Previous Topic:Separate Outline and Overview
Next Topic:Status of Gef Project
Goto Forum:
  


Current Time: Fri Mar 29 14:26:02 GMT 2024

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

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

Back to the top