Class CmsGalleryDialog
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.ade.galleries.client.ui.CmsGalleryDialog
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.BeforeSelectionHandler<Integer>
,com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.SelectionHandler<Integer>
,com.google.gwt.event.shared.EventHandler
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.IsRenderable
,com.google.gwt.user.client.ui.IsWidget
,I_CmsTruncable
public class CmsGalleryDialog
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.event.logical.shared.BeforeSelectionHandler<Integer>, com.google.gwt.event.logical.shared.SelectionHandler<Integer>, I_CmsTruncable
Provides the method for the gallery dialog.
- Since:
- 8.0.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The initial dialog width.static final int
The initial dialog width.protected com.google.gwt.user.client.ui.FlowPanel
The parent panel for the gallery dialog.protected CmsTabbedPanel<A_CmsTab>
The tabbed panel.Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionCmsGalleryDialog
(I_CmsGalleryHandler galleryHandler) The constructor.CmsGalleryDialog
(I_CmsGalleryHandler galleryHandler, CmsTabbedPanel.CmsTabbedPanelStyle style) The default constructor for the gallery dialog. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Disables the search tab.void
Enables the search tab.protected void
Make sure a notification widget is installed.void
fillResultTab
(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj) Displays the search result in the result tab.void
fillTabs
(CmsGalleryController controller) Fill the tabs with the content provided from the info bean.Returns the categories tab widget.Returns the gallery controller.Returns the HTML id of the dialog element.Returns the drag and drop handler.Returns the galleries tab widget.Returns the image format names.Returns the image formats.com.google.gwt.user.client.ui.FlowPanel
Returns the parent panel of the dialog.Returns the results tab widget.Returns the searchTab.Returns the sitemap tab.getTab
(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryTabId tabId) Gets the tab with a given tab id, or null if the dialog has no such tab.protected com.google.gwt.user.client.ui.HasText
getTabTextAccessor
(int pos) Creates a tab text accessor for a given text.Returns the types tab widget.Returns the VFS tab widget.Returns the widget handler.void
hideShowPreviewButton
(boolean hide) Hides or shows the show-preview-button.boolean
Returns if the gallery is used as a native widget.boolean
Returns true if the formats from this dialog object should be prioritized by the format handler.boolean
Returns the use formats flag.protected void
onAttach()
void
onBeforeSelection
(com.google.gwt.event.logical.shared.BeforeSelectionEvent<Integer> event) void
onSelection
(com.google.gwt.event.logical.shared.SelectionEvent<Integer> event) void
selectTab
(int tabIndex, boolean isInitial) Selects a tab.void
selectTab
(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryTabId tabId, boolean fireEvent) Selects a tab by the given id.void
setDialogSize
(int width, int height) Sets the size of the gallery parent panel and triggers the event to the tab.void
setImageFormatNames
(String imageFormatNames) Sets the image format names.void
setImageFormats
(String imageFormats) Sets the image formats.void
setOnAttachCommand
(com.google.gwt.user.client.Command onAttachCommand) Sets the on attach command.void
setOverrideFormats
(boolean overrideFormats) Sets the 'override formats' flag, which tells the format handler to prioritize the formats from the gallery dialog object.void
setPreviewVisible
(boolean visible) Sets the preview visibility.void
setUseFormats
(boolean useFormats) Sets the use formats flag.void
setWidgetHandler
(I_CmsGalleryWidgetHandler widgetHandler) Sets the widget handler.void
Truncates long text and sets the original text to the title attribute.void
updateGalleryData
(org.opencms.ade.galleries.shared.CmsGalleryDataBean data) Updates the gallery data.void
updateSizeForTab
(A_CmsTab tab) Updates the dialog size according to the requirements of the selected tab.void
Updates variable ui-element dimensions, execute after dialog has been attached and it's content is displayed.void
Sets the dialog to use the maximum available space.Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Field Details
-
DEFAULT_DIALOG_HEIGHT
The initial dialog width.- See Also:
-
DEFAULT_DIALOG_WIDTH
The initial dialog width.- See Also:
-
m_parentPanel
The parent panel for the gallery dialog. -
m_tabbedPanel
The tabbed panel.
-
-
Constructor Details
-
CmsGalleryDialog
The constructor.- Parameters:
galleryHandler
- the gallery handler
-
CmsGalleryDialog
public CmsGalleryDialog(I_CmsGalleryHandler galleryHandler, CmsTabbedPanel.CmsTabbedPanelStyle style) The default constructor for the gallery dialog.- Parameters:
galleryHandler
- the gallery handlerstyle
- the style for the panel
-
-
Method Details
-
disableSearchTab
Disables the search tab. -
enableSearchTab
Enables the search tab. -
fillTabs
Fill the tabs with the content provided from the info bean.- Parameters:
controller
- the reference to the gallery controller
-
getCategoriesTab
Returns the categories tab widget.- Returns:
- the categories widget
-
getController
Returns the gallery controller.- Returns:
- the gallery controller
-
getDialogId
Returns the HTML id of the dialog element.- Returns:
- the HTML id of the dialog element
-
getDndHandler
Returns the drag and drop handler.- Returns:
- the drag and drop handler
-
getGalleriesTab
Returns the galleries tab widget.- Returns:
- the galleries widget
-
getImageFormatNames
Returns the image format names.- Returns:
- the image format names
-
getImageFormats
Returns the image formats.- Returns:
- the image formats
-
getParentPanel
Returns the parent panel of the dialog.- Returns:
- the parent
-
getResultsTab
Returns the results tab widget.- Returns:
- the results widget
-
getSearchTab
Returns the searchTab.- Returns:
- the searchTab
-
getSitemapTab
Returns the sitemap tab.- Returns:
- the sitemap tab
-
getTypesTab
Returns the types tab widget.- Returns:
- the types widget
-
getVfsTab
Returns the VFS tab widget.- Returns:
- the VFS tab widget
-
getWidgetHandler
Returns the widget handler.- Returns:
- the widget handler
-
hideShowPreviewButton
Hides or shows the show-preview-button.- Parameters:
hide
-true
to hide the button
-
isNativeWidget
Returns if the gallery is used as a native widget.- Returns:
true
if the gallery is used as a native widget
-
isOverrideFormats
Returns true if the formats from this dialog object should be prioritized by the format handler.- Returns:
- the value of the 'override formats' flag
-
isUseFormats
Returns the use formats flag.- Returns:
- the use formats flag
-
selectTab
Selects a tab.- Parameters:
tabIndex
- the tab index to beselectedisInitial
- flag for initial search
-
setDialogSize
Sets the size of the gallery parent panel and triggers the event to the tab.- Parameters:
width
- the new widthheight
- the new height
-
setImageFormatNames
Sets the image format names.- Parameters:
imageFormatNames
- the image format names to set
-
setImageFormats
Sets the image formats.- Parameters:
imageFormats
- the image formats to set
-
setOnAttachCommand
Sets the on attach command.- Parameters:
onAttachCommand
- the on attach command to set
-
setOverrideFormats
Sets the 'override formats' flag, which tells the format handler to prioritize the formats from the gallery dialog object.- Parameters:
overrideFormats
- the new value for the 'override formats' flag
-
setPreviewVisible
Sets the preview visibility.- Parameters:
visible
- the preview visibility
-
setUseFormats
Sets the use formats flag.- Parameters:
useFormats
- the use formats flag to set
-
setWidgetHandler
Sets the widget handler.- Parameters:
widgetHandler
- the widget handler
-
truncate
Description copied from interface:I_CmsTruncable
Truncates long text and sets the original text to the title attribute.- Specified by:
truncate
in interfaceI_CmsTruncable
- Parameters:
textMetricsKey
- the key identifying the text metrics to useclientWidth
- the width to use in pixels- See Also:
-
updateSizeForTab
Updates the dialog size according to the requirements of the selected tab.- Parameters:
tab
- the selected tab
-
updateSizes
Updates variable ui-element dimensions, execute after dialog has been attached and it's content is displayed. -
useMaxDimensions
Sets the dialog to use the maximum available space. -
ensureNotifications
Make sure a notification widget is installed. -
getTabTextAccessor
Creates a tab text accessor for a given text.- Parameters:
pos
- the index of the tab- Returns:
- the tab text accessor for the tab at index pos
-
onAttach
- Overrides:
onAttach
in classcom.google.gwt.user.client.ui.Composite
- See Also:
-
Composite.onAttach()
-