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_ENTITIES
Fields inherited from interface com.storedobject.common.StyledBuilder
EMPTY_STRINGS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
Abort this view.void
add
(com.vaadin.flow.component.Component... components) void
clean()
Close resources if any that are left opened.Clear the content.void
close()
Close this view.void
This will be invoked by theApplication
just before making the component of this view visible.void
Show an error message.void
protected void
Override 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.Component
protected com.vaadin.flow.component.Component
protected void
initUI()
This method is invoked when the view wants to determine its "content" to be displayed and nothing exists at that moment.boolean
Check if the last add was a new line or not.void
Show a message.void
newLine
(boolean force) Adds a new line.void
popup()
void
process()
protected void
void
remove
(com.vaadin.flow.component.Component... components) void
setApplication
(Application application) void
setCaption
(String caption) Set caption for this view.void
setIndeterminate
(boolean indeterminate) void
setProcessor
(Processor processor) void
setProgress
(int progress) void
setProgressCaption
(String caption) void
void
Set a value.protected void
void
Show a warning message.void
Methods 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, skipFirstFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClicked
Methods inherited from interface com.storedobject.common.Executable
act
Methods 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, valueChanged
Methods inherited from interface com.storedobject.vaadin.HTMLGenerator
getPrintText
Methods inherited from interface com.storedobject.common.Reentrant
isReentrant
Methods inherited from interface com.storedobject.common.StyledBuilder
append, newLine, setValue
Methods inherited from interface com.storedobject.ui.StyledBuilder
append, append, append, appendHTML, appendIcon, appendWithTag, appendWithTag, blackMessage, blueMessage, clear, drawLine, getHTML, getValue, isEmpty, redMessage, setValue, space, update
Methods inherited from interface com.storedobject.ui.Transactional
commit, execute, getLogic, getTransactionManager, run, setLogic, transact, transact, transactControl, transactControl
Methods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
TextView
-
-
Method Details
-
initUI
protected void initUI()Description copied from class:View
This 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:StyledBuilder
Set a value. (Previous content if any will be cleared).- Specified by:
setValue
in interfaceStyledBuilder
- Specified by:
setValue
in interfaceStyledBuilder
- Parameters:
object
- Object (value) to set.
-
getInternalStyledBuilder
- Specified by:
getInternalStyledBuilder
in interfaceStyledBuilder
-
execute
Description copied from class:View
Override 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:View
Close 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:
clean
in interfaceExecutableView
- Overrides:
clean
in classView
-
process
-
setIndeterminate
public void setIndeterminate(boolean indeterminate) -
setProgress
public void setProgress(int progress) -
setProgressCaption
-
getProgressCaption
-
setCaption
Description copied from class:View
Set caption for this view. Caption is displayed as aMenuItem
by theApplication
so that the view can be selected (only one view is displayed at a time) by clicking it.- Specified by:
setCaption
in interfaceExecutableView
- Overrides:
setCaption
in classView
- Parameters:
caption
- Caption
-
message
Description copied from interface:ExecutableView
Show a message. Default implementation is to invokeApplication.message(Object)
.- Specified by:
message
in interfaceExecutableView
- Parameters:
message
- Message
-
message
-
warning
Description copied from interface:ExecutableView
Show a warning message. Default implementation is to invokeApplication.warning(Object)
.- Specified by:
warning
in interfaceExecutableView
- Parameters:
message
- Warning
-
warning
-
error
Description copied from interface:ExecutableView
Show an error message. Default implementation is to invokeApplication.error(Object)
.- Specified by:
error
in interfaceExecutableView
- Parameters:
message
- Error
-
error
-
getApplication
Description copied from class:View
Get the application that's tied to this View.- Specified by:
getApplication
in interfaceExecutableView
- Specified by:
getApplication
in interfaceStyledBuilder
- Overrides:
getApplication
in classView
- Returns:
- The Application.
-
setApplication
-
close
public void close()Description copied from class:View
Close this view.- Specified by:
close
in interfaceExecutableView
- Overrides:
close
in classView
-
abort
public void abort()Description copied from class:View
Abort this view. Default implementation sets an "abort flag" and closes the view.- Specified by:
abort
in interfaceExecutableView
- Overrides:
abort
in classView
-
isNewLine
public boolean isNewLine()Description copied from interface:StyledBuilder
Check if the last add was a new line or not.- Specified by:
isNewLine
in interfaceStyledBuilder
- Returns:
- True/false
-
decorateComponent
public void decorateComponent()Description copied from class:View
This will be invoked by theApplication
just 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 ofHasSize
so 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:
decorateComponent
in classView
-
popup
public void popup() -
clearContent
Description copied from interface:StyledBuilder
Clear the content.- Specified by:
clearContent
in interfaceStyledBuilder
- Specified by:
clearContent
in interfaceStyledBuilder
- Returns:
- Self-reference is returned.
-
newLine
Description copied from interface:StyledBuilder
Adds a new line.- Specified by:
newLine
in interfaceStyledBuilder
- Specified by:
newLine
in 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.
-