*/
public void apply() {
// Figure out whether there already exists a server state for the
// component.
CellServerState cellServerState = editor.getCellServerState();
PlacemarkComponentServerState state =
(PlacemarkComponentServerState) cellServerState.getComponentServerState(
PlacemarkComponentServerState.class);
if (state == null) {
state = new PlacemarkComponentServerState();
}
String name = nameTF.getText().trim();
String rotation = rotationTF.getText().trim();
if (name.length() == 0) {
name = null;
}
if (rotation.length() == 0) {
rotation = null;
}
File image = cspp.getImage();
String uri=cspp.getImageURL();
if(image!=null) {
uri = uploadImage(image);
}
state.setPlacemarkName(name);
state.setPlacemarkRotation(rotation);
state.setMessage(cspp.getMessage());
state.setImageURL(uri);
state.setBackgroundColor(cspp.getBackColor());
state.setTextColor(cspp.getTextColor());
editor.addToUpdateList(state);
}