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:[email protected]]
Envoyé : lundi 25 octobre 2010 13:26
À : [email protected]
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
Description: Binary data
