public abstract class FieldCell<T> extends AbstractEventInputCell<T,FieldCell.FieldViewData> implements ResizableCell
Modifier and Type | Class and Description |
---|---|
static interface |
FieldCell.FieldAppearance |
static class |
FieldCell.FieldAppearanceOptions |
static class |
FieldCell.FieldViewData |
Cell.Context
Constructor and Description |
---|
FieldCell(FieldCell.FieldAppearance appearance,
Set<String> consumedEvents) |
FieldCell(FieldCell.FieldAppearance appearance,
String... consumedEvents) |
Modifier and Type | Method and Description |
---|---|
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) |
FieldCell.FieldAppearance |
getAppearance()
Returns the appearance implementation used by this cell instance
|
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)
Sets the name attribute on the input element.
|
void |
setReadOnly(boolean readOnly)
Sets the field's read only state.
|
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.
|
addHandler, fireEvent, isDisableEvents, setDisableEvents
isEditing, resetFocus
clearViewData, getViewData, setViewData
dependsOnSelection, getConsumedEvents, render, setValue
public FieldCell(FieldCell.FieldAppearance appearance, Set<String> consumedEvents)
public FieldCell(FieldCell.FieldAppearance appearance, String... consumedEvents)
public boolean handlesSelection()
handlesSelection
in interface Cell<T>
handlesSelection
in class AbstractCell<T>
public void disable(XElement parent)
parent
- the parent elementpublic void enable(XElement parent)
parent
- the parent elementpublic void finishEditing(Element parent, T value, Object key, ValueUpdater<T> valueUpdater)
finishEditing
in class AbstractInputCell<T,FieldCell.FieldViewData>
public FieldCell.FieldAppearance getAppearance()
public int getHeight()
ResizableCell
getHeight
in interface ResizableCell
public int getWidth()
ResizableCell
getWidth
in interface ResizableCell
public boolean isDisabled()
public boolean isReadOnly()
public void onBrowserEvent(Cell.Context context, Element parent, T value, NativeEvent event, ValueUpdater<T> valueUpdater)
onBrowserEvent
in interface Cell<T>
onBrowserEvent
in class AbstractInputCell<T,FieldCell.FieldViewData>
public abstract void onEmpty(XElement parent, boolean empty)
public void onValid(XElement parent, boolean valid)
public boolean redrawOnResize()
ResizableCell
CellComponent
. If true, CellComponent.redraw()
will be
called.redrawOnResize
in interface ResizableCell
public void setHeight(int height)
ResizableCell
setHeight
in interface ResizableCell
height
- the height in pixelspublic void setName(XElement parent, String name)
parent
- the parentname
- the namepublic void setReadOnly(boolean readOnly)
readOnly
- the read only statepublic void setSize(int width, int height)
ResizableCell
setSize
in interface ResizableCell
width
- the width in pixelsheight
- the height in pixelspublic void setSize(XElement parent, int width, int height)
ResizableCell
CellComponent
when ResizableCell.redrawOnResize()
returns false.setSize
in interface ResizableCell
parent
- the parent elementwidth
- the widthheight
- the heightpublic void setWidth(int width)
ResizableCell
setWidth
in interface ResizableCell
width
- the width in pixelsCopyright © 2015. All rights reserved.