hello everybody,
am trying to personilize the method flash in the zoom method. what i did is
to bring the code of this method, so once the user click on a row of the
the table the feature must be zoomed then flashed and stayed flashed, in
other words the outline of the feature changes the color (red) here's my
code:
but it doesn't work:
searchProperties.getBornesTable().getSelectionModel().addListSelectionListener(new
ListSelectionListener(){
@Override
public void valueChanged(ListSelectionEvent e) {
try {
zoomToSelectedItemsPlugIn.zoom(
selectedBornes(),
context.getLayerViewPanel());
final Shape shape =
context.getLayerViewPanel().getViewport().getJava2DConverter().toShape((Polygon)selectedBornes());
Color color = Color.red;
Stroke stroke =new BasicStroke(5,
BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND);
final Graphics2D graphics = (Graphics2D)
context.getLayerViewPanel().getGraphics();
graphics.setColor(color);
graphics.setXORMode(Color.white);
graphics.setStroke(stroke);
graphics.draw(shape);
} catch (NoninvertibleTransformException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
here's the method selectBornes:
public Collection selectedBornes() {
ArrayList selectedBornes = new ArrayList();
for(BasicFeature basicFeature : BornesList) {
selectedBornes.add(search().getGeometry());
}
return selectedBornes;
}
best regards
--
*Asma OUQALLI*
Élève ingénieur : 3ème Sciences d'Information Géographique (SIG).
Chef de commission développement professionnel - Rotaract EHTP.
Chef de cellule Media - Olympiades EHTP 2012.
Ecole Hassania des Travaux Publics.
Mobile : +212 672 48 23 15.
Email : [email protected]
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel