by.belsoft.report.tools.actions
Class PreviewAction

java.lang.Object
  |
  +--by.belsoft.report.tools.actions.ContextData
        |
        +--by.belsoft.report.tools.actions.CommonViewAction
              |
              +--by.belsoft.report.tools.actions.PreviewAction
All Implemented Interfaces:
SimpleElements

public class PreviewAction
extends CommonViewAction

This class supports all preview actions

Author:
Ilya Kirillov

Field Summary
 
Fields inherited from class by.belsoft.report.tools.actions.CommonViewAction
attributes, attributeStyleList, cols, container, haveColor, id, inputRend, renders, rows, selectedTableId, selectLists, selectValue, uiTree, xmluts
 
Constructor Summary
PreviewAction()
          PreviewAction base constructor
 
Method Summary
 BaseTakenUp findElementParentContainerObject(java.lang.String id, BaseTakenUp cont, BaseTakenUp cont_lev1, BaseTakenUp cont_lev2)
          Method to get elements container by its id
 void generate(ActionEvent ae)
          generate generates new preview table
 java.lang.String getFieldId()
          standard getter
 java.util.ArrayList getFields()
          standard getter
 java.lang.String getHeader()
          standard getter
 BaseTakenUp getPropsTable()
          standard getter
 DefaultTreeModel getPropsTree()
          getPropsTree gets detailed table tree
 DefaultTreeModel getTree()
          getTree gets table structure tree
 UITree getUiTree()
          standard getter
 void makeUnusableRow(BaseTakenUp from, BaseTakenUp to)
          makeUnusableRow makes row that will not be used during generation
 DefaultMutableTreeNode makeXMLTreeDynamicElementsFromObject(DefaultMutableTreeNode to, java.util.ArrayList what)
          makeXMLTreeDynamicElementsFromObject makes object tree
 void pasteHeader(ActionEvent ae)
          pasteHeader pastes header for column
 java.lang.String properties()
          properties prepares properties container
 BaseTakenUp replaceIdWithElementName(BaseTakenUp cont)
          Replaces the id with element name inside given container
 void save(ActionEvent ae)
          save all data per action
 void saveAttrs(ActionEvent ae)
          saveAttrs saves current container attributes
 void saveContainer(ActionEvent ae)
          saveContainer saves current container
 void saveProps(ActionEvent ae)
          saveProps seves container with all its properties
 void savePropsData(ActionEvent ae)
          savePropsData saves properties data
 void setAttributeStyle(ActionEvent ae)
          setAttributeStyle sets style for given element
 void setComplexFields()
          setComplexFields sets fields with complex instance to container
 void setContainerByElementId(java.lang.String id)
          Sets container by elements id
 void setFieldId(java.lang.String fieldId)
          standard setter
 void setFields(java.util.ArrayList fields)
          standard setter
 void setFields(java.lang.String id)
          setFields sets fields for chosen query
 void setFieldToTable(ActionEvent ae)
          setFieldToTable pastes field to generated table
 void setHeader(java.lang.String header)
          standard setter
 void setPropsTable(BaseTakenUp propsTable)
          standard setter
 void setUiTree(UITree uiTree)
          standard setter
 
Methods inherited from class by.belsoft.report.tools.actions.CommonViewAction
findContainerBaseElement, findContainerObject, generateTable, getAttributes, getAttributeStyleList, getCols, getContainer, getHaveColor, getId, getIdContainer, getInputRend, getRenders, getRows, getSelectedTableId, getSelectLists, getSelectValue, listenSelectProps, organizeAttributes, pasteImage, pasteLink, pasteTextArea, pasteTextField, returnContainer, setAttributes, setAttributeStyleList, setCols, setCommonAttributeStyle, setContainer, setHaveColor, setId, setInputRend, setPageData, setRenders, setRows, setSelectedTableId, setSelectLists, setSelectValue
 
Methods inherited from class by.belsoft.report.tools.actions.ContextData
getContext, getReportName, getRequest, getSession, setRefreshData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreviewAction

public PreviewAction()
PreviewAction base constructor

Method Detail

getTree

public DefaultTreeModel getTree()
getTree gets table structure tree

Returns:
DefaultTreeModel the stucture tree

getPropsTree

public DefaultTreeModel getPropsTree()
getPropsTree gets detailed table tree

Returns:
DefaultTreeModel the detailed table tree

makeXMLTreeDynamicElementsFromObject

public DefaultMutableTreeNode makeXMLTreeDynamicElementsFromObject(DefaultMutableTreeNode to,
                                                                   java.util.ArrayList what)
makeXMLTreeDynamicElementsFromObject makes object tree

Parameters:
to - DefaultMutableTreeNode where to put tree
what - ArrayList with tables to paste
Returns:
DefaultMutableTreeNode result tree

setFields

public void setFields(java.lang.String id)
setFields sets fields for chosen query

Parameters:
id - String the element id

generate

public void generate(ActionEvent ae)
generate generates new preview table

Parameters:
ae - ActionEvent

setComplexFields

public void setComplexFields()
setComplexFields sets fields with complex instance to container


makeUnusableRow

public void makeUnusableRow(BaseTakenUp from,
                            BaseTakenUp to)
makeUnusableRow makes row that will not be used during generation

Parameters:
from - BaseTakenUp from where fields will be taken
to - BaseTakenUp where row will be inserted

setAttributeStyle

public void setAttributeStyle(ActionEvent ae)
setAttributeStyle sets style for given element

Parameters:
ae - ActionEvent event invoked

saveProps

public void saveProps(ActionEvent ae)
saveProps seves container with all its properties

Parameters:
ae - ActionEvent event invoked

replaceIdWithElementName

public BaseTakenUp replaceIdWithElementName(BaseTakenUp cont)
Replaces the id with element name inside given container

Parameters:
cont - the container to replace
Returns:
the result container

save

public void save(ActionEvent ae)
save all data per action

Parameters:
ae - ActionEvent event invoked

setFieldToTable

public void setFieldToTable(ActionEvent ae)
setFieldToTable pastes field to generated table

Parameters:
ae - ActionEvent event invoked

properties

public java.lang.String properties()
properties prepares properties container

Overrides:
properties in class CommonViewAction
Returns:
String with forward mapping

saveContainer

public void saveContainer(ActionEvent ae)
saveContainer saves current container

Parameters:
ae - ActionEvent event invoked

savePropsData

public void savePropsData(ActionEvent ae)
savePropsData saves properties data

Parameters:
ae - ActionEvent event invoked

findElementParentContainerObject

public BaseTakenUp findElementParentContainerObject(java.lang.String id,
                                                    BaseTakenUp cont,
                                                    BaseTakenUp cont_lev1,
                                                    BaseTakenUp cont_lev2)
Method to get elements container by its id

Parameters:
id - the element id
cont - the parent of parent container
cont_lev1 - the parent of container
cont_lev2 - the container
Returns:
the container of the element

setContainerByElementId

public void setContainerByElementId(java.lang.String id)
Sets container by elements id

Parameters:
id - the element id

saveAttrs

public void saveAttrs(ActionEvent ae)
saveAttrs saves current container attributes

Parameters:
ae - ActionEvent event invoked

pasteHeader

public void pasteHeader(ActionEvent ae)
pasteHeader pastes header for column

Parameters:
ae - ActionEvent event invoked

getFields

public java.util.ArrayList getFields()
standard getter

Returns:
Returns the fields.

setFields

public void setFields(java.util.ArrayList fields)
standard setter

Parameters:
fields - The fields to set.

getFieldId

public java.lang.String getFieldId()
standard getter

Returns:
Returns the fieldId.

setFieldId

public void setFieldId(java.lang.String fieldId)
standard setter

Parameters:
fieldId - The fieldId to set.

getHeader

public java.lang.String getHeader()
standard getter

Returns:
Returns the header.

setHeader

public void setHeader(java.lang.String header)
standard setter

Parameters:
header - The header to set.

getUiTree

public UITree getUiTree()
standard getter

Overrides:
getUiTree in class CommonViewAction
Returns:
Returns the uiTree.

setUiTree

public void setUiTree(UITree uiTree)
standard setter

Overrides:
setUiTree in class CommonViewAction
Parameters:
uiTree - The uiTree to set.

getPropsTable

public BaseTakenUp getPropsTable()
standard getter

Returns:
Returns the property table

setPropsTable

public void setPropsTable(BaseTakenUp propsTable)
standard setter

Parameters:
propsTable - The property table to set.


Copyright © 2005 BelSoft Inc. All Rights Reserved.