|
Re: getMinimumSize()/getPreferredSize() of Figure [message #69436 is a reply to message #69355] |
Wed, 12 March 2003 15:42 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
I don't understand the question. Why would the model care about
preferred/minimum size?
"yinglcs" <yinglcs@netscape.com> wrote in message
news:b4ltjm$mcu$1@rogue.oti.com...
> I am using the MVC pattern in GEF application. And my (V)iew is a subclass
> of IFigure() which has method of getMinimumSize()/getPreferredSize(). But
> how can the (M)odel find out the minimumSize() and preferred size() of the
> (V)iew?
>
> Only EditPart has reference to both Figure And Model. Model does not have
> reference to Figure.
> But Model itself has the setSize()/getSize() method.
>
> I am studying the Logic Example in GEF.
>
>
>
|
|
|
|
Re: getMinimumSize()/getPreferredSize() of Figure [message #69576 is a reply to message #69475] |
Wed, 12 March 2003 16:35 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
The minimum size is known for simple cases like the gates. They are 17x17
pixels of something like that.
If the size is not known, for example a label, then you will have other
problems anyway. The use may first resize the label, then increase that
label's text, causing its desired size to grow. I think the solution is to
handle this in the layout, not in the model. So, an XYLayout might verify
that a given constraint does not size the figure smaller than it's minimum
size, and if it does, it would correct this. The size in the model would
still be smaller than the figure's minimum size, but this probably doesn't
matter.
"yinglcs" <yinglcs@netscape.com> wrote in message
news:b4nl87$sh4$1@rogue.oti.com...
> The reason I ask this question is LogicSubpart (a model) has a getSize()
and
> setSize() function. What if I want to put a check in the setSize() of the
> model so that is has to be greater than the minimum size?
>
> I don't want user to set the size of a edit part too small. It has to be
> greater than the minimum size. So I am thinking to check this in the
> setSize() of the model. I notice that function (setSize()) get called when
I
> select the figure and resize it.
>
> Thank you.
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:b4nkl2$rv8$1@rogue.oti.com...
> > I don't understand the question. Why would the model care about
> > preferred/minimum size?
> >
> > "yinglcs" <yinglcs@netscape.com> wrote in message
> > news:b4ltjm$mcu$1@rogue.oti.com...
> > > I am using the MVC pattern in GEF application. And my (V)iew is a
> subclass
> > > of IFigure() which has method of getMinimumSize()/getPreferredSize().
> But
> > > how can the (M)odel find out the minimumSize() and preferred size() of
> the
> > > (V)iew?
> > >
> > > Only EditPart has reference to both Figure And Model. Model does not
> have
> > > reference to Figure.
> > > But Model itself has the setSize()/getSize() method.
> > >
> > > I am studying the Logic Example in GEF.
> > >
> > >
> > >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03597 seconds