Package com.storedobject.ui
Class TextView
java.lang.Object
com.storedobject.vaadin.View
com.storedobject.ui.TextView
- All Implemented Interfaces:
Executable,Reentrant,StyledBuilder,HasLogic,StyledBuilder,Transactional,ClickHandler,CloseableView,ExecutableView,HTMLGenerator,ValueChangeHandler,com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>,com.vaadin.flow.component.HasValue.ValueChangeListener,Serializable,Runnable,EventListener
- Direct Known Subclasses:
ProcessView,UploadProcessorView
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.storedobject.common.StyledBuilder
StyledBuilder.Style -
Field Summary
Fields inherited from interface com.storedobject.vaadin.HTMLGenerator
CHAR_ENTITIESFields inherited from interface com.storedobject.common.StyledBuilder
EMPTY_STRINGS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Abort this view.voidadd(com.vaadin.flow.component.Component... components) voidclean()Close resources if any that are left opened.Clear the content.voidclose()Close this view.voidThis will be invoked by theApplicationjust before making the component of this view visible.voidShow an error message.voidprotected voidOverride this if you want to do something before the View comes up on the screen.Get the application that's tied to this View.protected com.vaadin.flow.component.Componentprotected com.vaadin.flow.component.Componentprotected voidinitUI()This method is invoked when the view wants to determine its "content" to be displayed and nothing exists at that moment.booleanCheck if the last add was a new line or not.voidShow a message.voidnewLine(boolean force) Adds a new line.voidpopup()voidprocess()protected voidvoidremove(com.vaadin.flow.component.Component... components) voidsetApplication(Application application) voidsetCaption(String caption) Set caption for this view.voidsetIndeterminate(boolean indeterminate) voidsetProcessor(Processor processor) voidsetProgress(int progress) voidsetProgressCaption(String caption) voidvoidSet a value.protected voidvoidShow a warning message.voidMethods inherited from class com.storedobject.vaadin.View
aborted, addClosedListener, addOpenedListener, createCloseableView, createWindow, execute, execute, executing, focus, focus, focusAny, getCaption, getComponent, getContent, getCreatedBy, getEmbeddedView, getMenuItem, getMenuItem, getView, invoke, isFullScreen, isScrollable, isWindowMode, select, setComponent, setCreatedBy, setDefaultPadding, setEmbeddedView, setFirstFocus, setFullScreen, setScrollable, setWindowMode, skipFirstFocusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClickedMethods inherited from interface com.storedobject.common.Executable
actMethods inherited from interface com.storedobject.vaadin.ExecutableView
clearAlerts, clicked, createMenuItem, execute, getCaption, getMenuIconName, getMenuItem, getView, getView, invoke, isCloseable, isFullScreen, isHomeView, log, log, returnedFrom, run, setClickable, speak, trackValueChange, tray, valueChangedMethods inherited from interface com.storedobject.vaadin.HTMLGenerator
getPrintTextMethods inherited from interface com.storedobject.common.Reentrant
isReentrantMethods inherited from interface com.storedobject.common.StyledBuilder
append, newLine, setValueMethods inherited from interface com.storedobject.ui.StyledBuilder
append, append, append, appendHTML, appendIcon, appendWithTag, appendWithTag, blackMessage, blueMessage, clear, drawLine, getHTML, getValue, isEmpty, redMessage, setValue, space, updateMethods inherited from interface com.storedobject.ui.Transactional
commit, execute, getLogic, getTransactionManager, run, setLogic, transact, transact, transactControl, transactControl, transactControl, transactControlMethods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
TextView
-
-
Method Details
-
initUI
protected void initUI()Description copied from class:ViewThis method is invoked when the view wants to determine its "content" to be displayed and nothing exists at that moment.View.setComponent(Component)may be called from within this method. -
getTopComponent
protected com.vaadin.flow.component.Component getTopComponent() -
getBottomComponent
protected com.vaadin.flow.component.Component getBottomComponent() -
add
public void add(com.vaadin.flow.component.Component... components) -
remove
public void remove(com.vaadin.flow.component.Component... components) -
setText
-
setValue
Description copied from interface:StyledBuilderSet a value. (Previous content if any will be cleared).- Specified by:
setValuein interfaceStyledBuilder- Specified by:
setValuein interfaceStyledBuilder- Parameters:
object- Object (value) to set.
-
getInternalStyledBuilder
- Specified by:
getInternalStyledBuilderin interfaceStyledBuilder
-
execute
Description copied from class:ViewOverride this if you want to do something before the View comes up on the screen. Call super.execute(parent, doNotLock) to make the View appear on the screen. Parent view is automatically selected when this view closes. -
startProcess
protected void startProcess() -
readyForProcessing
protected void readyForProcessing() -
setProcessor
-
clean
public void clean()Description copied from class:ViewClose resources if any that are left opened. This method is invoked when the view is removed from theApplication. The default implementation does nothing.- Specified by:
cleanin interfaceExecutableView- Overrides:
cleanin classView
-
process
-
setIndeterminate
public void setIndeterminate(boolean indeterminate) -
setProgress
public void setProgress(int progress) -
setProgressCaption
-
getProgressCaption
-
setCaption
Description copied from class:ViewSet caption for this view. Caption is displayed as aMenuItemby theApplicationso that the view can be selected (only one view is displayed at a time) by clicking it.- Specified by:
setCaptionin interfaceExecutableView- Overrides:
setCaptionin classView- Parameters:
caption- Caption
-
message
Description copied from interface:ExecutableViewShow a message. Default implementation is to invokeApplication.message(Object).- Specified by:
messagein interfaceExecutableView- Parameters:
message- Message
-
message
-
warning
Description copied from interface:ExecutableViewShow a warning message. Default implementation is to invokeApplication.warning(Object).- Specified by:
warningin interfaceExecutableView- Parameters:
message- Warning
-
warning
-
error
Description copied from interface:ExecutableViewShow an error message. Default implementation is to invokeApplication.error(Object).- Specified by:
errorin interfaceExecutableView- Parameters:
message- Error
-
error
-
getApplication
Description copied from class:ViewGet the application that's tied to this View.- Specified by:
getApplicationin interfaceExecutableView- Specified by:
getApplicationin interfaceStyledBuilder- Overrides:
getApplicationin classView- Returns:
- The Application.
-
setApplication
-
close
public void close()Description copied from class:ViewClose this view.- Specified by:
closein interfaceExecutableView- Overrides:
closein classView
-
abort
public void abort()Description copied from class:ViewAbort this view. Default implementation sets an "abort flag" and closes the view.- Specified by:
abortin interfaceExecutableView- Overrides:
abortin classView
-
isNewLine
public boolean isNewLine()Description copied from interface:StyledBuilderCheck if the last add was a new line or not.- Specified by:
isNewLinein interfaceStyledBuilder- Returns:
- True/false
-
decorateComponent
public void decorateComponent()Description copied from class:ViewThis will be invoked by theApplicationjust before making the component of this view visible. The default implementation does the following to the component:If it is a
Dialog, just returns without making any changes.Will set the size to 'full' by invoking
HasSize.setSizeFull()if it is an instance ofHasSizeso that it covers the entire content area.Padding will be set to 5px (unless changed via
View.setDefaultPadding(int)) and box-sizing to border-box. So, if you want to fill the component to the entire content area, you will have to override this method and set the padding to 0px.If the component is an instance of
Div, its "display" style will be set to "flex" and its "flex-direction" will be set to "column".- Overrides:
decorateComponentin classView
-
popup
public void popup() -
clearContent
Description copied from interface:StyledBuilderClear the content.- Specified by:
clearContentin interfaceStyledBuilder- Specified by:
clearContentin interfaceStyledBuilder- Returns:
- Self-reference is returned.
-
newLine
Description copied from interface:StyledBuilderAdds a new line.- Specified by:
newLinein interfaceStyledBuilder- Specified by:
newLinein interfaceStyledBuilder- Parameters:
force- If true, a new line is added anyway. Otherwise, no new line should be added ifStyledBuilder.isNewLine()returns false.- Returns:
- Self-reference is returned.
-