本文整理汇总了Java中org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator类的典型用法代码示例。如果您正苦于以下问题:Java ISortStateLocator类的具体用法?Java ISortStateLocator怎么用?Java ISortStateLocator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISortStateLocator类属于org.apache.wicket.extensions.markup.html.repeater.data.sort包,在下文中一共展示了ISortStateLocator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: IconOrderByBorder
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
public IconOrderByBorder(final DataTable<?, ?> dataTable, final String id, final S property,
final ISortStateLocator<S> stateLocator) {
super(id);
this.property = property;
this.stateLocator = stateLocator;
final AjaxFallbackOrderByBorder<S> orderByBorder = new AjaxFallbackOrderByBorder<S>("orderByBorder", property,
stateLocator) {
@Override
protected void onAjaxClick(final AjaxRequestTarget target) {
target.add(dataTable);
}
};
addToBorder(orderByBorder);
this.icon = new Icon("icon", (IconType) null);
orderByBorder.add(icon);
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:17,代码来源:IconOrderByBorder.java
示例2: newSortableHeader
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
protected WebMarkupContainer newSortableHeader(String borderId, final String sortBy,
final String groupBy,
final ISortStateLocator stateLocator) {
return new AjaxFallbackOrderByBorder(borderId, sortBy, stateLocator, getAjaxCallDecorator()) {
@Override
protected void onAjaxClick(AjaxRequestTarget target) {
target.add(getTable());
}
@Override
protected void onSortChanged() {
super.onSortChanged();
getTable().setCurrentPage(0);
// reset group
if (stateLocator instanceof IGroupStateLocator) {
IGroupStateLocator locator = (IGroupStateLocator) stateLocator;
if (isGroupedBy(locator.getGroupParam(), groupBy)) {
boolean ascending = locator.getGroupParam().isAscending();
locator.setGroupParam(new SortParam(groupBy, !ascending));
locator.getSortState().setPropertySortOrder("", SortOrder.NONE);
}
}
}
};
}
开发者ID:alancnet,项目名称:artifactory,代码行数:27,代码来源:AjaxGroupableHeadersToolbar.java
示例3: newGroupByLink
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
private Component newGroupByLink(String id, final ISortStateLocator stateLocator, final String groupProperty) {
return new AjaxLink(id) {
@Override
public void onClick(AjaxRequestTarget target) {
if (stateLocator instanceof IGroupStateLocator) {
IGroupStateLocator groupStateLocator = (IGroupStateLocator) stateLocator;
switchGroupState(groupStateLocator, groupProperty);
target.add(getTable());
}
}
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("title", "Group By");
}
@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new CancelDefaultDecorator();
}
};
}
开发者ID:alancnet,项目名称:artifactory,代码行数:24,代码来源:AjaxGroupableHeadersToolbar.java
示例4: newSortableHeader
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
protected WebMarkupContainer newSortableHeader(final String borderId, final String property,
final ISortStateLocator locator) {
return new AjaxFallbackOrderByBorder(borderId, property, locator, getAjaxCallListener()) {
private static final long serialVersionUID = 1L;
@Override
protected void onAjaxClick(final AjaxRequestTarget target) {
target.add(getTable());
}
@Override
protected void onSortChanged() {
super.onSortChanged();
getTable().setCurrentPage(0);
}
};
}
开发者ID:Nocket,项目名称:nocket,代码行数:18,代码来源:DMDAjaxHeadersToolbar.java
示例5: newSortableHeader
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected WebMarkupContainer newSortableHeader(String headerId, final String property, final ISortStateLocator locator) {
return new AjaxFallbackOrderByBorder(headerId, property, locator) {
@Override
protected void onSortChanged() {
getTable().setCurrentPage(0);
}
@Override
protected void onAjaxClick(AjaxRequestTarget target) {
target.add(getTable());
}
@Override
public void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
ISortState sortState = locator.getSortState();
SortOrder dir = sortState.getPropertySortOrder(property);
String cssClass;
if (dir == SortOrder.ASCENDING) {
cssClass = "sortable asc";
} else if (dir == SortOrder.DESCENDING) {
cssClass = "sortable desc";
} else {
cssClass = "sortable";
}
if (!Strings.isEmpty(cssClass)) {
tag.append("class", cssClass, " ");
}
}
};
}
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:35,代码来源:TableHeadersToolbar.java
示例6: newOrderByLink
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected OrderByLink newOrderByLink(String id, Object property, ISortStateLocator stateLocator) {
return new OrderByLink(id, property, stateLocator) {
@Override
protected void onSortChanged() {
BasicOrderByBorder.this.onSortChanged();
}
};
}
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:11,代码来源:BasicOrderByBorder.java
示例7: newHeadersToolbar
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
protected AbstractToolbar newHeadersToolbar() {
return new AjaxFallbackHeadersToolbar<String>(this, (ISortableDataProvider<Object, String>) getDataProvider()) {
@Override
protected WebMarkupContainer newSortableHeader(final String headerId, final String property,
final ISortStateLocator<String> locator) {
return ModelDataTable.this.newSortableHeader(getTable(), headerId, property, locator);
}
};
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:11,代码来源:ModelDataTable.java
示例8: newSortableHeader
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected WebMarkupContainer newSortableHeader(String headerId, final String property, final ISortStateLocator locator) {
return new AjaxFallbackOrderByBorder(headerId, property, locator) {
@Override
protected void onSortChanged() {
getTable().setCurrentPage(0);
}
@Override
protected void onAjaxClick(AjaxRequestTarget target) {
target.add(getTable());
}
@Override
public void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
ISortState sortState = locator.getSortState();
SortOrder dir = sortState.getPropertySortOrder(property);
String cssClass;
if (dir == SortOrder.ASCENDING) {
cssClass = "sortable asc";
} else if (dir == SortOrder.DESCENDING) {
cssClass = "sortable desc";
} else {
cssClass = "sortable";
}
if (!Strings.isEmpty(cssClass)) {
tag.append("class", cssClass, " ");
}
}
};
}
开发者ID:Evolveum,项目名称:midpoint,代码行数:35,代码来源:TableHeadersToolbar.java
示例9: newSortableHeader
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected WebMarkupContainer newSortableHeader(String headerId, Object property, ISortStateLocator locator) {
return new BasicOrderByBorder(headerId, property, locator) {
@Override
protected void onSortChanged() {
getTable().setCurrentPage(0);
}
};
}
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:11,代码来源:TableHeadersToolbar.java
示例10: newOrderByLink
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected OrderByLink newOrderByLink(String id, Object property, ISortStateLocator stateLocator) {
return new OrderByLink(id, property, stateLocator, new OrderByLink.VoidCssProvider()) {
@Override
protected void onSortChanged() {
BasicOrderByBorder.this.onSortChanged();
}
};
}
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:11,代码来源:BasicOrderByBorder.java
示例11: newSortableHeader
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
@Override
protected WebMarkupContainer newSortableHeader(String headerId, S property, ISortStateLocator<S> locator) {
return new OrderByBorder<S>(headerId, property, locator, new OrderByLink.CssProvider<S>("", "", "")) {
private static final long serialVersionUID = 1L;
@Override
protected void onSortChanged() {
getTable().setCurrentPage(0);
}
};
}
开发者ID:PkayJava,项目名称:pluggable,代码行数:12,代码来源:HeadersToolbar.java
示例12: DataPanel
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
public DataPanel(String id, int rowsPerPage) {
super(id);
List<IColumn> columns = getColumns();
SortableListModel<T> sortableListModel = getSortableListModel();
SortableDataProvider dataProvider = new SortableListDataProvider(sortableListModel);
dataTable = new DataTable("dataTable", columns.toArray(new IColumn[0]), dataProvider, rowsPerPage);
add(dataTable);
dataTable.setOutputMarkupId(true);
dataTable.setVersioned(false);
dataTable.addTopToolbar(new AjaxFallbackHeadersToolbar(dataTable, dataProvider) {
@Override
protected WebMarkupContainer newSortableHeader(String borderId,
String property, ISortStateLocator locator) {
WebMarkupContainer sortableHeader = super.newSortableHeader(borderId, property, locator);
sortableHeader.add(new SimpleAttributeModifier("scope", "col"));
return sortableHeader;
}
});
dataTable.addBottomToolbar(new AjaxNavigationToolbar(dataTable) {
@Override
protected PagingNavigator newPagingNavigator(String navigatorId,
DataTable table) {
return new AutoHidePagingNavigator(navigatorId, table);
}
});
dataTable.addBottomToolbar(new NoRecordsToolbar(dataTable));
dataTable.setItemReuseStrategy(new ReuseIfModelsEqualStrategy());
}
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:31,代码来源:DataPanel.java
示例13: DataViewOrderByLink
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
/**
* @param id
* @param property
* @param stateLocator
* @param cssProvider
*/
public DataViewOrderByLink(String id, String property, DataView dataView,
ICssProvider cssProvider) {
super(id, property, (ISortStateLocator) dataView.getDataProvider(),
cssProvider);
this.dataView = dataView;
}
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:13,代码来源:DataViewOrderByLink.java
示例14: TableHeadersToolbar
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
public TableHeadersToolbar(DataTable<T, String> table, ISortStateLocator stateLocator) {
super(table, stateLocator);
}
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:4,代码来源:TableHeadersToolbar.java
示例15: BasicOrderByBorder
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
protected BasicOrderByBorder(String id, Object property, ISortStateLocator stateLocator) {
super(id, property, stateLocator);
}
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:4,代码来源:BasicOrderByBorder.java
示例16: newSortableHeader
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
protected WebMarkupContainer newSortableHeader(final DataTable<?, ?> table, final String headerId,
final String property, final ISortStateLocator<String> locator) {
return new IconOrderByBorder<String>(table, headerId, property, locator);
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:5,代码来源:ModelDataTable.java
示例17: HeaderCssModel
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
public HeaderCssModel(ISortStateLocator stateLocator, String property) {
this.stateLocator = stateLocator;
this.property = property;
}
开发者ID:alancnet,项目名称:artifactory,代码行数:5,代码来源:AjaxGroupableHeadersToolbar.java
示例18: DMDAjaxHeadersToolbar
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
/**
* Constructor
*
* @param table
* @param stateLocator
*/
public DMDAjaxHeadersToolbar(final DataTable<?, String> table, final ISortStateLocator<String> stateLocator) {
super(table);
RepeatingView headers = new RepeatingView("headers");
add(headers);
final List<? extends IColumn<?, String>> columns = table.getColumns();
for (final IColumn<?, String> column : columns) {
AbstractItem item = new AbstractItem(headers.newChildId());
headers.add(item);
WebMarkupContainer header = null;
if (column.isSortable()) {
header = newSortableHeader("header", column.getSortProperty(), stateLocator);
} else {
header = new WebMarkupContainer("header");
}
if (column instanceof IStyledColumn<?, ?>) {
header.add(new CssClassAttributeBehaviour()
{
private static final long serialVersionUID = 1L;
@Override
protected String getCssClass()
{
return ((IStyledColumn<?, ?>) column).getCssClass();
}
});
}
if (column instanceof IDMDStyledColumn<?, ?>) {
header.add(new CssStyleAttributeBehavior()
{
private static final long serialVersionUID = 1L;
@Override
protected String getColumnCssStyleAttribute()
{
return ((IDMDStyledColumn<?, ?>) column).getCssStyleAttribute();
}
});
}
item.add(header);
item.setRenderBodyOnly(true);
header.add(column.getHeader("label"));
}
table.setOutputMarkupId(true);
}
开发者ID:Nocket,项目名称:nocket,代码行数:58,代码来源:DMDAjaxHeadersToolbar.java
示例19: DMDHeadersToolbar
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
/**
* Constructor
*
* @param table
* data table this toolbar will be attached to
* @param stateLocator
* locator for the ISortState implementation used by sortable
* headers
*/
public DMDHeadersToolbar(final DataTable<?, String> table, final ISortStateLocator<String> stateLocator) {
super(table);
RepeatingView headers = new RepeatingView("headers");
add(headers);
final List<? extends IColumn<?, String>> columns = table.getColumns();
for (final IColumn<?, String> column : columns) {
AbstractItem item = new AbstractItem(headers.newChildId());
headers.add(item);
WebMarkupContainer header = null;
if (column.isSortable()) {
header = newSortableHeader("header", column.getSortProperty(), stateLocator);
}
else {
header = new WebMarkupContainer("header");
}
if (column instanceof IStyledColumn<?, ?>) {
header.add(new CssClassAttributeBehaviour() {
private static final long serialVersionUID = 1L;
@Override
protected String getCssClass() {
return ((IStyledColumn<?, ?>) column).getCssClass();
}
});
}
if (column instanceof IDMDStyledColumn<?, ?>) {
header.add(new CssStyleAttributeBehavior() {
private static final long serialVersionUID = 1L;
@Override
protected String getColumnCssStyleAttribute() {
return ((IDMDStyledColumn<?, ?>) column).getCssStyleAttribute();
}
});
}
item.add(header);
item.setRenderBodyOnly(true);
header.add(column.getHeader("label"));
}
}
开发者ID:Nocket,项目名称:nocket,代码行数:59,代码来源:DMDHeadersToolbar.java
示例20: JavaScriptHeaderToolbar
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator; //导入依赖的package包/类
/**
* Instantiates a new java script header toolbar.
*
* @param table the table
* @param stateLocator the state locator
*/
public JavaScriptHeaderToolbar(final DataTable<?, String> table, final ISortStateLocator<String> stateLocator) {
super(table);
RepeatingView headers = new RepeatingView("headers");
add(headers);
final List<? extends IColumn<?, ?>> columns = table.getColumns();
for (final IColumn<?, ?> column : columns) {
WebMarkupContainer item = new WebMarkupContainer(headers.newChildId());
headers.add(item);
WebMarkupContainer header = null;
header = new WebMarkupContainer("header");
if (!column.isSortable()) {
header.add(new AttributeModifier("class", "sorttable_nosort"));
} else {
header.add(new AttributeModifier("class", " "));
}
if (column instanceof IStyledColumn<?, ?>) {
header.add(new CssClassAttributeBehaviour()
{
private static final long serialVersionUID = 1L;
@Override
protected String getCssClass()
{
return ((IStyledColumn<?, ?>) column).getCssClass();
}
});
}
if (column instanceof IDMDStyledColumn<?, ?>) {
header.add(new CssStyleAttributeBehavior()
{
private static final long serialVersionUID = 1L;
@Override
protected String getColumnCssStyleAttribute()
{
return ((IDMDStyledColumn<?, ?>) column).getCssStyleAttribute();
}
});
}
item.add(header);
item.setRenderBodyOnly(true);
Component lab = column.getHeader("label");
lab.setRenderBodyOnly(true);
header.add(lab);
}
}
开发者ID:Nocket,项目名称:nocket,代码行数:60,代码来源:JavaScriptHeaderToolbar.java
注:本文中的org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortStateLocator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论