|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.tentackle.ui.FormPanel
org.tentackle.appworx.TooltipAndErrorPanel
public class TooltipAndErrorPanel
Provides a tooltip-like info field and an error-list the user can click on set the focus to the related component.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TooltipAndErrorPanel()
Creates the panel. |
|
| Method Summary | |
|---|---|
boolean |
areValuesChanged()
Checks whether the contents of some components in this or sub containers have changed since the last savepoint. |
void |
clearErrors()
Clears all errors and removes the errorpane. |
List<InteractiveError> |
getErrors()
Gets the current errors as a List of InteractiveErrors |
String |
getTooltip()
Gets the displayed tooltip. |
int |
getVisibleErrorCount()
Gets the maximum number of visible rows in error list. |
boolean |
isTooltipEnabled()
Returns whether the tooltip display is enabled. |
void |
setErrors(InteractiveError... error)
Sets the errors. Alternative to setErrors(java.util.List) saves typing if number
of errors is known. |
void |
setErrors(List<InteractiveError> errors)
Sets the list of errors. |
void |
setTooltip(String tooltip)
Sets the text for the tooltip. |
void |
setTooltipEnabled(boolean enable)
Enables/disables the tooltip-field. |
void |
setVisibleErrorCount(int rows)
Sets the maximum number of visible rows in the error list. If more errors are present a scrollbar will be shown. |
| Methods inherited from class org.tentackle.ui.FormPanel |
|---|
addActionListener, componentAdded, componentRemoved, fireActionPerformed, getFormValues, getHelpURL, getParentWindow, getTitle, invalidateParentInfo, isAllChangeable, isHonourAllChangeable, removeActionListener, saveValues, setAllChangeable, setFormValues, setFormValuesKeepChanged, setHelpURL, setHonourAllChangeable, setTitle, showHelp, triggerValuesChanged |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TooltipAndErrorPanel()
| Method Detail |
|---|
public boolean areValuesChanged()
FormContainer
areValuesChanged in interface FormContainerareValuesChanged in class FormPanelpublic void setTooltipEnabled(boolean enable)
enable - true to enable the tooltip display, default is false.public boolean isTooltipEnabled()
public void setVisibleErrorCount(int rows)
rows - the number of rowspublic int getVisibleErrorCount()
public void setTooltip(String tooltip)
TooltipDisplay
setTooltip in interface TooltipDisplaytooltip - the tooltip textpublic String getTooltip()
public void clearErrors()
public List<InteractiveError> getErrors()
public void setErrors(List<InteractiveError> errors)
errors - the list of InteractiveErrors, null = clears all errorspublic void setErrors(InteractiveError... error)
setErrors(java.util.List) saves typing if number
of errors is known.
Example:
setErrors(new InteractiveError("blah not set", blahField),
new InteractiveError("foo must be less than blah", fooField));
error - the error(s) to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||