org.salespointframework.desktop.formsheets
Class DescriptiveFormSheet

java.lang.Object
  extended by org.salespointframework.core.FormSheet
      extended by org.salespointframework.desktop.formsheets.DescriptiveFormSheet

public class DescriptiveFormSheet
extends FormSheet

A FormSheet that can extend Single- and TwoTableFormSheets and ListViewFormSheets by a description element. The element will be placed underneath the table(s) and have the given caption and image.

In order to display the actual description, the records of the data containers modelled by the table are considered to implement the Descriptive interface. If so, their getDescription() method will be called to get the actual description. If they do not, nothing will be displayed. The image will be used from the encapsulated CatalogItem.getImage()

Version:
4.0
Author:
Thomas Ryssel, Thomas Kissinger
See Also:
Descriptive, CatalogItem.getImage()

Nested Class Summary
 
Nested classes/interfaces inherited from class org.salespointframework.core.FormSheet
FormSheet.FormButton
 
Field Summary
private  ImagePanel descriptionImagePanel
          the image panel which shows the items image
private  javax.swing.JPanel descriptionPanel
          The panel which holds the descriptionTextPane
private  javax.swing.JTextPane descriptionTextPane
          The Pane used to display the description
private  ListViewFormSheet lvfsReference
          Keep a reference to the ListViewFormsheet, if given
private  ImagePanel minimizeButton
          the minimize button
private  ImagePanel openButton
          the open button
private  javax.swing.JPanel openPanel
          container for openButton
private  SingleTableFormSheet stfsReference
          Keep a reference to the SingleTableFormSheet (if given).
private  DataExchangeFormSheet ttfsReference
          Keep a reference to the DataExchangeFormSheet (if given).
 
Fields inherited from class org.salespointframework.core.FormSheet
BTNID_CANCEL, BTNID_OK, BUTTONBAR_BOTTOM, BUTTONBAR_LEFT, BUTTONBAR_NONE, BUTTONBAR_RIGHT, BUTTONBAR_TOP, m_fCancelled
 
Constructor Summary
DescriptiveFormSheet(DataExchangeFormSheet ttfs, java.lang.String caption)
          Construct a new DescriptiveFormSheet from the given DataExchangeFormSheet.
DescriptiveFormSheet(ListViewFormSheet lvfs, java.lang.String caption)
          Construct a new DescriptiveFormSheet from the given DataExchangeFormSheet.
DescriptiveFormSheet(SingleTableFormSheet stfs)
          Construct a new DescriptiveFormSheet from the given SingleTableFormSheet.
 
Method Summary
 DataExchangeFormSheet getDataExchangeFormSheet()
          Get the DataExchangeFormSheet this formsheet was constructed with (if so), or null in any other case.
 ImagePanel getDescriptionImagePanel()
          get the imagepanel which desiplays the items image
 javax.swing.JPanel getDescriptionPanel()
          get the JPanel, which displays the description
 javax.swing.JTextPane getDescriptionTextPane()
          get the JTextPane which displays the text
 ListViewFormSheet getListViewFormSheet()
          Get the ListViewFormSheet this formsheet was constructed with (if so), or null in any other case.
 SingleTableFormSheet getSingleTableFormSheet()
          Get the SingleTableFormSheet this formsheet was constructed with (if so), or null in any other case.
protected  void minimizeDescPanel()
          Close description panel
protected  void openDescPanel()
          Open the description panel
protected  void setupDescriptionPanel()
          prepare the description panel component
 
Methods inherited from class org.salespointframework.core.FormSheet
addButton, addButton, addContentCreator, attach, attach, attach, buttonIterator, buttonIterator, cancel, close, copyFormSheetDnDComponents, customizeButtonbar, detachDisplay, detachProcess, detachSalesPoint, fillBtnPanel, getButton, getButtonbarPosition, getButtonsLock, getCaption, getComponent, getComponentLock, getDisplay, getDisplayLock, getDragLayer, getModalLayer, getPopupLayer, getProcess, getSalesPoint, getWrappedComponent, isCancelled, letFollowComponentOnDragLayer, ok, paintButtonBarBackground, registerDnDComponent, removeAllButtons, removeAllDndComponents, removeButton, removeDnDComponent, setButtonbarPosition, setCaption, setComponent, setFormsheetCustomizationListener, setWaitResponse, stopFollowComponentOnDragLayer, toString, waitResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stfsReference

private SingleTableFormSheet stfsReference
Keep a reference to the SingleTableFormSheet (if given).


ttfsReference

private DataExchangeFormSheet ttfsReference
Keep a reference to the DataExchangeFormSheet (if given).


lvfsReference

private ListViewFormSheet lvfsReference
Keep a reference to the ListViewFormsheet, if given


descriptionTextPane

private javax.swing.JTextPane descriptionTextPane
The Pane used to display the description


descriptionImagePanel

private ImagePanel descriptionImagePanel
the image panel which shows the items image


descriptionPanel

private javax.swing.JPanel descriptionPanel
The panel which holds the descriptionTextPane


minimizeButton

private ImagePanel minimizeButton
the minimize button


openButton

private ImagePanel openButton
the open button


openPanel

private javax.swing.JPanel openPanel
container for openButton

Constructor Detail

DescriptiveFormSheet

public DescriptiveFormSheet(SingleTableFormSheet stfs)
Construct a new DescriptiveFormSheet from the given SingleTableFormSheet.

Parameters:
stfs - The SingleTableFormSheet which to extend.
caption - Caption of the description box at the bottom.

DescriptiveFormSheet

public DescriptiveFormSheet(DataExchangeFormSheet ttfs,
                            java.lang.String caption)
Construct a new DescriptiveFormSheet from the given DataExchangeFormSheet.

Parameters:
ttfs - The DataExchangeFormSheet which to extend.
caption - Caption of the description box at the bottom.

DescriptiveFormSheet

public DescriptiveFormSheet(ListViewFormSheet lvfs,
                            java.lang.String caption)
Construct a new DescriptiveFormSheet from the given DataExchangeFormSheet.

Parameters:
ttfs - The DataExchangeFormSheet which to extend.
caption - Caption of the description box at the bottom.
Method Detail

openDescPanel

protected void openDescPanel()
Open the description panel


minimizeDescPanel

protected void minimizeDescPanel()
Close description panel


setupDescriptionPanel

protected void setupDescriptionPanel()
prepare the description panel component


getSingleTableFormSheet

public SingleTableFormSheet getSingleTableFormSheet()
Get the SingleTableFormSheet this formsheet was constructed with (if so), or null in any other case.

Returns:
The original SingleTableFormSheet.

getDataExchangeFormSheet

public DataExchangeFormSheet getDataExchangeFormSheet()
Get the DataExchangeFormSheet this formsheet was constructed with (if so), or null in any other case.

Returns:
The original DataExchangeFormSheet.

getListViewFormSheet

public ListViewFormSheet getListViewFormSheet()
Get the ListViewFormSheet this formsheet was constructed with (if so), or null in any other case.

Returns:
The original ListViewFormSheet.

getDescriptionPanel

public javax.swing.JPanel getDescriptionPanel()
get the JPanel, which displays the description

Returns:
a JPanel

getDescriptionTextPane

public javax.swing.JTextPane getDescriptionTextPane()
get the JTextPane which displays the text

Returns:
a JTextPane

getDescriptionImagePanel

public ImagePanel getDescriptionImagePanel()
get the imagepanel which desiplays the items image

Returns:
a ImagePanel