本文整理汇总了Java中org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState类的典型用法代码示例。如果您正苦于以下问题:Java ISortState类的具体用法?Java ISortState怎么用?Java ISortState使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ISortState类属于org.apache.wicket.extensions.markup.html.repeater.data.sort包,在下文中一共展示了ISortState类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newSortableHeader
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的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, " ");
}
}
};
}
示例2: testGetSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
/**
* Test of getSortState method, of class PartitionedDataProvider.
*/
@Test
public void testGetSortState() {
final ISortableDataProvider provider = context.mock(ISortableDataProvider.class);
// create instance with partitions of 2
final PartitionedDataProvider instance = new PartitionedDataProvider(provider, 2);
final ISortState sortState = context.mock(ISortState.class);
context.checking(new Expectations() {
{
oneOf(provider).getSortState();
will(returnValue(sortState));
}
});
assertSame(sortState, instance.getSortState());
}
示例3: newSortableHeader
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的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, " ");
}
}
};
}
示例4: setSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
/**
* @see ISortableDataProvider#setSortState(org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState)
*/
public final void setSortState(ISortState state) {
if (!(state instanceof SortablePageableListViewDataProvider.BasicSortState)) {
throw new IllegalArgumentException(
"argument [state] must be an instance of BasicSortState, but it is ["
+ state.getClass().getName() + "]:["
+ state.toString() + "]");
}
this.sortState = (BasicSortState) state;
}
示例5: getSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
@Override
public ISortState<S> getSortState() {
return provider.getSortState();
}
示例6: getSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
@Override
public ISortState<String> getSortState() {
return new SingleSortState<String>();
}
示例7: getSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
@Override
public ISortState<String> getSortState() {
return this.sortState;
}
示例8: getSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
@Override
public ISortState<String> getSortState() {
return sortState;
}
示例9: getSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
@Override
public ISortState<String> getSortState() {
// TODO Auto-generated method stub
return null;
}
示例10: getSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
@Override
public ISortState<SORT> getSortState() {
return singleSortState;
}
示例11: DirectoryItemsDataProvider
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
private DirectoryItemsDataProvider(List<BaseBrowsableItem> browsableChildren) {
this.browsableChildren = browsableChildren;
//Set the initial sort direction
ISortState state = getSortState();
state.setPropertySortOrder("name", SortOrder.ASCENDING);
}
示例12: getSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
@Override
public ISortState<String> getSortState() {
return sortState;
}
示例13: getSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
@Override
public ISortState<S> getSortState() {
return sortState;
}
示例14: getSortState
import org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState; //导入依赖的package包/类
/**
* @see ISortableDataProvider#getSortState()
*/
public final ISortState getSortState() {
return sortState;
}