LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LySimplePrintController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyAreaController
          extended by leon.control.LySimplePrintController
All Implemented Interfaces:
java.lang.Runnable, LyGetSessionInterface, LyContextInterface, LyGetActionInterface, LySelectFileListenerInterface, LyGuiListener, LyInfoListener, LyEvaluator, LyDemandListener, LyPrintDataInterface
Direct Known Subclasses:
LyPrintController, LyPrintPdfController

public abstract class LySimplePrintController
extends LyAreaController
implements java.lang.Runnable, LyPrintDataInterface

This class describes the controller associated to the print action of a list of objects. This controller doesn't have a builder. The controller is associted with a behavior that mus implementes LyPrintBehaviorInterface. Usually, this behavior is an instance of the class LyPrintBehavior

See Also:
LyAreaController, LyPrintBehaviorInterface, LyPrintBehavior

Field Summary
static java.lang.String __VERSION
          File Version
 java.lang.String _supportName
          Print handler support (file or printer name).
 java.lang.String PRINT_FORMATS
          Supported print formats ASCII.
 
Fields inherited from class leon.control.LyAreaController
DEFAULT_MENU_ITEM_IMAGE_SIZE, DEMAND_APPLY, DEMAND_CANCEL, DEMAND_CLOSE, DEMAND_CREATE_CHART, DEMAND_DELETE_CHART, DEMAND_DELETE_OBJECTINFOS, DEMAND_DELETE_PREFERENCE, DEMAND_UPDATE_VIEW, DEMAND_VALIDATE
 
Fields inherited from class leon.control.LyController
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP
 
Constructor Summary
LySimplePrintController(LySession session, LyController parent, LyAction action, LyObjectList objects)
          Constructor.
 
Method Summary
 void free()
          Free the current print job.
 LyBehaviorInterface getBehavior()
          Accessor to controller behavior A behavior is associated to a controller to let the developper specify application logic in the behavior.
 LyBuilder getDefaultBuilder()
          Returns default builder.
 java.util.BitSet getFieldMarks()
          Access to field marks used to build the controlled view.
 LyInfoList<LyFieldInfo> getFields(LyClassInfo classInfo)
          Gets the lits of fields to print.
 java.lang.String getFooterLabel(java.lang.Object field)
           
 java.lang.String getFormat()
          Gets printing format.
 java.lang.String getImage(java.lang.Object object)
           
 java.lang.String getLabel(java.lang.Object field)
           
 java.lang.String getLabel(java.lang.Object object, java.lang.Object field)
           
 LyView getParentView()
           
 java.lang.String getShortLabel(java.lang.Object object, java.lang.Object field)
           
 int getSortIndex(java.lang.Object field)
           
 java.lang.String getSupportName()
          Gets support name (either printer name or file name if printing is done in a file).
 java.lang.String getTab(java.lang.Object field)
           
 java.lang.String getTitle(java.lang.Object object)
           
 LyViewController getViewController()
          Returns view controller.
 boolean hasFooters()
           
 boolean isIncreasing(java.lang.Object field)
           
 boolean isInFile()
          Checks if printing is done in a file.
 boolean isLeftAligned(java.lang.Object field)
           
 boolean printEnd()
          Callback for end of print action.
abstract  void run()
          Printing objects starts.
 void setByList(boolean byList)
          Sets printing by list mode.
 void setFields(LyInfoList<LyFieldInfo> fields)
          Sets the lits of fields to print.
 void setPrintBehaviorInterface(LyPrintBehaviorInterface behavior)
          Set the specified behavior for this controller.
 void showView()
          Shows the Window which contains the view.
 
Methods inherited from class leon.control.LyAreaController
actionDemand, canClose, canFree, clearViewCache, completeMenuBar, completeMessages, free, getAction, getAreaStackController, getBehaviorInterface, getBuilder, getClassInfo, getContent, getContext, getContextClient, getContextTitle, getDefaultAction, getEnvironment, getFastEditionAction, getHelpFile, getImage, getImageTooltip, getInfoLabel, getInfoLabel, getKeyValue, getLabel, getLastModified, getMenuItemImage, getName, getParameter, getParameter, getParameterMarks, getParent, getParent, getParentAreaController, getRefreshTime, getSelection, getShortLabel, getTarget, getTitle, getViewController, hasMark, hasNotMark, hasViewController, hideView, infoEvent, initialize, isInitialized, isOutlined, isViewResizable, menuDemand, reset, reset, selectFileDemand, setContext, setContext, setContextClient, setIdle, setPreference, setViewController, showView, testParameter, toString, update, updateTitleBar
 
Methods inherited from class leon.control.LyController
activateViewDemand, demandPerformed, dragDropDemand, getApplication, getClassInfo, getComponent, getId, getImage, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getName, getObjectId, getSession, getUserData, getView, getViewManager, helpDemand, hideView, isFreed, isIdle, selectionDemand, setBuilder, setBuilderClass, setLastModified, setName, setUserData, showError, showError, showWarning, updateViewFromValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File Version

See Also:
Constant Field Values

_supportName

public java.lang.String _supportName
Print handler support (file or printer name).


PRINT_FORMATS

public java.lang.String PRINT_FORMATS
Supported print formats ASCII.

Constructor Detail

LySimplePrintController

public LySimplePrintController(LySession session,
                               LyController parent,
                               LyAction action,
                               LyObjectList objects)
Constructor.

Parameters:
session - current session associated to the controller. The controller automatically registers on the specified session.
parent - parent controller (or null for 'root' controller). Controller hierarchy indicates a child controller (for example a dialog created from a main view)
action - related action. If an action is specified, the controller uses action parameters (action name, action specific XML view description ...)
objects - current context (may be null if the view is not contextual to a list of objects).
Method Detail

free

public void free()
Free the current print job.

Overrides:
free in class LyAreaController
See Also:
LyAreaController.free(LyController)

getDefaultBuilder

public LyBuilder getDefaultBuilder()
Returns default builder. This method overrides the standard method to return. There is no builder associated with this controller

Returns:
the default builder

getViewController

public LyViewController getViewController()
Returns view controller. This controller doesn't have a view controller

Overrides:
getViewController in class LyAreaController
Returns:
the associated view Controller

showView

public void showView()
Shows the Window which contains the view.

Overrides:
showView in class LyAreaController

run

public abstract void run()
Printing objects starts.

Specified by:
run in interface java.lang.Runnable

printEnd

public boolean printEnd()
Callback for end of print action.

Returns:
true if successfull

setPrintBehaviorInterface

public void setPrintBehaviorInterface(LyPrintBehaviorInterface behavior)
Set the specified behavior for this controller.

Parameters:
behavior - behavior

getBehavior

public LyBehaviorInterface getBehavior()
Accessor to controller behavior A behavior is associated to a controller to let the developper specify application logic in the behavior.

Overrides:
getBehavior in class LyAreaController
Returns:
associated behavior

setByList

public void setByList(boolean byList)
Sets printing by list mode.

Parameters:
byList - the byList status

setFields

public void setFields(LyInfoList<LyFieldInfo> fields)
Sets the lits of fields to print.

Parameters:
fields - a list of fields

getFields

public LyInfoList<LyFieldInfo> getFields(LyClassInfo classInfo)
Gets the lits of fields to print.

Parameters:
classInfo - a classInfo
Returns:
a list of fields of the given classInfo

getFieldMarks

public java.util.BitSet getFieldMarks()
Access to field marks used to build the controlled view.

Returns:
the field marks

isInFile

public boolean isInFile()
Checks if printing is done in a file.

Returns:
True if printing is done in a file, false otherwise.

getSupportName

public java.lang.String getSupportName()
Gets support name (either printer name or file name if printing is done in a file).

Returns:
Support name.

getFormat

public java.lang.String getFormat()
Gets printing format.

Returns:
Print format.

getTitle

public java.lang.String getTitle(java.lang.Object object)
Specified by:
getTitle in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.getTitle(java.lang.Object)

getImage

public java.lang.String getImage(java.lang.Object object)
Specified by:
getImage in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.getImage(java.lang.Object)

getTab

public java.lang.String getTab(java.lang.Object field)
Specified by:
getTab in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.getTab(java.lang.Object)

getLabel

public java.lang.String getLabel(java.lang.Object field)
Specified by:
getLabel in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.getLabel(java.lang.Object)

getLabel

public java.lang.String getLabel(java.lang.Object object,
                                 java.lang.Object field)
Specified by:
getLabel in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.getLabel(java.lang.Object, java.lang.Object)

getShortLabel

public java.lang.String getShortLabel(java.lang.Object object,
                                      java.lang.Object field)
Specified by:
getShortLabel in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.getShortLabel(java.lang.Object, java.lang.Object)

hasFooters

public boolean hasFooters()
Specified by:
hasFooters in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.hasFooters()

getSortIndex

public int getSortIndex(java.lang.Object field)
Specified by:
getSortIndex in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.getSortIndex(java.lang.Object)

isIncreasing

public boolean isIncreasing(java.lang.Object field)
Specified by:
isIncreasing in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.isIncreasing(java.lang.Object)

getFooterLabel

public java.lang.String getFooterLabel(java.lang.Object field)
Specified by:
getFooterLabel in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.getFooterLabel(java.lang.Object)

isLeftAligned

public boolean isLeftAligned(java.lang.Object field)
Specified by:
isLeftAligned in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.isLeftAligned(java.lang.Object)

getParentView

public LyView getParentView()
Specified by:
getParentView in interface LyPrintDataInterface
See Also:
LyPrintDataInterface.getParentView()

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com