public final class HyperlinkManager extends java.lang.Object implements IHyperlinkManager
Provide hyperlinks management (adding, removing).
| Modifier and Type | Method and Description |
|---|---|
com.aspose.slides.IDOMObject |
getParent_Immediate()
Returns Parent_Immediate object.
|
void |
removeHyperlinkClick()
Removes hyperlink on click.
|
void |
removeHyperlinkMouseOver()
Removes hyperlink mouse over.
|
IHyperlink |
setExternalHyperlinkClick(java.lang.String url)
Set external hyperlink on click.
|
IHyperlink |
setExternalHyperlinkMouseOver(java.lang.String url)
Sets external hyperlink mouse over.
|
IHyperlink |
setInternalHyperlinkClick(ISlide targetSlide)
Sets internal hyperlink on click.
|
IHyperlink |
setInternalHyperlinkMouseOver(ISlide targetSlide)
Sets internal hyperlink mouse over.
|
IHyperlink |
setMacroHyperlinkClick(java.lang.String macroName)
Set Macro hyperlink on a click.
|
public final IHyperlink setExternalHyperlinkClick(java.lang.String url)
Set external hyperlink on click.
The following sample code shows how to add Text Box with Hyperlink.// Instantiates a Presentation class that represents a PPTX Presentation pres = new Presentation(); try { // Gets the first slide in the presentation ISlide slide = pres.getSlides().get_Item(0); // Adds an AutoShape object with type set as Rectangle IShape pptxShape = slide.getShapes().addAutoShape(ShapeType.Rectangle, 150, 150, 150, 50); // Casts the shape to AutoShape IAutoShape pptxAutoShape = (IAutoShape) pptxShape; // Accesses the ITextFrame property associated with the AutoShape pptxAutoShape.addTextFrame(""); ITextFrame textFrame = pptxAutoShape.getTextFrame(); IPortion portion = textFrame.getParagraphs().get_Item(0).getPortions().get_Item(0); // Adds some text to the frame portion.setText("Aspose.Slides"); // Sets the Hyperlink for the portion text IHyperlinkManager hypMan = portion.getPortionFormat().getHyperlinkManager(); hypMan.setExternalHyperlinkClick("http://www.aspose.com"); // Saves the PPTX Presentation pres.save("hLinkPPTX_out.pptx", SaveFormat.Pptx); } finally { if (pres != null) pres.dispose(); }
setExternalHyperlinkClick in interface IHyperlinkManagerurl - Hyperlink URL.IHyperlinkpublic final IHyperlink setInternalHyperlinkClick(ISlide targetSlide)
Sets internal hyperlink on click.
setInternalHyperlinkClick in interface IHyperlinkManagertargetSlide - Target slide.public final void removeHyperlinkClick()
Removes hyperlink on click.
removeHyperlinkClick in interface IHyperlinkManagerpublic final IHyperlink setExternalHyperlinkMouseOver(java.lang.String url)
Sets external hyperlink mouse over.
setExternalHyperlinkMouseOver in interface IHyperlinkManagerurl - Hyperlink URL.public final IHyperlink setInternalHyperlinkMouseOver(ISlide targetSlide)
Sets internal hyperlink mouse over.
setInternalHyperlinkMouseOver in interface IHyperlinkManagertargetSlide - Target slide.public final void removeHyperlinkMouseOver()
Removes hyperlink mouse over.
removeHyperlinkMouseOver in interface IHyperlinkManagerpublic final IHyperlink setMacroHyperlinkClick(java.lang.String macroName)
Set Macro hyperlink on a click.
Presentation pres = new Presentation(); try { IAutoShape shape = pres.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.BlankButton, 20, 20, 80, 30); shape.getHyperlinkManager().setMacroHyperlinkClick("MacroName"); } finally { if (pres != null) pres.dispose(); }
setMacroHyperlinkClick in interface IHyperlinkManagermacroName - Name of the macroIHyperlinkpublic final com.aspose.slides.IDOMObject getParent_Immediate()
Returns Parent_Immediate object.
Read-only IDOMObject.
Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.