Difference between revisions of "Documentation/DevGuide/Drawings/Slide Transition"
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
(Added Java syntax highlight) |
||
Line 108: | Line 108: | ||
The following Java example shows how to set slide transition effects that are applied to the first page. | The following Java example shows how to set slide transition effects that are applied to the first page. | ||
<!--[SOURCE:Drawing/PresentationDemo.java]--> | <!--[SOURCE:Drawing/PresentationDemo.java]--> | ||
− | + | <source lang="java"> | |
// set the slide transition effect of the first page | // set the slide transition effect of the first page | ||
XDrawPagesSupplier xDrawPagesSupplier =(XDrawPagesSupplier)UnoRuntime.queryInterface( | XDrawPagesSupplier xDrawPagesSupplier =(XDrawPagesSupplier)UnoRuntime.queryInterface( | ||
Line 131: | Line 131: | ||
time in seconds the page is shown before switching to the next page. | time in seconds the page is shown before switching to the next page. | ||
*/ | */ | ||
− | xPropSet.setPropertyValue("Duration", new Integer(5)); | + | xPropSet.setPropertyValue("Duration", new Integer(5));</source> |
{{PDL1}} | {{PDL1}} | ||
[[Category:Documentation/Developer's Guide/Drawing Documents and Presentation Documents]] | [[Category:Documentation/Developer's Guide/Drawing Documents and Presentation Documents]] |
Revision as of 12:47, 13 January 2013
- Custom Slide Show
- Presentation Effects
- Slide Transition
- Animations and Interactions
In Impress, each page has its own slide transition that can be composed by the properties of the service com.sun.star.presentation.DrawPage.
Setting the following properties enables slide transition:
Properties of com.sun.star.presentation.DrawPage | |
---|---|
Change | long - Specifies how the page change is triggered. If this is 0, the user must click to start each object animation and to change the page. If set to 1, the page is automatically switched. If it is set to 2, all object effects run automatically, but the user has to click on the page to change it.
|
Duration | long - If the property Change is set to 1, this property is the time in seconds the page is shown, before switching to the next page.
|
Effect | com.sun.star.presentation.FadeEffect. This is the effect that is used to fade in the page. |
Speed | com.sun.star.presentation.AnimationSpeed. Defines the speed of the fade-in effect of the page. Possible values are:
|
Layout | short - This number specifies a presentation layout for this page, if this property is not ZERO.
|
The next table contains all available com.sun.star.presentation.FadeEffect enum values:
NONE | RANDOM | DISSOLVE |
FADE_FROM_LEFT FADE_FROM_RIGHT |
MOVE_FROM_LEFT MOVE_FROM_RIGHT |
UNCOVER_TO_LEFT UNCOVER_TO_RIGHT |
FADE_TO_CENTER FADE_FROM_CENTER |
VERTICAL_STRIPES HORIZONTAL_STRIPES |
CLOCKWISE COUNTERCLOCKWISE |
ROLL_FROM_LEFT ROLL_FROM_RIGHT |
CLOSE_VERTICAL CLOSE_HORIZONTAL |
SPIRALIN_LEFT SPIRALIN_RIGHT |
WAVYLINE_FROM_LEFT WAVYLINE_FROM_RIGHT |
STRETCH_FROM_LEFT STRETCH_FROM_RIGHT |
VERTICAL_LINES HORIZONTAL_LINES |
VERTICAL_CHECKERBOARD HORIZONTAL_CHECKERBOARD |
The following Java example shows how to set slide transition effects that are applied to the first page.
// set the slide transition effect of the first page XDrawPagesSupplier xDrawPagesSupplier =(XDrawPagesSupplier)UnoRuntime.queryInterface( XDrawPagesSupplier.class, xComponent); XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages(); XDrawPage xDrawPage = (XdrawPage)UnoRuntime.queryInterface(XDrawPage.class, xDrawPages.getByIndex(0)); xShapes = (XShapes)UnoRuntime.queryInterface(XShapes.class, xDrawPage); XPropertySet xPropSet = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xDrawPage); // set the slide transition effect properties xPropSet.setPropertyValue("Effect", com.sun.star.presentation.FadeEffect.RANDOM); xPropSet.setPropertyValue("Speed", com.sun.star.presentation.AnimationSpeed.MEDIUM); /* Change specifies how the page change is triggered. If this is 0, the user must click to start each object animation and to change the page. If set to 1, the page is automatically switched. If it is set to 2, all object effects run automatically, but the user has to click on the page to change it. */ xPropSet.setPropertyValue("Change", new Integer(1)); /* If the property DrawPage::Change is set to 1, Duration specifies the time in seconds the page is shown before switching to the next page. */ xPropSet.setPropertyValue("Duration", new Integer(5));
Content on this page is licensed under the Public Documentation License (PDL). |