)
{
if(baseObject == null)
return null;
PdfDictionary dataObject = (PdfDictionary)File.resolve(baseObject);
PdfName actionType = (PdfName)dataObject.get(PdfName.S);
if(actionType == null
|| (dataObject.containsKey(PdfName.Type)
&& !dataObject.get(PdfName.Type).equals(PdfName.Action)))
return null;
if(actionType.equals(PdfName.GoTo))
return new GoToLocal(baseObject,container);
else if(actionType.equals(PdfName.GoToR))
return new GoToRemote(baseObject,container);
else if(actionType.equals(PdfName.GoToE))
return new GoToEmbedded(baseObject,container);
else if(actionType.equals(PdfName.Launch))
return new Launch(baseObject,container);
else if(actionType.equals(PdfName.Thread))
return new GoToThread(baseObject,container);
else if(actionType.equals(PdfName.URI))
return new GoToURI(baseObject,container);
else if(actionType.equals(PdfName.Sound))
return new PlaySound(baseObject,container);
else if(actionType.equals(PdfName.Movie))
return new PlayMovie(baseObject,container);
else if(actionType.equals(PdfName.Hide))
return new ToggleVisibility(baseObject,container);
else if(actionType.equals(PdfName.Named))
{
PdfName actionName = (PdfName)dataObject.get(PdfName.N);
if(actionName.equals(PdfName.NextPage))
return new GoToNextPage(baseObject,container);
else if(actionName.equals(PdfName.PrevPage))
return new GoToPreviousPage(baseObject,container);
else if(actionName.equals(PdfName.FirstPage))