Class FWResultFormComponent
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
net.simplace.pipe.formcomponents.FWAbstractFormComponent
net.simplace.pipe.formcomponents.result.FWResultFormComponent
- All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, net.simplace.core.FWBusyIndicator, net.simplace.core.FWObserver
This form component displays results dynamically. The content is shown by a result panel
(
FWAbstractResultFormComponentPanel) chosen by show mode (chart, the default, or
crop) or by class name. The content can be passed by a form filler or by static parameters:
<result id="mal1.chart" showpanel="false">
<!-- with form filler: -->
<parameter key="formFiller">net.simplace.pipe.filler.FWDatabaseFormComponentFiller</parameter>
<parameter key="formFiller.contentfield">initial</parameter>
<parameter key="formFiller.jumper">${mal1.choice2}</parameter>
<parameter key="formFiller.styletype">st_9</parameter>
<!-- or without form filler: -->
<parameter key="result.showmode">chart</parameter> <!-- or result.class -->
<parameter key="result.jumper">${mal1.choice2}</parameter>
<parameter key="result.styletype">st_9</parameter> <!-- only for chart results -->
</result>
The jumper may also be a <result class="..." showmode="..."> element with the panel
parameters. The component has no value.- Author:
- Andreas Enders
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classShow modes of the result component and the result panel classes they use.Nested classes/interfaces inherited from class JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsFields inherited from class FWAbstractFormComponent
COPY_BUTTON_DEFAULT_IMAGE, COPY_BUTTON_DISABLED_IMAGE, COPY_BUTTON_HIGHLIGHT_IMAGE, DETACH_AUTO, DETACH_BUTTON, DETACH_FALSE, DETACH_LINKED, DETACH_TRUE, DETATCH_BORDER_DEFAULT_COLOR, DETATCH_BORDER_HIGHLIGHT_COLOR, DETATCH_BORDER_WIDTH, DETATCH_BUTTON_DEFAULT_IMAGE, DETATCH_BUTTON_DISABLED_IMAGE, DETATCH_BUTTON_HIGHLIGHT_IMAGE, EXPORT_BUTTON_DEFAULT_IMAGE, EXPORT_BUTTON_DISABLED_IMAGE, EXPORT_BUTTON_HIGHLIGHT_IMAGE, iDetachContentPanel, iObservable, PRINT_BUTTON_DEFAULT_IMAGE, PRINT_BUTTON_DISABLED_IMAGE, PRINT_BUTTON_HIGHLIGHT_IMAGEFields inherited from class JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface net.simplace.core.FWBusyIndicator
BUSY_STEPSFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionFWResultFormComponent(String aFormID, String aFieldID, boolean aShowLabel, int aDetachable, org.jdom2.Element aFormElement, net.simplace.core.FWObservable aObservable) Creates the component; without form filler the result panel is created from the static parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDelegates the export to the displayed result panel.getValue()protected com.lowagie.text.RectanglegetValueCell(int aType) Returns the value cell used for generating the RTF, PDF or HTML version of the form.voidDetermines the result panel class (from a<result>jumper, the attributesclass/showmodeor the parameterresult.showmode) and re-creates the result panel with the form filler.voidDoes nothing; a result component has no value.voidIn addition to the base behaviour, re-creates the result panel from the static parameters (without form filler) if show mode, class or jumper changed.Methods inherited from class FWAbstractFormComponent
add, add, attachPanel, closeFormComponent, createDetachControls, detachPanel, disposePanel, getCells, getComponentParameteterValue, getConfiguration, getDetachability, getFieldID, getFormElement, getFormFiller, getFormID, getJumper, getJumperRule, getLocaleValue, getLocaleValue, getMaximumSize, getObservable, getOriginalComponentParameteterValue, getPreferredSize, getRequiredWarning, getSystemID, getTitle, hasConfiguration, hasFormFiller, hideBusy, init, isClosingRequired, isEnabled, isRequired, notifyDependentComponents, remove, setConfiguration, setDefault, setDetachControlsEnabled, setDetachControlsHighlighted, setFieldID, setFormElement, setFormID, setObservable, setRequired, setTitle, setUpDetachControl, showBusy, toStringMethods inherited from class JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class Container
add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
iContentPanel
The result panel currently displayed.
-
-
Constructor Details
-
FWResultFormComponent
public FWResultFormComponent(String aFormID, String aFieldID, boolean aShowLabel, int aDetachable, org.jdom2.Element aFormElement, net.simplace.core.FWObservable aObservable) Creates the component; without form filler the result panel is created from the static parameters.- Parameters:
aFormID- id of the form the component is placed inaFieldID- id of the componentaShowLabel-trueto show a caption labelaDetachable- detachability, one of theDETACH_*constantsaFormElement- the form elementaObservable- parameters of the functionality
-
-
Method Details
-
getValue
- Specified by:
getValuein classFWAbstractFormComponent- Returns:
- always
null; a result component has no value
-
setValue
Does nothing; a result component has no value.- Specified by:
setValuein classFWAbstractFormComponent- Parameters:
aValue- not used
-
update
In addition to the base behaviour, re-creates the result panel from the static parameters (without form filler) if show mode, class or jumper changed.- Specified by:
updatein interfacenet.simplace.core.FWObserver- Overrides:
updatein classFWAbstractFormComponent- Parameters:
aObservabal- the parametersaKeyOfParameterChanged- key of the changed parameter
-
processFormFiller
public void processFormFiller()Determines the result panel class (from a<result>jumper, the attributesclass/showmodeor the parameterresult.showmode) and re-creates the result panel with the form filler.- Specified by:
processFormFillerin classFWAbstractFormComponent
-
exportData
protected void exportData()Delegates the export to the displayed result panel.- Overrides:
exportDatain classFWAbstractFormComponent
-
getValueCell
protected com.lowagie.text.Rectangle getValueCell(int aType) Description copied from class:FWAbstractFormComponentReturns the value cell used for generating the RTF, PDF or HTML version of the form.- Specified by:
getValueCellin classFWAbstractFormComponent- Parameters:
aType- output type, e.g.PrintHelper.TYPE_PDF- Returns:
- an iText cell (
PdfPCellfor PDF,Cellotherwise)
-