You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Greg Brown <gk...@mac.com> on 2010/10/25 13:25:52 UTC

Re:

Can you provide a small code sample that demonstrates the problem? Thanks.
G

On Oct 25, 2010, at 3:25 AM, Jérôme Serré wrote:

> Hello,
> 
> Creating Dynamics and views "TablePane.
> 
> When I created a TablePane and that I display in a scrollpane by the time I
> have the following error:
> 
> Exception in thread "AWT-EventQueue-3" java.lang.IllegalArgumentException:
> end (163) is less than value (89) + extent (163)
> 
>                        at
> org.apache.pivot.wtk.ScrollBar.setScope(ScrollBar.java:257)
> 
>                        at
> org.apache.pivot.wtk.skin.ScrollPaneSkin.layoutHelper(ScrollPaneSkin.java:83
> 2)
> 
>                        at
> org.apache.pivot.wtk.skin.ScrollPaneSkin.layout(ScrollPaneSkin.java:572)
> 
>                        at
> org.apache.pivot.wtk.Component.layout(Component.java:1926)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:323)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(Application
> Context.java:656)
> 
>                        at java.awt.Component.dispatchEventImpl(Unknown
> Source)
> 
>                        at java.awt.Component.dispatchEvent(Unknown Source)
> 
>                        at java.awt.EventQueue.dispatchEvent(Unknown Source)
> 
>                        at
> java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> 
>                        at
> java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> 
>                        at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> 
>                        at java.awt.EventDispatchThread.pumpEvents(Unknown
> Source)
> 
>                        at java.awt.EventDispatchThread.pumpEvents(Unknown
> Source)
> 
>                        at java.awt.EventDispatchThread.run(Unknown Source)
> 
> 
> 
> Apparently when the previous vertical scrollbar is displayed and positioned
> at a certain height that creates the error.
> To remedy this I have to move the vertical scrollbar sc.setScrollTop(0); to
> 0  before displaying the next "tablepane" and it works.
> 
> Is this a bug or bad use of my hand?
> 
> 
> 
> Thanks
> 
> 
> 
> --
> 
> Cordialement
> 
> Jérôme Serré
> 
> 
> 
> 


RE: RE:

Posted by Jérôme Serré <je...@gmail.com>.
ok

-----Message d'origine-----
De : Greg Brown [mailto:gkbrown@mac.com] 
Envoyé : mardi 26 octobre 2010 14:12
À : user@pivot.apache.org
Objet : Re: RE:

Hi,

I can't run the attached code because it has external dependencies. Can you
provide a small, self-contained code sample that demonstrates the problem?

Thanks,
Greg

On Oct 25, 2010, at 8:13 AM, Jérôme Serré wrote:

> I attached the file wtkx.
> 
> 
> The code java
> 
> Main : 
> 
> buildHautDroit(cb);
> sp.setScrollTop(0);
> sp.setView(tp);
> bordure.setVisible(true);
> 
> buildHautDroit :
> 
> private void buildHautDroit(CasierBean cb) throws BizException {
>    	try {
>    		int nbCol = cb.getNbColonne();
>    		int nbLigne = cb.getNbLigne();
>    		final int LCASE = 35;
>    		
>    		tp = new TablePane();
>    		tp.setStyles("{horizontalSpacing:1, verticalSpacing:1, " +
>    				"showHorizontalGridLines:true,
> showVerticalGridLines:true, " +
>    				"horizontalGridColor:\'#096A09\',
> verticalGridColor:\'#096A09\'}");
> 
>     		TablePane.ColumnSequence colonnes = tp.getColumns();
> 
>     		for (int j=0; j<nbCol; j++) { colonnes.add(new
> TablePane.Column(LCASE, false)); }
>    		TablePane.RowSequence lignes = tp.getRows();
>    		for (int i=0; i<nbLigne; i++) {
>    			TablePane.Row ligne = new TablePane.Row(LCASE,
> false);
>    	        lignes.add(ligne);
>    			for (int j=0; j<colonnes.getLength(); j++) {
>    				if (cb.getCase(i+1, j+1)!=null) {
>    		    		ImageView im = new
> ImageView(Image.load(cb.getCase(i+1, j+1).getVin().getImgCouleur()));
>    		    		im.setTooltipText(cb.getCase(i+1,
> j+1).getLibelleCase() + " " +
>    		    			cb.getCase(i+1,
> j+1).getVin().getLibelleAoc() + " " +
>    		    			cb.getCase(i+1,
> j+1).getVin().getNomVin() + " " +
>    		    			cb.getCase(i+1,
> j+1).getVin().getMillesime());
> 
> im.getUserData().put(String.valueOf(i+1) + String.valueOf(j+1),
> cb.getCase(i+1, j+1));
>    					ligne.insert(im, j);
>    				} else {
>    					ligne.insert(new TablePane.Filler(),
> j);
>    				}
>    			} 
>    		}
>    	} catch (Exception e) {
>    		throw new BizException(e.getMessage());
>    	}
>    }
> 
> -----Message d'origine-----
> De : Greg Brown [mailto:gkbrown@mac.com] 
> Envoyé : lundi 25 octobre 2010 13:26
> À : user@pivot.apache.org
> Objet : Re:
> 
> Can you provide a small code sample that demonstrates the problem? Thanks.
> G
> 
> On Oct 25, 2010, at 3:25 AM, Jérôme Serré wrote:
> 
>> Hello,
>> 
>> Creating Dynamics and views "TablePane.
>> 
>> When I created a TablePane and that I display in a scrollpane by the time
> I
>> have the following error:
>> 
>> Exception in thread "AWT-EventQueue-3"
java.lang.IllegalArgumentException:
>> end (163) is less than value (89) + extent (163)
>> 
>>                       at
>> org.apache.pivot.wtk.ScrollBar.setScope(ScrollBar.java:257)
>> 
>>                       at
>> 
>
org.apache.pivot.wtk.skin.ScrollPaneSkin.layoutHelper(ScrollPaneSkin.java:83
>> 2)
>> 
>>                       at
>> org.apache.pivot.wtk.skin.ScrollPaneSkin.layout(ScrollPaneSkin.java:572)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.layout(Component.java:1926)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:323)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> 
>
org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(Application
>> Context.java:656)
>> 
>>                       at java.awt.Component.dispatchEventImpl(Unknown
>> Source)
>> 
>>                       at java.awt.Component.dispatchEvent(Unknown Source)
>> 
>>                       at java.awt.EventQueue.dispatchEvent(Unknown
> Source)
>> 
>>                       at
>> java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>> 
>>                       at
>> java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>> 
>>                       at
>> java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>> 
>>                       at java.awt.EventDispatchThread.pumpEvents(Unknown
>> Source)
>> 
>>                       at java.awt.EventDispatchThread.pumpEvents(Unknown
>> Source)
>> 
>>                       at java.awt.EventDispatchThread.run(Unknown Source)
>> 
>> 
>> 
>> Apparently when the previous vertical scrollbar is displayed and
> positioned
>> at a certain height that creates the error.
>> To remedy this I have to move the vertical scrollbar sc.setScrollTop(0);
> to
>> 0  before displaying the next "tablepane" and it works.
>> 
>> Is this a bug or bad use of my hand?
>> 
>> 
>> 
>> Thanks
>> 
>> 
>> 
>> --
>> 
>> Cordialement
>> 
>> Jérôme Serré
>> 
>> 
>> 
>> 
> <hautDroit.wtkx>


RE: RE:

Posted by Jérôme Serré <je...@gmail.com>.
Hello,

I cannot reproduce the error with the code simpler.
So I think it comes from me.
Excuse me for the inconvenience and thank you for your answers.

Jérôme

-----Message d'origine-----
De : Greg Brown [mailto:gkbrown@mac.com] 
Envoyé : mardi 26 octobre 2010 14:12
À : user@pivot.apache.org
Objet : Re: RE:

Hi,

I can't run the attached code because it has external dependencies. Can you
provide a small, self-contained code sample that demonstrates the problem?

Thanks,
Greg

On Oct 25, 2010, at 8:13 AM, Jérôme Serré wrote:

> I attached the file wtkx.
> 
> 
> The code java
> 
> Main : 
> 
> buildHautDroit(cb);
> sp.setScrollTop(0);
> sp.setView(tp);
> bordure.setVisible(true);
> 
> buildHautDroit :
> 
> private void buildHautDroit(CasierBean cb) throws BizException {
>    	try {
>    		int nbCol = cb.getNbColonne();
>    		int nbLigne = cb.getNbLigne();
>    		final int LCASE = 35;
>    		
>    		tp = new TablePane();
>    		tp.setStyles("{horizontalSpacing:1, verticalSpacing:1, " +
>    				"showHorizontalGridLines:true,
> showVerticalGridLines:true, " +
>    				"horizontalGridColor:\'#096A09\',
> verticalGridColor:\'#096A09\'}");
> 
>     		TablePane.ColumnSequence colonnes = tp.getColumns();
> 
>     		for (int j=0; j<nbCol; j++) { colonnes.add(new
> TablePane.Column(LCASE, false)); }
>    		TablePane.RowSequence lignes = tp.getRows();
>    		for (int i=0; i<nbLigne; i++) {
>    			TablePane.Row ligne = new TablePane.Row(LCASE,
> false);
>    	        lignes.add(ligne);
>    			for (int j=0; j<colonnes.getLength(); j++) {
>    				if (cb.getCase(i+1, j+1)!=null) {
>    		    		ImageView im = new
> ImageView(Image.load(cb.getCase(i+1, j+1).getVin().getImgCouleur()));
>    		    		im.setTooltipText(cb.getCase(i+1,
> j+1).getLibelleCase() + " " +
>    		    			cb.getCase(i+1,
> j+1).getVin().getLibelleAoc() + " " +
>    		    			cb.getCase(i+1,
> j+1).getVin().getNomVin() + " " +
>    		    			cb.getCase(i+1,
> j+1).getVin().getMillesime());
> 
> im.getUserData().put(String.valueOf(i+1) + String.valueOf(j+1),
> cb.getCase(i+1, j+1));
>    					ligne.insert(im, j);
>    				} else {
>    					ligne.insert(new TablePane.Filler(),
> j);
>    				}
>    			} 
>    		}
>    	} catch (Exception e) {
>    		throw new BizException(e.getMessage());
>    	}
>    }
> 
> -----Message d'origine-----
> De : Greg Brown [mailto:gkbrown@mac.com] 
> Envoyé : lundi 25 octobre 2010 13:26
> À : user@pivot.apache.org
> Objet : Re:
> 
> Can you provide a small code sample that demonstrates the problem? Thanks.
> G
> 
> On Oct 25, 2010, at 3:25 AM, Jérôme Serré wrote:
> 
>> Hello,
>> 
>> Creating Dynamics and views "TablePane.
>> 
>> When I created a TablePane and that I display in a scrollpane by the time
> I
>> have the following error:
>> 
>> Exception in thread "AWT-EventQueue-3"
java.lang.IllegalArgumentException:
>> end (163) is less than value (89) + extent (163)
>> 
>>                       at
>> org.apache.pivot.wtk.ScrollBar.setScope(ScrollBar.java:257)
>> 
>>                       at
>> 
>
org.apache.pivot.wtk.skin.ScrollPaneSkin.layoutHelper(ScrollPaneSkin.java:83
>> 2)
>> 
>>                       at
>> org.apache.pivot.wtk.skin.ScrollPaneSkin.layout(ScrollPaneSkin.java:572)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.layout(Component.java:1926)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:323)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> 
>
org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(Application
>> Context.java:656)
>> 
>>                       at java.awt.Component.dispatchEventImpl(Unknown
>> Source)
>> 
>>                       at java.awt.Component.dispatchEvent(Unknown Source)
>> 
>>                       at java.awt.EventQueue.dispatchEvent(Unknown
> Source)
>> 
>>                       at
>> java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>> 
>>                       at
>> java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>> 
>>                       at
>> java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>> 
>>                       at java.awt.EventDispatchThread.pumpEvents(Unknown
>> Source)
>> 
>>                       at java.awt.EventDispatchThread.pumpEvents(Unknown
>> Source)
>> 
>>                       at java.awt.EventDispatchThread.run(Unknown Source)
>> 
>> 
>> 
>> Apparently when the previous vertical scrollbar is displayed and
> positioned
>> at a certain height that creates the error.
>> To remedy this I have to move the vertical scrollbar sc.setScrollTop(0);
> to
>> 0  before displaying the next "tablepane" and it works.
>> 
>> Is this a bug or bad use of my hand?
>> 
>> 
>> 
>> Thanks
>> 
>> 
>> 
>> --
>> 
>> Cordialement
>> 
>> Jérôme Serré
>> 
>> 
>> 
>> 
> <hautDroit.wtkx>


Re: RE:

Posted by Greg Brown <gk...@mac.com>.
Hi,

I can't run the attached code because it has external dependencies. Can you provide a small, self-contained code sample that demonstrates the problem?

Thanks,
Greg

On Oct 25, 2010, at 8:13 AM, Jérôme Serré wrote:

> I attached the file wtkx.
> 
> 
> The code java
> 
> Main : 
> 
> buildHautDroit(cb);
> sp.setScrollTop(0);
> sp.setView(tp);
> bordure.setVisible(true);
> 
> buildHautDroit :
> 
> private void buildHautDroit(CasierBean cb) throws BizException {
>    	try {
>    		int nbCol = cb.getNbColonne();
>    		int nbLigne = cb.getNbLigne();
>    		final int LCASE = 35;
>    		
>    		tp = new TablePane();
>    		tp.setStyles("{horizontalSpacing:1, verticalSpacing:1, " +
>    				"showHorizontalGridLines:true,
> showVerticalGridLines:true, " +
>    				"horizontalGridColor:\'#096A09\',
> verticalGridColor:\'#096A09\'}");
> 
>     		TablePane.ColumnSequence colonnes = tp.getColumns();
> 
>     		for (int j=0; j<nbCol; j++) { colonnes.add(new
> TablePane.Column(LCASE, false)); }
>    		TablePane.RowSequence lignes = tp.getRows();
>    		for (int i=0; i<nbLigne; i++) {
>    			TablePane.Row ligne = new TablePane.Row(LCASE,
> false);
>    	        lignes.add(ligne);
>    			for (int j=0; j<colonnes.getLength(); j++) {
>    				if (cb.getCase(i+1, j+1)!=null) {
>    		    		ImageView im = new
> ImageView(Image.load(cb.getCase(i+1, j+1).getVin().getImgCouleur()));
>    		    		im.setTooltipText(cb.getCase(i+1,
> j+1).getLibelleCase() + " " +
>    		    			cb.getCase(i+1,
> j+1).getVin().getLibelleAoc() + " " +
>    		    			cb.getCase(i+1,
> j+1).getVin().getNomVin() + " " +
>    		    			cb.getCase(i+1,
> j+1).getVin().getMillesime());
> 
> im.getUserData().put(String.valueOf(i+1) + String.valueOf(j+1),
> cb.getCase(i+1, j+1));
>    					ligne.insert(im, j);
>    				} else {
>    					ligne.insert(new TablePane.Filler(),
> j);
>    				}
>    			} 
>    		}
>    	} catch (Exception e) {
>    		throw new BizException(e.getMessage());
>    	}
>    }
> 
> -----Message d'origine-----
> De : Greg Brown [mailto:gkbrown@mac.com] 
> Envoyé : lundi 25 octobre 2010 13:26
> À : user@pivot.apache.org
> Objet : Re:
> 
> Can you provide a small code sample that demonstrates the problem? Thanks.
> G
> 
> On Oct 25, 2010, at 3:25 AM, Jérôme Serré wrote:
> 
>> Hello,
>> 
>> Creating Dynamics and views "TablePane.
>> 
>> When I created a TablePane and that I display in a scrollpane by the time
> I
>> have the following error:
>> 
>> Exception in thread "AWT-EventQueue-3" java.lang.IllegalArgumentException:
>> end (163) is less than value (89) + extent (163)
>> 
>>                       at
>> org.apache.pivot.wtk.ScrollBar.setScope(ScrollBar.java:257)
>> 
>>                       at
>> 
> org.apache.pivot.wtk.skin.ScrollPaneSkin.layoutHelper(ScrollPaneSkin.java:83
>> 2)
>> 
>>                       at
>> org.apache.pivot.wtk.skin.ScrollPaneSkin.layout(ScrollPaneSkin.java:572)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.layout(Component.java:1926)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:323)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> org.apache.pivot.wtk.Container.layout(Container.java:327)
>> 
>>                       at
>> org.apache.pivot.wtk.Component.validate(Component.java:1917)
>> 
>>                       at
>> 
> org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(Application
>> Context.java:656)
>> 
>>                       at java.awt.Component.dispatchEventImpl(Unknown
>> Source)
>> 
>>                       at java.awt.Component.dispatchEvent(Unknown Source)
>> 
>>                       at java.awt.EventQueue.dispatchEvent(Unknown
> Source)
>> 
>>                       at
>> java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>> 
>>                       at
>> java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>> 
>>                       at
>> java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>> 
>>                       at java.awt.EventDispatchThread.pumpEvents(Unknown
>> Source)
>> 
>>                       at java.awt.EventDispatchThread.pumpEvents(Unknown
>> Source)
>> 
>>                       at java.awt.EventDispatchThread.run(Unknown Source)
>> 
>> 
>> 
>> Apparently when the previous vertical scrollbar is displayed and
> positioned
>> at a certain height that creates the error.
>> To remedy this I have to move the vertical scrollbar sc.setScrollTop(0);
> to
>> 0  before displaying the next "tablepane" and it works.
>> 
>> Is this a bug or bad use of my hand?
>> 
>> 
>> 
>> Thanks
>> 
>> 
>> 
>> --
>> 
>> Cordialement
>> 
>> Jérôme Serré
>> 
>> 
>> 
>> 
> <hautDroit.wtkx>


RE:

Posted by Jérôme Serré <je...@gmail.com>.
I attached the file wtkx.


The code java

Main : 

buildHautDroit(cb);
sp.setScrollTop(0);
sp.setView(tp);
bordure.setVisible(true);

buildHautDroit :

private void buildHautDroit(CasierBean cb) throws BizException {
    	try {
    		int nbCol = cb.getNbColonne();
    		int nbLigne = cb.getNbLigne();
    		final int LCASE = 35;
    		
    		tp = new TablePane();
    		tp.setStyles("{horizontalSpacing:1, verticalSpacing:1, " +
    				"showHorizontalGridLines:true,
showVerticalGridLines:true, " +
    				"horizontalGridColor:\'#096A09\',
verticalGridColor:\'#096A09\'}");
     
     		TablePane.ColumnSequence colonnes = tp.getColumns();

     		for (int j=0; j<nbCol; j++) { colonnes.add(new
TablePane.Column(LCASE, false)); }
    		TablePane.RowSequence lignes = tp.getRows();
    		for (int i=0; i<nbLigne; i++) {
    			TablePane.Row ligne = new TablePane.Row(LCASE,
false);
    	        lignes.add(ligne);
    			for (int j=0; j<colonnes.getLength(); j++) {
    				if (cb.getCase(i+1, j+1)!=null) {
    		    		ImageView im = new
ImageView(Image.load(cb.getCase(i+1, j+1).getVin().getImgCouleur()));
    		    		im.setTooltipText(cb.getCase(i+1,
j+1).getLibelleCase() + " " +
    		    			cb.getCase(i+1,
j+1).getVin().getLibelleAoc() + " " +
    		    			cb.getCase(i+1,
j+1).getVin().getNomVin() + " " +
    		    			cb.getCase(i+1,
j+1).getVin().getMillesime());
 
im.getUserData().put(String.valueOf(i+1) + String.valueOf(j+1),
cb.getCase(i+1, j+1));
    					ligne.insert(im, j);
    				} else {
    					ligne.insert(new TablePane.Filler(),
j);
    				}
    			} 
    		}
    	} catch (Exception e) {
    		throw new BizException(e.getMessage());
    	}
    }

-----Message d'origine-----
De : Greg Brown [mailto:gkbrown@mac.com] 
Envoyé : lundi 25 octobre 2010 13:26
À : user@pivot.apache.org
Objet : Re:

Can you provide a small code sample that demonstrates the problem? Thanks.
G

On Oct 25, 2010, at 3:25 AM, Jérôme Serré wrote:

> Hello,
> 
> Creating Dynamics and views "TablePane.
> 
> When I created a TablePane and that I display in a scrollpane by the time
I
> have the following error:
> 
> Exception in thread "AWT-EventQueue-3" java.lang.IllegalArgumentException:
> end (163) is less than value (89) + extent (163)
> 
>                        at
> org.apache.pivot.wtk.ScrollBar.setScope(ScrollBar.java:257)
> 
>                        at
>
org.apache.pivot.wtk.skin.ScrollPaneSkin.layoutHelper(ScrollPaneSkin.java:83
> 2)
> 
>                        at
> org.apache.pivot.wtk.skin.ScrollPaneSkin.layout(ScrollPaneSkin.java:572)
> 
>                        at
> org.apache.pivot.wtk.Component.layout(Component.java:1926)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:323)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
> org.apache.pivot.wtk.Container.layout(Container.java:327)
> 
>                        at
> org.apache.pivot.wtk.Component.validate(Component.java:1917)
> 
>                        at
>
org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(Application
> Context.java:656)
> 
>                        at java.awt.Component.dispatchEventImpl(Unknown
> Source)
> 
>                        at java.awt.Component.dispatchEvent(Unknown Source)
> 
>                        at java.awt.EventQueue.dispatchEvent(Unknown
Source)
> 
>                        at
> java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> 
>                        at
> java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> 
>                        at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> 
>                        at java.awt.EventDispatchThread.pumpEvents(Unknown
> Source)
> 
>                        at java.awt.EventDispatchThread.pumpEvents(Unknown
> Source)
> 
>                        at java.awt.EventDispatchThread.run(Unknown Source)
> 
> 
> 
> Apparently when the previous vertical scrollbar is displayed and
positioned
> at a certain height that creates the error.
> To remedy this I have to move the vertical scrollbar sc.setScrollTop(0);
to
> 0  before displaying the next "tablepane" and it works.
> 
> Is this a bug or bad use of my hand?
> 
> 
> 
> Thanks
> 
> 
> 
> --
> 
> Cordialement
> 
> Jérôme Serré
> 
> 
> 
>