public class VaadinMetawidget
extends com.vaadin.ui.CustomComponent
Modifier and Type | Class and Description |
---|---|
protected class |
VaadinMetawidget.Pipeline |
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
Constructor and Description |
---|
VaadinMetawidget() |
Modifier and Type | Method and Description |
---|---|
void |
addComponent(com.vaadin.ui.Component component) |
void |
addInspectionResultProcessor(InspectionResultProcessor<VaadinMetawidget> inspectionResultProcessor) |
void |
addWidgetProcessor(WidgetProcessor<com.vaadin.ui.Component,VaadinMetawidget> widgetProcessor) |
protected void |
buildWidgets() |
protected void |
endBuild() |
List<com.vaadin.ui.AbstractComponent> |
fetchExistingUnusedComponents()
Fetch a list of
AbstractComponents that were added manually,
and have so far not been used. |
ResourceBundle |
getBundle() |
<T> T |
getClientProperty(Object key)
Storage area for WidgetProcessors, Layouts, and other stateless clients.
|
<T extends com.vaadin.ui.Component> |
getComponent(String... names)
Finds the Component with the given name.
|
int |
getComponentCount() |
Iterator<com.vaadin.ui.Component> |
getComponentIterator() |
<C extends com.vaadin.ui.Component> |
getContent()
Named after
Panel.getContent . |
protected String |
getDefaultConfiguration() |
Facet |
getFacet(String name) |
String |
getLabelString(Map<String,String> attributes)
Returns a label for the given set of attributes.
|
String |
getLocalizedKey(String key) |
int |
getMaximumInspectionDepth() |
String |
getPath() |
<T> T |
getToInspect()
Gets the Object being inspected.
|
<T> T |
getWidgetProcessor(Class<T> widgetProcessorClass) |
protected void |
initNestedMetawidget(VaadinMetawidget nestedMetawidget,
Map<String,String> attributes) |
String |
inspect(Object toInspect,
String type,
String... names)
Useful for WidgetBuilders to perform nested inspections (eg.
|
protected void |
invalidateInspection()
Invalidates the current inspection result (if any) and invalidates the widgets.
|
protected void |
invalidateWidgets()
Invalidates the widgets.
|
boolean |
isReadOnly() |
protected void |
layoutWidget(com.vaadin.ui.Component component,
String elementName,
Map<String,String> attributes) |
protected VaadinMetawidget.Pipeline |
newPipeline()
Instantiate the Pipeline used by this Metawidget.
|
void |
paintContent(com.vaadin.terminal.PaintTarget target) |
void |
putClientProperty(Object key,
Object value)
Storage area for WidgetProcessors, Layouts, and other stateless clients.
|
void |
removeComponent(com.vaadin.ui.Component component) |
void |
removeInspectionResultProcessor(InspectionResultProcessor<VaadinMetawidget> inspectionResultProcessor) |
void |
removeWidgetProcessor(WidgetProcessor<com.vaadin.ui.Component,VaadinMetawidget> widgetProcessor) |
void |
setBundle(ResourceBundle bundle) |
void |
setConfig(String config) |
void |
setInspectionResultProcessors(InspectionResultProcessor<VaadinMetawidget>... inspectionResultProcessors) |
void |
setInspector(Inspector inspector) |
void |
setLayout(Layout<com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,VaadinMetawidget> layout)
Set the layout for this Metawidget.
|
void |
setMaximumInspectionDepth(int maximumInspectionDepth) |
void |
setPath(String path)
Sets the path to be inspected.
|
void |
setReadOnly(boolean readOnly) |
void |
setToInspect(Object toInspect)
Sets the Object to inspect.
|
void |
setWidgetBuilder(WidgetBuilder<com.vaadin.ui.Component,VaadinMetawidget> widgetBuilder) |
void |
setWidgetProcessors(WidgetProcessor<com.vaadin.ui.Component,VaadinMetawidget>... widgetProcessors) |
protected void |
startBuild() |
getCompositionRoot, iterator, setCompositionRoot
addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getState, getState, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
public void setToInspect(Object toInspect)
If setPath
has not been set, or points to a previous setToInspect
,
sets it to point to the given Object.
public <T> T getToInspect()
Exposed for binding implementations.
Person p = getToInspect()
)public void setPath(String path)
public String getPath()
public void setConfig(String config)
public void setInspector(Inspector inspector)
public String inspect(Object toInspect, String type, String... names)
public void addInspectionResultProcessor(InspectionResultProcessor<VaadinMetawidget> inspectionResultProcessor)
public void removeInspectionResultProcessor(InspectionResultProcessor<VaadinMetawidget> inspectionResultProcessor)
public void setInspectionResultProcessors(InspectionResultProcessor<VaadinMetawidget>... inspectionResultProcessors)
public void setWidgetBuilder(WidgetBuilder<com.vaadin.ui.Component,VaadinMetawidget> widgetBuilder)
public void addWidgetProcessor(WidgetProcessor<com.vaadin.ui.Component,VaadinMetawidget> widgetProcessor)
public void removeWidgetProcessor(WidgetProcessor<com.vaadin.ui.Component,VaadinMetawidget> widgetProcessor)
public void setWidgetProcessors(WidgetProcessor<com.vaadin.ui.Component,VaadinMetawidget>... widgetProcessors)
public <T> T getWidgetProcessor(Class<T> widgetProcessorClass)
public void setLayout(Layout<com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,VaadinMetawidget> layout)
public ResourceBundle getBundle()
public void setBundle(ResourceBundle bundle)
public String getLabelString(Map<String,String> attributes)
The label is determined using the following algorithm:
public String getLocalizedKey(String key)
public boolean isReadOnly()
isReadOnly
in interface com.vaadin.ui.Component
isReadOnly
in class com.vaadin.ui.AbstractComponent
public void setReadOnly(boolean readOnly)
setReadOnly
in interface com.vaadin.ui.Component
setReadOnly
in class com.vaadin.ui.AbstractComponent
public int getMaximumInspectionDepth()
public void setMaximumInspectionDepth(int maximumInspectionDepth)
public List<com.vaadin.ui.AbstractComponent> fetchExistingUnusedComponents()
AbstractComponents
that were added manually,
and have so far not been used.
This is an internal API exposed for OverriddenWidgetBuilder. Clients should not call it directly.
public int getComponentCount()
getComponentCount
in class com.vaadin.ui.CustomComponent
public Iterator<com.vaadin.ui.Component> getComponentIterator()
public <T extends com.vaadin.ui.Component> T getComponent(String... names)
public <C extends com.vaadin.ui.Component> C getContent()
Panel.getContent
.public void addComponent(com.vaadin.ui.Component component)
public void removeComponent(com.vaadin.ui.Component component)
public void paintContent(com.vaadin.terminal.PaintTarget target) throws com.vaadin.terminal.PaintException
com.vaadin.terminal.PaintException
public void putClientProperty(Object key, Object value)
public <T> T getClientProperty(Object key)
protected VaadinMetawidget.Pipeline newPipeline()
Subclasses wishing to use their own Pipeline should override this method to instantiate their version.
protected String getDefaultConfiguration()
protected void invalidateInspection()
As an optimisation we only invalidate the widgets, not the entire inspection result, for some operations (such as adding/removing stubs, changing read-only etc.)
protected void invalidateWidgets()
protected void buildWidgets()
protected void startBuild()
protected void layoutWidget(com.vaadin.ui.Component component, String elementName, Map<String,String> attributes)
elementName
- XML node name of the business field. Typically 'entity',
'property' or 'action'. Never nullprotected void endBuild()
protected void initNestedMetawidget(VaadinMetawidget nestedMetawidget, Map<String,String> attributes)
Copyright © 2015. All Rights Reserved.