Package io.keikaiex.ui.widget
Class DefaultWidgetHandler
- java.lang.Object
-
- io.keikaiex.ui.widget.DefaultWidgetHandler
-
- All Implemented Interfaces:
WidgetHandler
,Serializable
public class DefaultWidgetHandler extends Object implements WidgetHandler, Serializable
- Author:
- Dennis.Chen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultWidgetHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addWidget(Widget widget)
Add widget to a handler, notice : WidgetHandler and Widget are implementation-sensitive.Spreadsheet
getSpreadsheet()
get spreadsheet of this handlervoid
init(Spreadsheet spreadsheet)
initial a widget handler.void
invaliate()
invalidate this handle, which means all widget in client side will be remove, and need to re-drew.void
onLoadOnDemand(SSheet sheet, int left, int top, int right, int bottom)
call when spreadsheet try to load a block of cell to client side.boolean
removeWidget(Widget widget)
Remove widget from a handler notice : WidgetHandler and Widget are implementation-sensitive.void
updateWidget(SSheet sheet, String widgetId)
Redraw widget
-
-
-
Method Detail
-
addWidget
public boolean addWidget(Widget widget)
Description copied from interface:WidgetHandler
Add widget to a handler, notice : WidgetHandler and Widget are implementation-sensitive.- Specified by:
addWidget
in interfaceWidgetHandler
- Parameters:
widget
- a widget- Returns:
- true if success to add a widget
-
updateWidget
public void updateWidget(SSheet sheet, String widgetId)
Description copied from interface:WidgetHandler
Redraw widget- Specified by:
updateWidget
in interfaceWidgetHandler
-
getSpreadsheet
public Spreadsheet getSpreadsheet()
Description copied from interface:WidgetHandler
get spreadsheet of this handler- Specified by:
getSpreadsheet
in interfaceWidgetHandler
- Returns:
- spreadsheet
-
removeWidget
public boolean removeWidget(Widget widget)
Description copied from interface:WidgetHandler
Remove widget from a handler notice : WidgetHandler and Widget are implementation-sensitive.- Specified by:
removeWidget
in interfaceWidgetHandler
- Returns:
- true if success to remove a widget
-
init
public void init(Spreadsheet spreadsheet)
Description copied from interface:WidgetHandler
initial a widget handler. this method will be invoked by spreadsheet, you should not call this method directly.- Specified by:
init
in interfaceWidgetHandler
-
onLoadOnDemand
public void onLoadOnDemand(SSheet sheet, int left, int top, int right, int bottom)
Description copied from interface:WidgetHandler
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.- Specified by:
onLoadOnDemand
in interfaceWidgetHandler
-
invaliate
public void invaliate()
Description copied from interface:WidgetHandler
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.- Specified by:
invaliate
in interfaceWidgetHandler
-
-