
org.wicketstuff.kendo.ui.datatable.column.IColumn Maven / Gradle / Ivy
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.wicketstuff.kendo.ui.datatable.column;
import java.util.List;
import org.apache.wicket.util.io.IClusterable;
import org.wicketstuff.kendo.ui.datatable.DataTable;
import org.wicketstuff.kendo.ui.datatable.editor.IKendoEditor;
/**
* Specifies the column definition of a {@link DataTable}
*
* @author Sebastien Briquet - sebfz1
*/
public interface IColumn extends IClusterable
{
/**
* Gets the text of the column header
*
* @return the column title
*/
String getTitle();
/**
* Get the field in the data set that this column should be bound to.
*
* @return the field name
*/
String getField();
/**
* TODO javadoc, implement & use
*/
// void getDefaultValue();
/**
* Gets the desired width of the column.
*
* @return the column's width
*/
int getWidth();
/**
* The pixel screen width below which the column will be hidden.
* The setting takes precedence over the hidden setting, so the two should not be used at the same time.
*
* @return 0 by default
*/
int getMinScreenWidth();
/**
* If set to {@code true} the column value will be HTML-encoded before it is displayed.
* If set to {@code false} the column value will be displayed as is.
* By default the column value is HTML-encoded.
*
* @return {@code null} by default
*/
Boolean isEncoded();
/**
* Indicates whether this {@link IColumn} is selectable
*
* @return {@code null} by default, meaning not specified
*/
Boolean isSelectable();
/**
* Provides a way to specify a custom editing UI for the column.
*
* @return a {@code function} or {@code null} if it does not apply
*/
IKendoEditor getEditor();
/**
* The format that is applied to the value before it is displayed. Takes the form "{0:format}" where "format" is a standard number format, custom number format, standard date format or a custom date format.
*
* @return the format or {@code null} if it does not apply
* @see standard-number-formats
* @see custom-number-formats
* @see standard-date-formats
* @see custom-date-formats
*/
String getFormat();
/**
* The template which renders the column content.
* ie: {@code return "#:data.id#"}
* TODO: make it work for function(?)
*
* @return the template or {@code null} if it does not apply
*/
String getTemplate();
/**
* HTML attributes of the table cell rendered for the column.
*
* @return a JSON string object
*/
String getAttributes();
/**
* The template which renders the footer table cell for the column.
*
* @return the template or {@code null} if it does not apply
* @see columns.footerTemplate
*/
String getFooterTemplate();
/**
* If set to true a filter menu will be displayed for this column when filtering is enabled.
* If set to false the filter menu will not be displayed.
* By default a filter menu is displayed for all columns when filtering is enabled via the filterable option.
*
* @return the {@code filterable} object; ie: {@code true} or { extra: false }
* @see configuration-columns.filterable
*/
String getFilterable();
/**
* If set to true the column will be visible in the grid column menu. By default the column menu includes all data-bound columns (ones that have their field set).
*
* @return the {@code menu} object; ie: {@code false} or { extra: false }
* @see configuration-columns.menu
*/
String getMenu();
/**
* The aggregate(s) which are calculated when the grid is grouped by the columns field. The supported aggregates are "average", "count", "max", "min" and "sum".
*
* @return the list of aggregates
* @see configuration-columns.aggregates
*/
List getAggregates();
/**
* The template which renders the group header when the grid is grouped by the column field. By default the name of the field and the current group value is displayed.
*
* @return the text template
* @see configuration-columns.groupHeaderTemplate
*/
String getGroupHeaderTemplate();
/**
* The template which renders the group footer when the grid is grouped by the column field. By default the group footer is not displayed.
*
* @return the text template
* @see configuration-columns.groupFooterTemplate
*/
String getGroupFooterTemplate();
// schema model //
/**
* Indicates whether the model field and the column is editable
*
* @return {@code null} by default, meaning not specified
*/
Boolean isEditable();
/**
* Indicates whether the model field is nullable
*
* @return {@code null} by default, meaning not specified
*/
Boolean isNullable();
/**
* Get the field's type
* Available options are "string", "number", "boolean", "date".
*
* @return the the field's type
*/
String getType();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy