/** * Used by {@link #TYPE_ROWS_UPDATED}. Return value is never <code>null</code>. */ public Set<IColumn<?>> getUpdatedColumns(ITableRow row) { return CollectionUtility.hashSet(m_updatedColumns == null ? null : m_updatedColumns.get(row)); }
/** * local images and local resources bound to the html text */ @Override public Set<BinaryResource> getAttachments() { return CollectionUtility.hashSet(m_attachments.values()); }
protected Set<TileGridMenuType> getMenuTypesForSelection(List<? extends ITile> selection) { if (CollectionUtility.isEmpty(selection)) { return CollectionUtility.hashSet(TileGridMenuType.EmptySpace); } else if (CollectionUtility.size(selection) == 1) { return CollectionUtility.hashSet(TileGridMenuType.SingleSelection); } else { return CollectionUtility.hashSet(TileGridMenuType.MultiSelection); } } }
protected Set<TableMenuType> getMenuTypesForSelection(List<? extends ITableRow> selection) { if (CollectionUtility.isEmpty(selection)) { return CollectionUtility.hashSet(TableMenuType.EmptySpace); } else if (CollectionUtility.size(selection) == 1) { return CollectionUtility.hashSet(TableMenuType.SingleSelection); } else { return CollectionUtility.hashSet(TableMenuType.MultiSelection); } } }
/** * Value, empty {@link Set} in case of an empty value, never <code>null</code>. */ @Override public Set<T> getValue() { return CollectionUtility.hashSet(super.getValue()); }
/** * Initial value, empty {@link Set} in case of an empty value, never <code>null</code>. */ @Override public Set<T> getInitValue() { return CollectionUtility.hashSet(super.getInitValue()); }
@Override protected final Set<KEY> validateValueInternal(Set<KEY> rawValue0) { Set<KEY> rawValue = CollectionUtility.hashSet(rawValue0); return doValidateValueInternal(rawValue); }
@Override protected final Set<T> validateValueInternal(Set<T> rawValue0) { // ensure a copy of the input values Set<T> rawValue = CollectionUtility.hashSet(rawValue0); return doValidateValueInternal(rawValue); }
@Order(10) protected Set<Integer> getConfiguredAvailableDisplayModes() { return CollectionUtility.hashSet( IPlannerDisplayMode.DAY, IPlannerDisplayMode.WEEK, IPlannerDisplayMode.MONTH, IPlannerDisplayMode.WORK_WEEK, IPlannerDisplayMode.CALENDAR_WEEK, IPlannerDisplayMode.YEAR); }
@Override public void updateNode(ITreeNode node) { if (node != null) { updateChildNodes(node.getParentNode(), CollectionUtility.hashSet(node)); } }
@Override public void selectNode(ITreeNode node, boolean append) { if (node != null) { selectNodes(CollectionUtility.hashSet(node), append); } else { selectNodes(null, append); } }
@SuppressWarnings("unchecked") private static <T> void setValueToHolder(IHolder<T> holder, List<Object> list) { Class<T> toType = holder.getHolderType(); if (Set.class.isAssignableFrom(toType)) { T s = (T) CollectionUtility.hashSet(list); holder.setValue(s); } else { holder.setValue((T) list); } }
@Override public Set<ITreeNode> getUpdatedNodes() { CollectingVisitor<ITreeNode> v = new CollectingVisitor<ITreeNode>() { @Override protected boolean accept(ITreeNode element) { return element.isStatusUpdated(); } }; visitNode(getRootNode(), v); return CollectionUtility.hashSet(v.getCollection()); }
@Override public void exportFormFieldData(AbstractFormFieldData target) { @SuppressWarnings("unchecked") AbstractValueFieldData<Set<KEY>> v = (AbstractValueFieldData<Set<KEY>>) target; Set<KEY> value = getValue(); if (CollectionUtility.isEmpty(value)) { v.setValue(null); } else { v.setValue(CollectionUtility.hashSet(this.getValue())); } }
private void fireRequestFocusInCell(IColumn<?> column, ITableRow row) { TableEvent e = new TableEvent(this, TableEvent.TYPE_REQUEST_FOCUS_IN_CELL); e.setColumns(CollectionUtility.hashSet(column)); e.setRows(CollectionUtility.arrayList(row)); fireTableEventInternal(e); }
@Override public void exportFormFieldData(AbstractFormFieldData target) { @SuppressWarnings("unchecked") AbstractValueFieldData<Set<T>> v = (AbstractValueFieldData<Set<T>>) target; Set<T> value = getValue(); if (CollectionUtility.isEmpty(value)) { v.setValue(null); } else { v.setValue(CollectionUtility.hashSet(this.getValue())); } }
protected List<IMenu> execComputeTableEmptySpaceMenus() { T table = getTable(); if (table == null) { return CollectionUtility.emptyArrayList(); } return ActionUtility.getActions(table.getMenus(), ActionUtility.createMenuFilterMenuTypes(CollectionUtility.hashSet(TableMenuType.EmptySpace), false)); }
public void updateGroupingColumn(IColumn<?> col, boolean ascending) { col = resolveColumn(col); if (!isGroupingColumn(col) || col.isSortPermanent()) { return; } HeaderCell cell = (HeaderCell) col.getHeaderCell(); cell.setSortAscending(ascending); rebuildHeaderCell(col); fireColumnHeadersUpdated(CollectionUtility.hashSet(col)); }