Package org.opencms.ade.publish.client
Class CmsPublishGroupPanel
- 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.publish.client.CmsPublishGroupPanel
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,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
public class CmsPublishGroupPanel extends com.google.gwt.user.client.ui.Composite
A panel representing a single publish group.- Since:
- 8.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected static I_CmsPublishCss
CSS
The CSS bundle used for this widget.static int[]
DEFAULT_SLOT_MAPPING
Button slot mapping for publish list items.protected int
m_groupIndex
The group index for this panel's corresponding group.protected CmsPublishDataModel
m_model
The data model for the publish dialog.protected I_CmsPublishSelectionChangeHandler
m_selectionChangeHandler
The handler which is called when the publish item selection changes.static int
SLOT_EDIT
The slot for the preview button.static int
SLOT_MENU
The slot for the context menu button.static int
SLOT_REMOVE
The slot for the 'remove' checkbox.static int
SLOT_WARNING
The slot for the warning symbol.
-
Constructor Summary
Constructors Constructor Description CmsPublishGroupPanel(org.opencms.ade.publish.shared.CmsPublishGroup publishGroup, java.lang.String title, int groupIndex, I_CmsPublishSelectionChangeHandler selectionChangeHandler, CmsPublishDataModel model, java.util.Map<org.opencms.util.CmsUUID,org.opencms.ade.publish.client.CmsPublishItemSelectionController> controllersById, CmsContextMenuHandler menuHandler, I_CmsContentEditorHandler editorHandler, boolean showProblemsOnly)
Constructs a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addNextItem()
Adds the list item for the next publish resource and returns true on success, while also incrementing the internal item index.static CmsListItemWidget
createListItemWidget(org.opencms.ade.publish.shared.CmsPublishResource resourceBean, int[] slotMapping)
Creates a basic list item widget for a given publish resource bean.static void
fillButtonSlot(CmsListItemWidget listItemWidget, int index, com.google.gwt.user.client.ui.Widget widget, int[] slotMapping)
Fills a slot for a button in a publish list item widget.boolean
hasMoreItems()
Returns true if there are more potential items to add.protected boolean
hasNoProblemResources()
Returns true if the corresponding group has no resources with problems.protected boolean
hasOnlyProblemResources()
Returns true if the corresponding group has only resources with problems.void
hideGroupSelectCheckBox()
Hides the tri-state select box for the group.void
updateCheckboxState(CmsPublishItemStateSummary value)
Updates the check box state for this group.-
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, 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 Detail
-
DEFAULT_SLOT_MAPPING
public static int[] DEFAULT_SLOT_MAPPING
Button slot mapping for publish list items.
-
SLOT_EDIT
public static final int SLOT_EDIT
The slot for the preview button.- See Also:
- Constant Field Values
-
SLOT_MENU
public static final int SLOT_MENU
The slot for the context menu button.- See Also:
- Constant Field Values
-
SLOT_REMOVE
public static final int SLOT_REMOVE
The slot for the 'remove' checkbox.- See Also:
- Constant Field Values
-
SLOT_WARNING
public static final int SLOT_WARNING
The slot for the warning symbol.- See Also:
- Constant Field Values
-
CSS
protected static final I_CmsPublishCss CSS
The CSS bundle used for this widget.
-
m_groupIndex
protected int m_groupIndex
The group index for this panel's corresponding group.
-
m_model
protected CmsPublishDataModel m_model
The data model for the publish dialog.
-
m_selectionChangeHandler
protected I_CmsPublishSelectionChangeHandler m_selectionChangeHandler
The handler which is called when the publish item selection changes.
-
-
Constructor Detail
-
CmsPublishGroupPanel
public CmsPublishGroupPanel(org.opencms.ade.publish.shared.CmsPublishGroup publishGroup, java.lang.String title, int groupIndex, I_CmsPublishSelectionChangeHandler selectionChangeHandler, CmsPublishDataModel model, java.util.Map<org.opencms.util.CmsUUID,org.opencms.ade.publish.client.CmsPublishItemSelectionController> controllersById, CmsContextMenuHandler menuHandler, I_CmsContentEditorHandler editorHandler, boolean showProblemsOnly)
Constructs a new instance.- Parameters:
publishGroup
- the group for which to build the group paneltitle
- the title of the groupgroupIndex
- the index of the group which this panel should renderselectionChangeHandler
- the handler for selection changes for publish resourcesmodel
- the data model for the publish resourcescontrollersById
- the map of selection controllers to which this panel's selection controllers should be addedmenuHandler
- the context menu handlereditorHandler
- the content editor handlershowProblemsOnly
- if true, sets this panel into "show resources with problems only" mode
-
-
Method Detail
-
createListItemWidget
public static CmsListItemWidget createListItemWidget(org.opencms.ade.publish.shared.CmsPublishResource resourceBean, int[] slotMapping)
Creates a basic list item widget for a given publish resource bean.- Parameters:
resourceBean
- the publish resource beanslotMapping
- maps button slot ids to actual button indexes- Returns:
- the list item widget representing the publish resource bean
-
fillButtonSlot
public static void fillButtonSlot(CmsListItemWidget listItemWidget, int index, com.google.gwt.user.client.ui.Widget widget, int[] slotMapping)
Fills a slot for a button in a publish list item widget.- Parameters:
listItemWidget
- the list item widgetindex
- the slot indexwidget
- the widget which should be displayed in the slotslotMapping
- array mapping logical slot ids to button indexes
-
addNextItem
public boolean addNextItem()
Adds the list item for the next publish resource and returns true on success, while also incrementing the internal item index.- Returns:
- true if an item was added
-
hasMoreItems
public boolean hasMoreItems()
Returns true if there are more potential items to add.- Returns:
- true if there are possibly more items
-
hideGroupSelectCheckBox
public void hideGroupSelectCheckBox()
Hides the tri-state select box for the group.
-
updateCheckboxState
public void updateCheckboxState(CmsPublishItemStateSummary value)
Updates the check box state for this group.- Parameters:
value
- the state to use for updating the check box
-
hasNoProblemResources
protected boolean hasNoProblemResources()
Returns true if the corresponding group has no resources with problems.- Returns:
- true if the group for this panel has no resources with problems
-
hasOnlyProblemResources
protected boolean hasOnlyProblemResources()
Returns true if the corresponding group has only resources with problems.- Returns:
- true if the group for this panel has only resources with problems.
-
-