Re: [Thinlet-development] thinlet/src/java/thinlet Thinlet.java,1.16,1.17
Brought to you by:
bajzat
From: Stephen C. <sco...@bt...> - 2004-10-05 23:43:44
|
Can we make these public? Most thinlet API methods are public so they can be called from handler classes that are not subclasses of Thinlet. Stephen ----- Original Message ----- From: "Andrzej Bialecki" <ab...@us...> To: <thi...@li...> > Update of /cvsroot/thinlet/thinlet/src/java/thinlet > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3138 > > Modified Files: > Thinlet.java > Log Message: > Change some of the more useful methods from private to protected. > > > Index: Thinlet.java > =================================================================== > RCS file: /cvsroot/thinlet/thinlet/src/java/thinlet/Thinlet.java,v > retrieving revision 1.16 > retrieving revision 1.17 > diff -u -d -r1.16 -r1.17 > --- Thinlet.java 4 Oct 2004 21:27:53 -0000 1.16 > +++ Thinlet.java 4 Oct 2004 23:22:26 -0000 1.17 > @@ -178,7 +178,7 @@ > /** > * > */ > - private void doLayout(Object component) { > + protected void doLayout(Object component) { > String classname = getClass(component); > if ("combobox" == classname) { > if (getBoolean(component, "editable", true)) { > @@ -2242,7 +2242,7 @@ > // == classname)) > Object lead = get(component, ":lead"); > if (getIndex(component, lead) == -1) { > - set(component, ":lead", lead = null); > + set(component, ":lead", lead = null); > } > int[] columnwidths = ("table" == classname) ? ((int[]) get(component, ":widths")) : null; > boolean line = getBoolean(component, "line", true); > @@ -4441,7 +4441,7 @@ > /** > * > */ > - private boolean invoke(Object component, Object part, String event) { > + protected boolean invoke(Object component, Object part, String event) { > Object method = get(component, event); > if (method != null) { > if (focusowner != null && "action".equals(event)) requestFocus(component); > @@ -4869,7 +4869,7 @@ > * @param component a focusable component > * @return true if the focusowner was changed, otherwise false > */ > - private boolean setFocus(Object component) { > + protected boolean setFocus(Object component) { > if (!focusinside) { // request focus for the thinlet component > requestFocus(); > } > @@ -5278,6 +5278,7 @@ > * > */ > private int getIndex(Object component, Object value) { > + if (value == null) return -1; > int index = 0; > for (Object item = get(component, ":comp"); item != null; item = get(item, ":next")) { > if (value == item) { > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Thinlet-development mailing list > Thi...@li... > https://lists.sourceforge.net/lists/listinfo/thinlet-development |