org.zkoss.zss.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
 boolean addWidget(Widget widget)
          Add widget to a handler, notice : WidgetHandler and Widget are implementation-sensitive.
 Spreadsheet getSpreadsheet()
          get spreadsheet of this handler
 void 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, java.lang.String widgetId)
          Redraw widget
 void updateWidgets(SSheet sheet, int left, int top, int right, int bottom)
          Deprecated. 
 

Method Detail

init

void init(Spreadsheet spreadsheet)
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

boolean addWidget(Widget widget)
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

boolean removeWidget(Widget widget)
Remove widget from a handler notice : WidgetHandler and Widget are implementation-sensitive.

Parameters:
widget -
Returns:
true if success to remove a widget

onLoadOnDemand

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. 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.


updateWidgets

@Deprecated
void updateWidgets(SSheet sheet,
                              int left,
                              int top,
                              int right,
                              int bottom)
Deprecated. 

Redraw widget from a handler per the contents changs. notice : WidgetHandler and Widget are implementation-sensitive.

Parameters:
sheet - the sheet that contents has changed
left - left column of the range
top - top row of the range
right - right column of the range
bottom - bottom row of the range

updateWidget

void updateWidget(SSheet sheet,
                  java.lang.String widgetId)
Redraw widget

Parameters:
sheet -
widgetId -


Copyright © 2005-2010 Potix Corporation. All Rights Reserved.