public final class UITools
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ON_DRAG_HOVER_CLICKED |
static java.lang.String |
TEST_ID_BUILDER_REGISTRY |
| Modifier and Type | Method and Description |
|---|---|
static void |
addBusyListener(Component component,
java.lang.String evtnm,
EventListener listener,
java.lang.String data,
java.lang.String i3BusyMessage)
Adds a event listener to a component.
|
static void |
addDragHoverClickEventListener(XulElement component,
EventListener eventListener,
int timeout,
java.lang.String dragID)
Add "drag hover click" feature to a component, i.e.
|
static void |
addMacCommandClickListener(XulElement component) |
static void |
applyLazyload(HtmlBasedComponent component)
Converts a component with appended children into a lazyload component, i.e.
|
static void |
applyTestID(Component component,
java.lang.String id) |
static void |
applyTestID(Component component,
TestIdContext ctx)
Applies a test id to a
Component according to the specified TestIdContext if test id mechanism is
enabled. |
static void |
cleanupFCKEditorIframeGhosts() |
static void |
clearBrowserTextSelection() |
static Grid |
createGridSkeleton(int columnsnumber) |
static void |
detachChildren(Component parent) |
static boolean |
different(java.lang.Object object1,
java.lang.Object object2) |
static void |
forceRenderCombobox(Combobox comboBox,
ComboitemRenderer renderer,
java.util.Collection<? extends java.lang.Object> model)
Comboboxes usually aren't rendered until ZK's event processing phase. |
static java.lang.String |
getAdjustedUrl(java.lang.String url) |
static java.lang.String |
getCockpitParameter(java.lang.String key,
Desktop desktop)
Returns a config parameter for the current cockpit.
|
static java.lang.String |
getCockpitParameter(java.lang.String key,
Execution execution)
Returns a config parameter for the current cockpit.
|
static Component |
getCurrentZKRoot() |
static java.lang.String |
getLocalDate(java.util.Date date) |
static java.lang.String |
getLocalDateTime(java.util.Date date) |
static <T extends Component> |
getNextParentOfType(java.lang.Class clazz,
Component child,
int maxDepth) |
static java.lang.String |
getWebAppName(Desktop desktop) |
static java.lang.String |
getWebAppName(Execution execution) |
static java.lang.String |
getZKPreference(java.lang.String key)
Get a preference value set in zk.xml.
|
static void |
invalidateAllPortallayouts() |
static void |
invalidateGroupbox(Component child) |
static void |
invalidateNextLayoutregion(Component comp) |
static boolean |
isFromOtherDesktop(Component comp) |
static boolean |
isParent(Component parent,
Component child) |
static boolean |
isUrlAbsolute(java.lang.String url) |
static void |
maximize(HtmlBasedComponent component) |
static void |
modifySClass(AbstractTag component,
java.lang.String className,
boolean add) |
static void |
modifySClass(HtmlBasedComponent component,
java.lang.String className,
boolean add)
Adds or removes a style class to the components style classes.
|
static void |
modifyStyle(AbstractTag component,
java.lang.String key,
java.lang.String value) |
static void |
modifyStyle(HtmlBasedComponent component,
java.lang.String key,
java.lang.String value) |
static void |
performDoubleClickDelay(WebApp webApp) |
static void |
removeEventListenersForComponent(java.lang.String eventType,
Component component) |
static java.lang.String |
removeHtml(java.lang.String html) |
static void |
resizeBorderLayout(Component comp,
boolean allParents) |
static void |
scrollIntoViewIfNeeded(Component component,
Component scrollContainer)
Same as
scrollIntoViewIfNeeded(Component, Component, int) with '0' as last argument. |
static void |
scrollIntoViewIfNeeded(Component component,
Component scrollContainer,
int childDepth)
Checks if the component is outside the scrollcontainers parent (i.e.
|
static java.util.List<java.lang.String> |
searchForLabel(java.lang.Object obj,
java.lang.reflect.Method method,
java.util.Collection<LanguageModel> firstPrioLanguages) |
static boolean |
searchRestrictionsDisabledInCockpit() |
static void |
setComponentWidths(java.lang.String[] widths,
HtmlBasedComponent... comps) |
static boolean |
setManagedEventListener(Component component,
java.lang.String evtnm,
EventListener listener)
Adds and replaces an
EventListener at a Component. |
static boolean |
setTooltipText(Component component,
java.lang.String text) |
static void |
showNoPermissionMessage() |
static java.util.Collection<java.lang.Object> |
toColl(java.lang.Object object) |
static void |
updateMediaModel(MediaModel currentMediaModel,
Media mediaContent,
MediaService mediaService) |
public static final java.lang.String TEST_ID_BUILDER_REGISTRY
public static final java.lang.String ON_DRAG_HOVER_CLICKED
public static boolean setTooltipText(Component component,
java.lang.String text)
public static void applyLazyload(HtmlBasedComponent component)
component - the componentpublic static Component getCurrentZKRoot()
public static void addDragHoverClickEventListener(XulElement component,
EventListener eventListener,
int timeout,
java.lang.String dragID)
ON_DRAG_HOVER_CLICKED if the mouse cursor stays over component for a specified time while dragging a
component with the specified dragID.component - the componenteventListener - you can specify an EventListener which reacts on the ON_DRAG_HOVER_CLICKED
event or
leave it null, if you want to add it later.timeout - the time the cursor has to stay over component, in millisecondsdragID - the drag id of the component, which triggers the eventpublic static java.lang.String getZKPreference(java.lang.String key)
key - the preference keypublic static void cleanupFCKEditorIframeGhosts()
public static void clearBrowserTextSelection()
public static void applyTestID(Component component,
java.lang.String id)
public static void applyTestID(Component component,
TestIdContext ctx)
Component according to the specified TestIdContext if test id mechanism is
enabled.component - The ZK component on which the id should be applied.ctx - A context which usually specifies the environment of the componentpublic static void resizeBorderLayout(Component comp,
boolean allParents)
public static void invalidateNextLayoutregion(Component comp)
public static void maximize(HtmlBasedComponent component)
public static void detachChildren(Component parent)
public static <T extends Component> T getNextParentOfType(java.lang.Class clazz,
Component child,
int maxDepth)
public static void invalidateGroupbox(Component child)
public static boolean different(java.lang.Object object1,
java.lang.Object object2)
public static Grid createGridSkeleton(int columnsnumber)
public static void modifySClass(HtmlBasedComponent component,
java.lang.String className,
boolean add)
component - the component to change style classesclassName - the class nameadd - adding or removing the classpublic static void modifySClass(AbstractTag component,
java.lang.String className,
boolean add)
public static void modifyStyle(HtmlBasedComponent component,
java.lang.String key,
java.lang.String value)
public static void modifyStyle(AbstractTag component,
java.lang.String key,
java.lang.String value)
public static boolean isFromOtherDesktop(Component comp)
public static java.util.Collection<java.lang.Object> toColl(java.lang.Object object)
public static boolean isParent(Component parent,
Component child)
public static java.lang.String getAdjustedUrl(java.lang.String url)
public static boolean isUrlAbsolute(java.lang.String url)
public static void showNoPermissionMessage()
public static java.util.List<java.lang.String> searchForLabel(java.lang.Object obj,
java.lang.reflect.Method method,
java.util.Collection<LanguageModel> firstPrioLanguages)
throws java.lang.reflect.InvocationTargetException,
java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetExceptionjava.lang.IllegalArgumentExceptionjava.lang.IllegalAccessExceptionpublic static void forceRenderCombobox(Combobox comboBox,
ComboitemRenderer renderer,
java.util.Collection<? extends java.lang.Object> model)
Comboboxes usually aren't rendered until ZK's event processing phase. However, it might be necessary to be
able to access the children in an earlier stage of the life cycle. This method forces the addition and rendering
of a Combobox' children.comboBox - the combobox which children are to be renderedrenderer - the renderer to use for rendering the childrenmodel - the the data to be renderedpublic static java.lang.String getLocalDate(java.util.Date date)
public static java.lang.String getLocalDateTime(java.util.Date date)
public static void addBusyListener(Component component,
java.lang.String evtnm,
EventListener listener,
java.lang.String data,
java.lang.String i3BusyMessage)
component - the zk component to which the event listener should be addedevtnm - the event namelistener - the event listenerdata - additional datai3BusyMessage - the i3 label code or null for default busy messagepublic static void performDoubleClickDelay(WebApp webApp)
public static java.lang.String getWebAppName(Execution execution)
public static java.lang.String getWebAppName(Desktop desktop)
public static java.lang.String getCockpitParameter(java.lang.String key,
Desktop desktop)
key - the key without cockpit prefixdesktop - the current desktoppublic static java.lang.String getCockpitParameter(java.lang.String key,
Execution execution)
key - the key without cockpit prefixexecution - the current executionpublic static void addMacCommandClickListener(XulElement component)
public static void setComponentWidths(java.lang.String[] widths,
HtmlBasedComponent... comps)
public static void invalidateAllPortallayouts()
public static java.lang.String removeHtml(java.lang.String html)
public static void removeEventListenersForComponent(java.lang.String eventType,
Component component)
public static void scrollIntoViewIfNeeded(Component component,
Component scrollContainer)
scrollIntoViewIfNeeded(Component, Component, int) with '0' as last argument.public static void scrollIntoViewIfNeeded(Component component,
Component scrollContainer,
int childDepth)
component - the component that should be made visible.scrollContainer - the component that possesses the scrollbarchildDepth - if the scrollContainer doesn't have scrollbars itself but one of its html child components that
are not
accessible in java, you can specify a number how often "firstChild" will be appended to fetch the real
scrollcontainer.public static void updateMediaModel(MediaModel currentMediaModel, Media mediaContent, MediaService mediaService)
public static boolean searchRestrictionsDisabledInCockpit()
public static boolean setManagedEventListener(Component component,
java.lang.String evtnm,
EventListener listener)
EventListener at a Component. The method
Component#addEventListener(String, EventListener) doesn't allow to replace an EventListener, if
you call it twice, the second call will be ignored. You have to remove the EventListener instance manually
by invoking Component#removeEventListener(String, EventListener) but you have to know the
EventListener instance.EventListener without knowing it, as long as it was
also added by this method.component - the component the listener should be added to.evtnm - the event name.listener - the event listener.Copyright © 2018 SAP SE. All Rights Reserved.