Hi all,
How can I create a new JGoLayer… Actually, I have to store a number of JGoLayer objects in a HashMap and send it somewhere. In the receiving end, they will unbundle it and use it…Can somebody help??
JGoDocument.addLayerAfter or addLayerBefore.
The addLayerAfter() and addLayerBefore() methods expect a layer object right?? “How can I create them??”, is my question…
[QUOTE=Nanda Kumar]The addLayerAfter() and addLayerBefore()
methods expect a layer object right?? “How can I create
them??”, is my question…[/quote]
Good question, cause looking at the JavaDocs gives this for JGoDocument:
JGoLayer
|
addLayerAfter(JGoLayer old)
front of the given layer. |
JGoLayer
|
addLayerBefore(JGoLayer old)
the given layer. |
Looks straight forward but then have a look at JGoLayer:
Constructor SummaryJGoLayer()
&nbs p;Don't use
this constructor–instead call JGoDocument.addLayerAfter or
JGoDocument.addLayerBefore.
Every document has at least one layer. For example, in Demo1.java:
myMainLayer = myDoc.getFirstLayer();
myForegroundLayer = myDoc.addLayerAfter(myMainLayer);
myForegroundLayer.setIdentifier(“in foreground layer”);
There are also JGoDocument.getDefaultLayer() and getLastLayer().