From: Kevin <ke...@ke...> - 2003-05-19 17:28:46
|
See below. "Raymond Irving" <xw...@ya...> wrote: > Hi, > > I've looked at the setBorder(objectparam) design but > because we have to always create a object {} as for > the inputed params that method will be slower than the > setBorder(b,c) or setBorder2(b,c) methods. I would > like to suggest that we do the following: Perhaps we need to rethink the interface. One idea with strings: // like css border-width:1px 4px 4px 1px; var widths="1 4 4 1" // like css this defaults bottom=top left=right etc. var imgSides="imgtop.png imgright.png" // have similar default order for corners var imgCorners="imgtopright.gif imgbottomright.gif imgbottomleft.gif imgtopleft.gif" var content1=parentwidget.addChild(new DynLayer(...)) // widths gives all corner/side/image/anchor data var frame1=new Frame(widths,null,null,imgSides,imgCorners); var container1=content1.addBorderFrame(frame1) // ? or whatever method name > setInnerBorder(b,c) - same as setBorder() - only > colors will be supported // perhaps instead: var widths="2 1" // ie. 2 1 2 1 var colSides="red green #eeeeee blue" var container1=content1.addBorder(widths,colSides) > setOuterBorder(b,c) - uses kevin's new setBorder2() > design with images // change to: var frame1=new Frame(widths,colSides,colCorners,imgSides,imgCorners); // or 4 params var frame1=new Frame(widths,colSides,imgSides,imgCorners); Maybe just 4 params? Would we want a differnent corner color to show through a transparent gif? Well this is my thinking so far. A bit more to do but I tend to agree with Benoit's Frame instance idea. Now the user would have to know they are dealing with a different container object and this removes my naff copy to a new content layer :) Also like Raymond mentioned no performance problem with a big dictionary object - just 4 or 5 strings to parse. And no "bottom-right ..." names because of the agreed css+ order. I used "ne ... nw" etc.. to save a lot of typing. > what do you think about calling the functions > setInnerBorder() and setOuterBorder()? Please give > some feedback on these as soon as posible as I'm > getting ready to send some changes to the CVS IMO we shouldn't have inner borders as they clip the content. Any comment about the above re-design? - Kevin > -- > Raymond Irving > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: If flattening out C++ or Java > code to make your application fit in a relational database is painful, > don't do it! Check out ObjectStore. Now part of Progress Software. > http://www.objectstore.net/sourceforge > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://www.mail-archive.com/dyn...@li.../ |