com.sencha.gxt.cell.core.client.form
Class FieldCell<T>

java.lang.Object
  extended by com.google.gwt.cell.client.AbstractCell<C>
      extended by com.google.gwt.cell.client.AbstractEditableCell<C,V>
          extended by com.google.gwt.cell.client.AbstractInputCell<T,V>
              extended by com.sencha.gxt.cell.core.client.AbstractEventInputCell<T,FieldCell.FieldViewData>
                  extended by com.sencha.gxt.cell.core.client.form.FieldCell<T>
All Implemented Interfaces:
Cell<T>, ResizableCell
Direct Known Subclasses:
SliderCell, ValueBaseInputCell

public abstract class FieldCell<T>
extends AbstractEventInputCell<T,FieldCell.FieldViewData>
implements ResizableCell


Nested Class Summary
static interface FieldCell.FieldAppearance
           
static class FieldCell.FieldAppearanceOptions
           
static class FieldCell.FieldViewData
           
 
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell
Cell.Context
 
Constructor Summary
FieldCell(FieldCell.FieldAppearance appearance, Set<String> consumedEvents)
           
FieldCell(FieldCell.FieldAppearance appearance, String... consumedEvents)
           
 
Method Summary
 void disable(XElement parent)
          Disables the cell.
 void enable(XElement parent)
          Enables the cell.
 void finishEditing(Element parent, T value, Object key, ValueUpdater<T> valueUpdater)
           
 int getHeight()
          Returns the height.
 int getWidth()
          Returns the width.
 boolean handlesSelection()
           
 boolean isDisabled()
          Returns the cell's disabled state.
 boolean isReadOnly()
          Returns the cell's read only state.
 void onBrowserEvent(Cell.Context context, Element parent, T value, NativeEvent event, ValueUpdater<T> valueUpdater)
           
abstract  void onEmpty(XElement parent, boolean empty)
           
 void onValid(XElement parent, boolean valid)
           
 boolean redrawOnResize()
          Determines if the cell should be redrawn when resized by @link CellComponent.
 void setHeight(int height)
          Sets the height.
 void setName(XElement parent, String name)
           
 void setReadOnly(boolean readOnly)
           
 void setSize(int width, int height)
          Sets the cell size.
 void setSize(XElement parent, int width, int height)
          Sets the size of the cell without requiring a redraw.
 void setWidth(int width)
          Sets the width.
 
Methods inherited from class com.sencha.gxt.cell.core.client.AbstractEventInputCell
addHandler, fireEvent, isDisableEvents, setDisableEvents
 
Methods inherited from class com.google.gwt.cell.client.AbstractInputCell
isEditing, resetFocus
 
Methods inherited from class com.google.gwt.cell.client.AbstractEditableCell
clearViewData, getViewData, setViewData
 
Methods inherited from class com.google.gwt.cell.client.AbstractCell
dependsOnSelection, getConsumedEvents, render, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldCell

public FieldCell(FieldCell.FieldAppearance appearance,
                 Set<String> consumedEvents)

FieldCell

public FieldCell(FieldCell.FieldAppearance appearance,
                 String... consumedEvents)
Method Detail

handlesSelection

public boolean handlesSelection()
Specified by:
handlesSelection in interface Cell<T>
Overrides:
handlesSelection in class AbstractCell<T>

disable

public void disable(XElement parent)
Disables the cell.

Parameters:
parent - the parent element

enable

public void enable(XElement parent)
Enables the cell.

Parameters:
parent - the parent element

finishEditing

public void finishEditing(Element parent,
                          T value,
                          Object key,
                          ValueUpdater<T> valueUpdater)
Overrides:
finishEditing in class AbstractInputCell<T,FieldCell.FieldViewData>

getHeight

public int getHeight()
Description copied from interface: ResizableCell
Returns the height.

Specified by:
getHeight in interface ResizableCell
Returns:
the height

getWidth

public int getWidth()
Description copied from interface: ResizableCell
Returns the width.

Specified by:
getWidth in interface ResizableCell
Returns:
the width

isDisabled

public boolean isDisabled()
Returns the cell's disabled state.

Returns:
he disabled state

isReadOnly

public boolean isReadOnly()
Returns the cell's read only state.

Returns:
the read only state

onBrowserEvent

public void onBrowserEvent(Cell.Context context,
                           Element parent,
                           T value,
                           NativeEvent event,
                           ValueUpdater<T> valueUpdater)
Specified by:
onBrowserEvent in interface Cell<T>
Overrides:
onBrowserEvent in class AbstractInputCell<T,FieldCell.FieldViewData>

onEmpty

public abstract void onEmpty(XElement parent,
                             boolean empty)

onValid

public void onValid(XElement parent,
                    boolean valid)

redrawOnResize

public boolean redrawOnResize()
Description copied from interface: ResizableCell
Determines if the cell should be redrawn when resized by @link CellComponent. If true, CellComponent.redraw() will be called.

Specified by:
redrawOnResize in interface ResizableCell
Returns:
true to force a redraw

setHeight

public void setHeight(int height)
Description copied from interface: ResizableCell
Sets the height.

Specified by:
setHeight in interface ResizableCell
Parameters:
height - the height in pixels

setName

public void setName(XElement parent,
                    String name)

setReadOnly

public void setReadOnly(boolean readOnly)

setSize

public void setSize(int width,
                    int height)
Description copied from interface: ResizableCell
Sets the cell size.

Specified by:
setSize in interface ResizableCell
Parameters:
width - the width in pixels
height - the height in pixels

setSize

public void setSize(XElement parent,
                    int width,
                    int height)
Description copied from interface: ResizableCell
Sets the size of the cell without requiring a redraw. This method is called by CellComponent when ResizableCell.redrawOnResize() returns false.

Specified by:
setSize in interface ResizableCell
Parameters:
parent - the parent element
width - the width
height - the height

setWidth

public void setWidth(int width)
Description copied from interface: ResizableCell
Sets the width.

Specified by:
setWidth in interface ResizableCell
Parameters:
width - the width in pixels


Copyright © 2012. All Rights Reserved.