us.asciiroth.client.ui
Class MousyGrid

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.HTMLTable
                  extended by com.google.gwt.user.client.ui.Grid
                      extended by us.asciiroth.client.ui.MousyGrid
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.SourcesTableEvents, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>, SourcesMouseCellEvents

public class MousyGrid
extends com.google.gwt.user.client.ui.Grid
implements SourcesMouseCellEvents

It's a complete bastardization of the SourcesMouseEvents interface. I don't know if it's worth fixing this... it'll really confuse anyone who tries to work with it. The "Sender" is a game cell, and the x and y are the coordinates of the cell, not the mouse. Which is 1000% more useful than what the API provides. Make this a "Paintable Grid", fix the APIs, and leave it aside for the game. It's more appropriate to the editor.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.HTMLTable
com.google.gwt.user.client.ui.HTMLTable.Cell, com.google.gwt.user.client.ui.HTMLTable.CellFormatter, com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter, com.google.gwt.user.client.ui.HTMLTable.RowFormatter
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
MousyGrid(HasBoard hasBoard, int rows, int columns)
           
 
Method Summary
 void addMouseCellListener(MouseCellListener listener)
          Add a listener to this source of events.
 void addSpan(com.google.gwt.user.client.Element table, int x, int y)
           
 void onBrowserEvent(com.google.gwt.user.client.Event event)
           
 void removeMouseCellListener(MouseCellListener listener)
          Remove the listener from this source of events.
 
Methods inherited from class com.google.gwt.user.client.ui.Grid
clearCell, getCellCount, getColumnCount, getRowCount, insertRow, removeRow, resize, resizeColumns, resizeRows
 
Methods inherited from class com.google.gwt.user.client.ui.HTMLTable
addClickHandler, addTableListener, clear, getCellForEvent, getCellFormatter, getCellPadding, getCellSpacing, getColumnFormatter, getHTML, getRowFormatter, getText, getWidget, isCellPresent, iterator, remove, removeTableListener, setBorderWidth, setCellPadding, setCellSpacing, setHTML, setText, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
fireEvent, getParent, isAttached, removeFromParent, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

MousyGrid

public MousyGrid(HasBoard hasBoard,
                 int rows,
                 int columns)
Method Detail

addMouseCellListener

public void addMouseCellListener(MouseCellListener listener)
Description copied from interface: SourcesMouseCellEvents
Add a listener to this source of events.

Specified by:
addMouseCellListener in interface SourcesMouseCellEvents
Parameters:
listener - the listener to add

addSpan

public void addSpan(com.google.gwt.user.client.Element table,
                    int x,
                    int y)

onBrowserEvent

public void onBrowserEvent(com.google.gwt.user.client.Event event)
Specified by:
onBrowserEvent in interface com.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent in class com.google.gwt.user.client.ui.Widget

removeMouseCellListener

public void removeMouseCellListener(MouseCellListener listener)
Description copied from interface: SourcesMouseCellEvents
Remove the listener from this source of events.

Specified by:
removeMouseCellListener in interface SourcesMouseCellEvents
Parameters:
listener - the listener to remove

0.7

2009 Alx Dark