Interface Preview
- All Superinterfaces:
org.timepedia.exporter.client.Exportable
public interface Preview
extends org.timepedia.exporter.client.Exportable
FirstSpirit WebEdit Javascript Preview API, accessible via
Examples:
WE_API.Preview
Examples:
WE_API.Preview.reload()
; // reloads the current page
- Since:
- 5.0.106
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Listener for events about reloaded elements in the preview document. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Registers a listener for events about reloaded elements in the current preview document.@Nullable Object
getParameter
(String name) Deprecated.@Nullable com.google.gwt.core.client.JavaScriptObject
Deprecated.since 5.2, useMPPWebControl.getTimeParameter()
instead@Nullable com.google.gwt.core.client.JavaScriptObject
Returns a reference to the current window object of the preview frame.void
[Hidden] Highlights the giventext
.boolean
Deprecated.since 5.2, useMPPWebControl.isParameterized()
insteadvoid
reload()
Reloads the current page.void
Reloads the element with the given id.void
reload
(@Nullable com.google.gwt.dom.client.Element element) Reloads the given element.void
repaint()
Repaints the editor highlighting.void
rescan
(@Nullable com.google.gwt.dom.client.Element element) Searches in the specified element for new editor identifiers.void
setParameter
(String name, @Nullable Object value) Deprecated.since 5.2, useMPPWebControl.setParameter(String, Object)
insteadvoid
setTimeParameter
(com.google.gwt.core.client.JavaScriptObject date) Deprecated.since 5.2, useMPPWebControl.setTimeParameter(Object)
instead
-
Method Details
-
reload
void reload()Reloads the current page.- Since:
- 5.0.106
-
reload
void reload(@Nullable @Nullable com.google.gwt.dom.client.Element element) Reloads the given element. The nearest surrounding editor identifier will influence whether or not the preview will be reloaded partly.- Parameters:
element
- element to reload.- Since:
- 5.0.106
-
reload
Reloads the element with the given id.- Parameters:
htmlId
- the id of the element to reload.- Since:
- 5.2.26
-
addElementReloadListener
Registers a listener for events about reloaded elements in the current preview document.
Listener registration in JavaScript might look like:
...addElementReloadListener(function(element){...});
- Parameters:
listener
- listener to inform- Since:
- 5.1.37
-
rescan
void rescan(@Nullable @Nullable com.google.gwt.dom.client.Element element) Searches in the specified element for new editor identifiers.- Parameters:
element
- element to scan for editor identifiers.- Since:
- 5.1.37
-
repaint
void repaint()Repaints the editor highlighting.- Since:
- 5.1.38
-
getWindow
@Nullable @Nullable com.google.gwt.core.client.JavaScriptObject getWindow()Returns a reference to the current window object of the preview frame.- Returns:
- window, or
null
if currently not available - Since:
- 5.1.302
-
highlight
[Hidden] Highlights the giventext
.- Parameters:
text
- to highlight ornull
to remove the highlighting.
-
isParameterized
Deprecated.since 5.2, useMPPWebControl.isParameterized()
insteadReturns whether or not the current preview parametrization is enabled by the user.- Returns:
true
if preview has parameter,false
otherwise.- Since:
- 5.1.30
-
getParameter
Deprecated.since 5.2, useMPPWebControl.getParameter(String)
insteadReturns the current value of the specified preview parameter.- Parameters:
name
- name of the preview parameter to get the value for.- Returns:
- parameter value, or
null
- Since:
- 5.1.30
-
setParameter
Deprecated.since 5.2, useMPPWebControl.setParameter(String, Object)
insteadSets the current value of the specified preview parameter.- Parameters:
name
- name of the preview parameter to set the value for.value
- parameter value, ornull
- Since:
- 5.1.30
-
getTimeParameter
Deprecated.since 5.2, useMPPWebControl.getTimeParameter()
insteadReturns the current time the user has chosen using the preview timeline.- Returns:
- the current time (as javascript
Date
) object, ornull
- Since:
- 5.1.30
-
setTimeParameter
Deprecated.since 5.2, useMPPWebControl.setTimeParameter(Object)
insteadSet the time that should be used for preview.- Parameters:
date
- the time (as javascriptDate
) object, ornull
- Since:
- 5.1.30
-
MPPWebControl.getParameter(String)
instead