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
FieldsModifier and TypeFieldDescriptionstatic final intThe initial dialog width.static final intThe initial dialog width.protected com.google.gwt.user.client.ui.FlowPanelThe 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
ConstructorsConstructorDescriptionCmsGalleryDialog(I_CmsGalleryHandler galleryHandler) The constructor.CmsGalleryDialog(I_CmsGalleryHandler galleryHandler, CmsTabbedPanel.CmsTabbedPanelStyle style) The default constructor for the gallery dialog. -
Method Summary
Modifier and TypeMethodDescriptionvoidDisables the search tab.voidEnables the search tab.protected voidMake sure a notification widget is installed.voidfillResultTab(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj) Displays the search result in the result tab.voidfillTabs(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.FlowPanelReturns 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.HasTextgetTabTextAccessor(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.voidhideShowPreviewButton(boolean hide) Hides or shows the show-preview-button.booleanReturns if the gallery is used as a native widget.booleanReturns true if the formats from this dialog object should be prioritized by the format handler.booleanReturns the use formats flag.protected voidonAttach()voidonBeforeSelection(com.google.gwt.event.logical.shared.BeforeSelectionEvent<Integer> event) voidonSelection(com.google.gwt.event.logical.shared.SelectionEvent<Integer> event) voidselectTab(int tabIndex, boolean isInitial) Selects a tab.voidselectTab(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryTabId tabId, boolean fireEvent) Selects a tab by the given id.voidsetDialogSize(int width, int height) Sets the size of the gallery parent panel and triggers the event to the tab.voidsetImageFormatNames(String imageFormatNames) Sets the image format names.voidsetImageFormats(String imageFormats) Sets the image formats.voidsetOnAttachCommand(com.google.gwt.user.client.Command onAttachCommand) Sets the on attach command.voidsetOverrideFormats(boolean overrideFormats) Sets the 'override formats' flag, which tells the format handler to prioritize the formats from the gallery dialog object.voidsetPreviewVisible(boolean visible) Sets the preview visibility.voidsetUseFormats(boolean useFormats) Sets the use formats flag.voidsetWidgetHandler(I_CmsGalleryWidgetHandler widgetHandler) Sets the widget handler.voidTruncates long text and sets the original text to the title attribute.voidupdateGalleryData(org.opencms.ade.galleries.shared.CmsGalleryDataBean data) Updates the gallery data.voidupdateSizeForTab(A_CmsTab tab) Updates the dialog size according to the requirements of the selected tab.voidUpdates variable ui-element dimensions, execute after dialog has been attached and it's content is displayed.voidSets 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, setWidgetMethods 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, unsinkEventsMethods 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-trueto hide the button
-
isNativeWidget
Returns if the gallery is used as a native widget.- Returns:
trueif 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_CmsTruncableTruncates long text and sets the original text to the title attribute.- Specified by:
truncatein 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:
onAttachin classcom.google.gwt.user.client.ui.Composite- See Also:
-