public abstract class Frontend extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Frontend.FormContent |
static interface |
Frontend.IComponent
Components are the smallest part of the gui.
|
static interface |
Frontend.IContent
Content means the content of a dialog or of a page
|
static interface |
Frontend.Input<T> |
static interface |
Frontend.InputComponentListener |
static class |
Frontend.InputType |
static interface |
Frontend.ITable<T> |
static interface |
Frontend.PasswordField |
static interface |
Frontend.Search<S> |
static interface |
Frontend.SwitchComponent |
static interface |
Frontend.SwitchContent |
static interface |
Frontend.TableActionListener<U> |
Constructor and Description |
---|
Frontend() |
Modifier and Type | Method and Description |
---|---|
abstract Frontend.Input<String> |
createAreaField(int maxLength,
String allowedCharacters,
Frontend.InputComponentListener changeListener) |
abstract Frontend.Input<Boolean> |
createCheckBox(Frontend.InputComponentListener changeListener,
String text) |
abstract <T> Frontend.Input<T> |
createComboBox(List<T> items,
Frontend.InputComponentListener changeListener) |
abstract Frontend.FormContent |
createFormContent(int columns,
int columnWidth) |
abstract Frontend.IContent |
createFormTableContent(Frontend.FormContent form,
Frontend.ITable<?> table) |
abstract Frontend.IComponent |
createHorizontalGroup(Frontend.IComponent... components) |
abstract Frontend.IContent |
createHtmlContent(String htmlOrUrl)
Allows several types of input:
if it starts with a '<html>' and ends with </html> it's
supposed to be a html document
if it is a valid url the content of that url is loaded
if it ends with '.html' the content is loaded from the classpath
if none of the above the input is used as plain String
note: If any user input is used as html content the input
should be considered dangerous as some Frontends could execute injected code.
|
abstract Frontend.Input<byte[]> |
createImage(Frontend.InputComponentListener changeListener) |
Optional<Frontend.Input<String>> |
createInput(int maxLength,
Frontend.InputType inputType,
Frontend.InputComponentListener changeListener)
Frontends may or may not provide special Inputs.
|
abstract Frontend.Input<String> |
createLookup(Frontend.Input<String> stringInput,
ActionGroup actions) |
abstract Frontend.Input<String> |
createLookup(Frontend.Input<String> stringInput,
Runnable lookup) |
abstract Frontend.PasswordField |
createPasswordField(Frontend.InputComponentListener changeListener,
int maxLength) |
abstract Frontend.IContent |
createQueryContent()
Create a content with a caption and a large search field.
|
abstract Frontend.Input<String> |
createReadOnlyTextField() |
abstract Frontend.SwitchComponent |
createSwitchComponent() |
abstract Frontend.SwitchContent |
createSwitchContent() |
abstract <T> Frontend.IContent |
createTable(Frontend.Search<T> search,
Object[] keys,
boolean multiSelect,
Frontend.TableActionListener<T> listener) |
abstract <T> Frontend.ITable<T> |
createTable(Object[] keys,
boolean multiSelect,
Frontend.TableActionListener<T> listener) |
abstract Frontend.IComponent |
createText(Action action) |
abstract Frontend.IComponent |
createText(Rendering rendering) |
abstract Frontend.IComponent |
createText(String string) |
abstract Frontend.Input<String> |
createTextField(int maxLength,
String allowedCharacters,
Frontend.Search<String> suggestionSearch,
Frontend.InputComponentListener changeListener) |
abstract Frontend.IComponent |
createTitle(String string) |
abstract Frontend.IComponent |
createVerticalGroup(Frontend.IComponent... components) |
static Frontend |
getInstance() |
abstract PageManager |
getPageManager() |
static void |
hideDetail(Page page) |
static boolean |
isAvailable() |
static boolean |
isDetailShown(Page page) |
static boolean |
loginAtStart() |
static void |
setInstance(Frontend frontend) |
static void |
show(Page page) |
static void |
showDetail(Page mainPage,
Page detail) |
static IDialog |
showDialog(String title,
Frontend.IContent content,
Action saveAction,
Action closeAction,
Action... actions) |
static void |
showError(String text) |
static void |
showMessage(String text) |
public static Frontend getInstance()
public static void setInstance(Frontend frontend)
public static boolean isAvailable()
public static boolean loginAtStart()
public Optional<Frontend.Input<String>> createInput(int maxLength, Frontend.InputType inputType, Frontend.InputComponentListener changeListener)
maxLength
- maximum input lengthinputType
- TEXT, EMAIL, ...changeListener
- listener attached to the Inputpublic abstract Frontend.IComponent createText(String string)
public abstract Frontend.IComponent createText(Rendering rendering)
public abstract Frontend.IComponent createText(Action action)
public abstract Frontend.IComponent createTitle(String string)
public abstract Frontend.Input<String> createReadOnlyTextField()
public abstract Frontend.Input<String> createTextField(int maxLength, String allowedCharacters, Frontend.Search<String> suggestionSearch, Frontend.InputComponentListener changeListener)
public abstract Frontend.Input<String> createAreaField(int maxLength, String allowedCharacters, Frontend.InputComponentListener changeListener)
public abstract Frontend.PasswordField createPasswordField(Frontend.InputComponentListener changeListener, int maxLength)
public abstract <T> Frontend.Input<T> createComboBox(List<T> items, Frontend.InputComponentListener changeListener)
public abstract Frontend.Input<Boolean> createCheckBox(Frontend.InputComponentListener changeListener, String text)
public abstract Frontend.Input<byte[]> createImage(Frontend.InputComponentListener changeListener)
public abstract Frontend.SwitchComponent createSwitchComponent()
public abstract Frontend.Input<String> createLookup(Frontend.Input<String> stringInput, Runnable lookup)
public abstract Frontend.Input<String> createLookup(Frontend.Input<String> stringInput, ActionGroup actions)
public abstract Frontend.IComponent createHorizontalGroup(Frontend.IComponent... components)
public abstract Frontend.IComponent createVerticalGroup(Frontend.IComponent... components)
public abstract Frontend.FormContent createFormContent(int columns, int columnWidth)
public abstract Frontend.SwitchContent createSwitchContent()
public abstract Frontend.IContent createFormTableContent(Frontend.FormContent form, Frontend.ITable<?> table)
public abstract <T> Frontend.ITable<T> createTable(Object[] keys, boolean multiSelect, Frontend.TableActionListener<T> listener)
public abstract Frontend.IContent createHtmlContent(String htmlOrUrl)
htmlOrUrl
- html, url, classpath location or stringStringUtils.escapeHTML(String)
public abstract Frontend.IContent createQueryContent()
The caption text is defined by the Resource QueryPage or if that is not available by the Application.name .
public abstract PageManager getPageManager()
public static void show(Page page)
public static void hideDetail(Page page)
public static boolean isDetailShown(Page page)
public static IDialog showDialog(String title, Frontend.IContent content, Action saveAction, Action closeAction, Action... actions)
public abstract <T> Frontend.IContent createTable(Frontend.Search<T> search, Object[] keys, boolean multiSelect, Frontend.TableActionListener<T> listener)
public static void showMessage(String text)
public static void showError(String text)
Copyright © 2019. All rights reserved.