public class SpreadsheetDriverWidget extends WebDriverWidget<SpreadsheetConfig,SpreadsheetCommands>
Modifier and Type | Class and Description |
---|---|
(package private) class |
SpreadsheetDriverWidget.EventHandler
Event handling coming from the Spreadsheet backend.
|
Modifier and Type | Field and Description |
---|---|
private SheetController |
controller
Spreadsheet controller
|
private SheetEventHandler |
eventHandler
Spreadsheet event handler
|
private boolean |
inBatch
Active batch flag
|
private boolean |
initTimeout
Initialization timeout error flag
|
private java.lang.Object |
lock
Lock
|
private static java.util.logging.Logger |
LOG
Logger
|
private org.eclipse.jetty.webapp.WebAppContext |
webApp
Web application
|
websock, widgetId, window
Constructor and Description |
---|
SpreadsheetDriverWidget(int widgetId,
GuiWebSocket websock)
Initialize the web component.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy the driver-specific widget.
|
private void |
emitEvent(java.lang.String name,
BaseDataType... args)
Emits event on the server.
|
private void |
emitEvent(java.lang.String name,
java.util.function.Consumer<BaseDataType[]> completion,
BaseDataType... args)
Emits event on the server.
|
SheetEventHandler |
getEventHandler()
Event handler getter.
|
private java.io.File |
getWARPath()
Returns the path of the spreadsheet backed war file.
|
java.lang.Object |
invokeWidgetCommand(SpreadsheetCommands command,
java.lang.Object[] args)
Invokes a command on this widget.
|
void |
placeWidget(NativeRectangle bounds)
Place the driver-specific widget at the specified bounds, using the currently selected
window.
|
void |
setController(SheetController controller)
Controller setter.
|
config, getWindow, setEnabled, setVisible, setWindow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invokeWidgetCommand, setWidgetAttribute
private static java.util.logging.Logger LOG
private org.eclipse.jetty.webapp.WebAppContext webApp
private SheetController controller
private SheetEventHandler eventHandler
private java.lang.Object lock
private boolean inBatch
private boolean initTimeout
public SpreadsheetDriverWidget(int widgetId, GuiWebSocket websock)
widgetId
- The widget's ID.websock
- The web socket.public void setController(SheetController controller)
controller
- Controller instance.public SheetEventHandler getEventHandler()
public void placeWidget(NativeRectangle bounds)
placeWidget
in interface DriverWidget<SpreadsheetCommands>
placeWidget
in class WebDriverWidget<SpreadsheetConfig,SpreadsheetCommands>
bounds
- Widget bounds.public void destroy()
destroy
in interface DriverWidget<SpreadsheetCommands>
destroy
in class WebDriverWidget<SpreadsheetConfig,SpreadsheetCommands>
public java.lang.Object invokeWidgetCommand(SpreadsheetCommands command, java.lang.Object[] args)
command
- The command to invoke.args
- Optional event arguments.private void emitEvent(java.lang.String name, BaseDataType... args)
name
- Event name.args
- Event arguments.private void emitEvent(java.lang.String name, java.util.function.Consumer<BaseDataType[]> completion, BaseDataType... args)
name
- Event name.completion
- Completion handler, invoked after the event is dispatched.args
- Event arguments.private java.io.File getWARPath()