Hi all, we could look at this as an improvement for 2.1 if a small api change/addition has to be done.
A related jira issue would be welcome (if possible adding the same attach granted as usable in asf derived work). Bye Il giorno 10/dic/2011 23:36, "pavan vadavalli" <[email protected]> ha scritto: > Hi Chris, > Thanks for the response , the option of overwriting the setMaximized is > feasible since i have already extended Frame. I will let you know the > results. > > Attached is a simple demo of java Frame maximize respecting the Bounds set > in the form of Rectangle. > > Thanks and Regards, > Pavan > On Sunday, 11 December 2011 9:20:49 AM, Chris Bartlett wrote: > >> >> On 11 December 2011 05:02, pavan >> vadavalli<pavan.vadavalli@**gmail.com<[email protected]>> >> wrote: >> >>> >>> I have looked at the TerraframeSkin, there is no specific plug points >>> where >>> i can plugin the code for Maximize button functionality at the >>> Customization >>> skin without touching the Pivot code. >>> >> >> >> Creating a custom skin (and component) that extends an existing Pivot >> one does not have to be difficult, but unfortunately it is not >> something that has been documented as far as I am aware. I know I >> have posted example apps to the mailing lists in the past that use >> custom skins, so I will try to find one and point you to it as a >> reference. >> >> After a very quick scan of the TerraFrameSkin source, it looks like >> the ButtonPressListener on line 314 is what you would need to modify >> to alter the current behaviour. >> >> However, you might be able to listen for the maximized event of the >> Frame and insert some custom code in the listener, but I don't have >> time to look into it to confirm. >> http://pivot.apache.org/2.0/**docs/api/org/apache/pivot/wtk/** >> WindowListener.html#**maximizedChanged(org.apache.**pivot.wtk.Window)<http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/WindowListener.html#maximizedChanged(org.apache.pivot.wtk.Window)> >> >> What about extending Frame and overriding setMaximized() there? >> http://pivot.apache.org/2.0/**docs/api/org/apache/pivot/wtk/** >> Window.html#setMaximized(**boolean)<http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Window.html#setMaximized(boolean)> >> >> >> >>> By the way , Dont you think this a bug from API perspective that Max >>> limits >>> are not considered? >>> >> >> >> I don't think so myself, but that is just my opinion. I understand >> your point of view though and would be interested to know what other >> OSs and UI toolkits do in this scenario. >> >> >> >> >> >>> >>> Thanks and Regards >>> Pavan >>> >>> >>> On Sunday, 11 December 2011 8:51:09 AM, Chris Bartlett wrote: >>> >>>> >>>> >>>> On 11 December 2011 04:33, pavan >>>> vadavalli<pavan.vadavalli@**gmail.com<[email protected]> >>>> > >>>> wrote: >>>> >>>>> >>>>> >>>>> Hi, >>>>> I have tried to set the Height and Width limits for a Frame. >>>>> But when i click on the Maximize button , these limits are not >>>>> considered >>>>> and the Frame is expanded to the limits of Display. >>>>> >>>>> Is there any other way to limit this? >>>>> >>>>> Basically i was trying to restrict the length and width of the Frame to >>>>> not >>>>> to cross a specific components limits. >>>>> >>>>> Thanks and Regards, >>>>> Pavan >>>>> >>>> >>>> >>>> >>>> As you noted, Pivot's built in maximized Window functionality won't help >>>> you. >>>> >>>> You should be able to override the behaviour of the maximize/minimize >>>> button and run some custom code to resize/relocate the Frame according >>>> to your specific requirements. >>>> >>>> The source for the default Frame skin is here >>>> >>>> http://svn.apache.org/repos/**asf/pivot/trunk/wtk-terra/src/** >>>> org/apache/pivot/wtk/skin/**terra/TerraFrameSkin.java<http://svn.apache.org/repos/asf/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFrameSkin.java> >>>> >>>> Chris >>>> >>>
