SlideShowHyperlinkAction Class
A hyperlink action that navigates a slide show (for example, moves to the next slide or ends the slide show).
Declaration
public class SlideShowHyperlinkAction extends OfficeHyperlinkAction
Remarks
Call the following static methods of the HyperlinkAction class to get slide show actions:
- HyperlinkAction.getNextSlide()
- HyperlinkAction.getPreviousSlide()
- HyperlinkAction.getFirstSlide()
- HyperlinkAction.getLastSlide()
- HyperlinkAction.getLastViewedSlide()
- HyperlinkAction.getEndShow()
Example
Get Hyperlink Actions of Shapes on a Slide
The following code snippet loads a presentation and displays the action of each shape hyperlink on the first slide:
import java.io.*;
import java.nio.file.*;
import com.devexpress.docs.office.*;
import com.devexpress.docs.presentation.*;
public class Main {
public static void main(String[] args) throws Exception {
try (InputStream stream = Files.newInputStream(Path.of("Document.pptx"));
Presentation presentation = new Presentation(stream)) {
for (ShapeBase shape : presentation.getSlides().getFirst().getShapes()) {
OfficeHyperlink hyperlink = shape.getHyperlink();
if (hyperlink == null)
continue;
String action = switch (hyperlink.getAction()) {
case UriHyperlinkAction uriAction -> "opens " + uriAction.getUri();
case SlideHyperlinkAction slideAction ->
"moves to slide " + (presentation.getSlides().indexOf(slideAction.getTargetSlide()) + 1);
case SlideShowHyperlinkAction showAction -> "performs the " + showAction.getJump() + " action";
default -> "performs an action that the API does not support";
};
System.out.println(shape.getName() + ": " + action);
}
}
}
}
Inherited Members
Inheritance
Methods
equals(Object obj) Method
Returns whether the specified object is equal to the current SlideShowHyperlinkAction object.
Declaration
public boolean equals(Object obj)
Parameters
| Name | Type | Description |
|---|---|---|
| obj | Object | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| boolean |
|
Remarks
Two SlideShowHyperlinkAction objects are equal if they perform the same navigation action (getJump()).
getJump() Method
Returns the navigation action that the hyperlink performs.
Declaration
public SlideShowJump getJump()
Returns
| Type | Description |
|---|---|
| SlideShowJump | The navigation action. |
Remarks
The getJump() method returns one of the following values:
| Value | Description |
|---|---|
| NEXT | Moves to the next slide. |
| PREVIOUS | Moves to the previous slide. |
| FIRST | Moves to the first slide. |
| LAST | Moves to the last slide. |
| LAST_VIEWED | Moves to the last viewed slide. |
| END_SHOW | Ends the slide show. |
hashCode() Method
Returns a hash code for this SlideShowHyperlinkAction object.
Declaration
public int hashCode()
Returns
| Type | Description |
|---|---|
| int | The hash code. |