selectDate(focusedDate);
} else {
- getLogger().info("Trying to select a the focused date which is NULL!");
+ getLogger()
+ .info("Trying to select the focused date which is NULL!");
}
}
}
}
+ /**
+ * Sets the style names for dates.
+ *
+ * @param dateStyles
+ * the map of date string to style name
+ *
+ * @since 8.3
+ */
public void setDateStyles(Map<String, String> dateStyles) {
this.dateStyles.clear();
if (dateStyles != null) {
*
* @param textFocus
* the focus of the {@link #text}
- * @since
+ * @since 8.3
*/
protected void checkGroupFocus(boolean textFocus) {
boolean newGroupFocus = textFocus | hasChildFocus();
*
* @return {@code true} if any of the child component has focus,
* {@code false} otherwise
- * @since
+ * @since 8.3
*/
protected boolean hasChildFocus() {
return false;
// #9258 apply the v-disabled class when disabled for UX
button.setStyleName(StyleConstants.DISABLED,
!isEnabled() || !optionEnabled);
- updateItemSelection(button, item.getBoolean(ListingJsonConstants.JSONKEY_ITEM_SELECTED));
+ updateItemSelection(button,
+ item.getBoolean(ListingJsonConstants.JSONKEY_ITEM_SELECTED));
String key = item.getString(DataCommunicatorConstants.KEY);
public void selectItemKey(String selectedItemKey) {
// At most one item could be selected so reset all radio buttons
// before applying current selection
- keyToOptions.values().forEach(button -> updateItemSelection(button, false));
+ keyToOptions.values()
+ .forEach(button -> updateItemSelection(button, false));
if (selectedItemKey != null) {
RadioButton radioButton = keyToOptions.get(selectedItemKey);
if (radioButton != null) { // Items might not be loaded yet
}
}
+ /**
+ * Updates the selected state of a radio button.
+ *
+ * @param radioButton
+ * the radio button to update
+ * @param value
+ * {@code true} if selected; {@code false} if not
+ */
protected void updateItemSelection(RadioButton radioButton, boolean value) {
radioButton.setValue(value);
radioButton.setStyleName(CLASSNAME_OPTION_SELECTED, value);
*
* @return {@code true} to handle events from widgets; {@code false} to
* not
+ * @since 8.3
*/
public boolean isWidgetEventsAllowed() {
return widgetEventsAllowed;
* @param widgetEventsAllowed
* {@code true} to let grid handle events from widgets;
* {@code false} to not
+ *
+ * @since 8.3
*/
public void setWidgetEventsAllowed(boolean widgetEventsAllowed) {
this.widgetEventsAllowed = widgetEventsAllowed;
public String getName();
/**
- * Gets the top level name of this property
+ * Gets the top level name of this property.
*
* @return the top level property name, not <code>null</code>
+ * @since 8.3
*/
- public default String getTopLevelName() {return getName();}
-
+ public default String getTopLevelName() {
+ return getName();
+ }
+
/**
* Gets the human readable caption to show for this property.
*
* @param styleName
* the custom style name(s) for given date, {@code null} to clear
* custom style name(s)
+ *
+ * @since 8.3
*/
public void setDateStyle(LocalDate date, String styleName) {
if (date != null) {
* @return the corresponding style name(s), if any, {@code null} otherwise
*
* @see {@link #setDateStyle(LocalDate, String)}
+ * @since 8.3
*/
public String getDateStyle(LocalDate date) {
if (date == null) {
* @return map from dates to custom style names in each date's calendar cell
*
* @see {@link #setDateStyle(LocalDate, String)}
+ * @since 8.3
*/
public Map<LocalDate, String> getDateStyles() {
HashMap<LocalDate, String> hashMap = new HashMap<>();
* @param widgetEventsAllowed
* {@code true} to handle events; {@code false} to not
* @return this column
+ * @since 8.3
*/
public Column<T, V> setWidgetEventsAllowed(
boolean widgetEventsAllowed) {
* @see #setWidgetEventsAllowed(boolean)
*
* @return {@code true} if handling events; {@code false} if not
+ * @since 8.3
*/
public boolean isWidgetEventsAllowed() {
return getState(false).widgetEventsAllowed;
* the new description string for the component.
* @param mode
* the content mode for the description
- * @since
+ * @since 8.3
*/
public void setDescription(String description, ContentMode mode) {
this.description = description;
*
* @return the {@link ContentMode} of the description of this menu item
* @see ContentMode
- * @since
+ * @since 8.3
*/
public ContentMode getContentMode() {
return contentMode;
/**
* Map of custom style names that correspond with given dates. Each date
* must be set to midnight for the handling logic to work correctly.
+ *
+ * @since 8.3
*/
public Map<String, String> dateStyles = new HashMap<String, String>();
public String internalId;
public boolean sortable = false;
public boolean editable = false;
+
+ /**
+ * Sets whether Grid should handle events from Widgets from this column or
+ * not.
+ *
+ * @since 8.3
+ */
public boolean widgetEventsAllowed = false;
/** The assistive device caption for the column. */