Package io.keikai.ui.sys
Interface WidgetHandler
- All Known Implementing Classes:
DefaultWidgetHandler,VoidWidgetHandler
public interface WidgetHandler
WidgetHandler control when widgets should display on client, when should remove.
WidgetHandler and Widget are implementation-sensitive.
- Author:
- Dennis.Chen
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd widget to a handler, notice : WidgetHandler and Widget are implementation-sensitive.Internal used onlyget spreadsheet of this handlervoidinit(Spreadsheet spreadsheet) initial a widget handler.voidinvalidate this handle, which means all widget in client side will be remove, and need to re-drew.voidonLoadOnDemand(SSheet sheet, int left, int top, int right, int bottom) call when spreadsheet try to load a block of cell to client side.booleanremoveWidget(Widget widget) Remove widget from a handler notice : WidgetHandler and Widget are implementation-sensitive.voidupdateWidget(SSheet sheet, String widgetId) Redraw widget
-
Method Details
-
init
initial a widget handler. this method will be invoked by spreadsheet, you should not call this method directly.- Parameters:
spreadsheet-
-
getSpreadsheet
Spreadsheet getSpreadsheet()get spreadsheet of this handler- Returns:
- spreadsheet
-
addWidget
Add widget to a handler, notice : WidgetHandler and Widget are implementation-sensitive.- Parameters:
widget- a widget- Returns:
- true if success to add a widget
-
removeWidget
Remove widget from a handler notice : WidgetHandler and Widget are implementation-sensitive.- Parameters:
widget-- Returns:
- true if success to remove a widget
-
onLoadOnDemand
call when spreadsheet try to load a block of cell to client side. handler should take care this method and load corresponding widgets, which in the block , to client side. this method will be invoked by spreadsheet, you should not call this method directly. -
invaliate
void invaliate()invalidate this handle, which means all widget in client side will be remove, and need to re-drew. this method will be invoked when spreadsheet invalidate only. -
updateWidget
Redraw widget- Parameters:
sheet-widgetId-
-
getClientWidgets
Internal used only
-