I have attached my implementation of the setLayerNamesAsListData
method. I was thinking about placing this method in Sigle's DialogUtil
class.
Someone asked to see my implementation, and I didn't want to cloud up
the other thread, which has moved onto other topics.
The Sunburned Surveyor
P.S. - Did we decide if the DialogUtil class is the appropriate place,
or should I put it into a separate JAR?
public static void setLayerNamesAsListData(LayerManager argManager, JList
argList)
{
List layers = argManager.getLayers();
List<String> layerNames = new LinkedList<String>();
Iterator goOverEach = layers.iterator();
while(goOverEach.hasNext())
{
Layer thisElement = (Layer) goOverEach.next();
String layerName = thisElement.getName();
layerNames.add(layerName);
}
Object[] arrayForJList = layerNames.toArray();
argList.setListData(arrayForJList);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel