LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.control
Class LyGraphicalChartController

java.lang.Object
  extended by leon.control.LyController
      extended by leon.control.LyAreaController
          extended by leon.control.LyGraphicalChartController
All Implemented Interfaces:
java.lang.Runnable, LyGetSessionInterface, LyContextInterface, LyGetActionInterface, LySelectFileListenerInterface, LyGuiListener, LyInfoListener, LyEvaluator, LyDemandListener, LyPrintListenerInterface

public class LyGraphicalChartController
extends LyAreaController
implements java.lang.Runnable, LyPrintListenerInterface

This class implements the graphical chart area. This controller is associated with a builder LyGraphicalChartBuilder). It is also related to a behavior that implements LyChartBehaviorInterface. Usually, this behavior is an instance of LyChartBehavior.

See Also:
LyGraphicalChartBuilder, LyChartBehaviorInterface, LyChartBehavior

Field Summary
static java.lang.String __VERSION
          File Version
static java.lang.String DEMAND_CHART_DATA
          View chart data.
static java.lang.String DEMAND_OVERWRITE_FILE
          Application end.
static java.lang.String DEMAND_PRINT_CHART
          Saving the chart image.
static java.lang.String DEMAND_SAVE_DATA
          Save chart data.
static java.lang.String DEMAND_SAVE_DEF_CHART
          Saving the chart definition.
static java.lang.String DEMAND_SAVE_IMG_CHART
          Saving the chart image.
static int FILE_NAME_WIDTH
          Length of the field to enter the name of the save file (for chart definition).
static java.lang.String OVERWRITE_DEF
          Preview inputs.
static java.lang.String OVERWRITE_DEF_NO
          Preview inputs.
static java.lang.String OVERWRITE_DEF_YES
          Preview inputs.
static java.lang.String SAVE_PREFERENCE
          Preview inputs.
static java.lang.String SAVE_PREFERENCE_NO
          Preview inputs.
static java.lang.String SAVE_PREFERENCE_YES
          Preview inputs.
static java.lang.String SELECT_FILE
          Preview inputs.
 
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
LyGraphicalChartController(LySession session, LyController parent, LyAction action)
          Constructor.
LyGraphicalChartController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo)
          Constructor.
LyGraphicalChartController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects)
          Constructor.
LyGraphicalChartController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList objects, LyChartController chartController)
          Constructor.
 
Method Summary
 void actionDemand(LyActionDemand demand)
          Invoked when an action occurs.
 void free(LyController controller)
          Free this controller on request of the specified controller.
 java.lang.Class<?> getBehaviorInterface()
          Method that gives the interface that must be implemented by the behavior associated to this controller.
 LyChart getChartComponent()
          Accessor to the chart component (view).
 LyChartController getChartController()
          Retrieves the LyChartController parent if there is one (ie the chart is defined by parametring windows).
 LyChartInfo getChartInfo()
          Retrieves the ChartInfo.
 LyClassInfo getClassInfo()
          Retrieves the ClassInfo.
 LyObjectList getContent()
          Get content of the chart.
 java.lang.String getTitle()
          Gets title associated with this controller.
 boolean isViewResizable()
          Indicates if the view for this import controller is resizable.
 void print(int page)
          Implementation of LyPrintListenerInterface.
 void reloadChartComponent()
          Reloads the chart component in the parent view.
 void reset(boolean full)
          Reset all the content of the view.
 void run()
          Starting printChart request.
 void setChartInfo(LyChartInfo chartInfo)
          Sets the ChartInfo.
 boolean setContext(LyWorkSpace context)
          Set the current context for the controller.
 
Methods inherited from class leon.control.LyAreaController
canClose, canFree, clearViewCache, completeMenuBar, completeMessages, free, getAction, getAreaStackController, getBehavior, getBuilder, 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, getViewController, getViewController, hasMark, hasNotMark, hasViewController, hideView, infoEvent, initialize, isInitialized, isOutlined, menuDemand, reset, selectFileDemand, setContext, setContextClient, setIdle, setPreference, setViewController, showView, 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

DEMAND_PRINT_CHART

public static final java.lang.String DEMAND_PRINT_CHART
Saving the chart image.


DEMAND_SAVE_IMG_CHART

public static final java.lang.String DEMAND_SAVE_IMG_CHART
Saving the chart image.


DEMAND_SAVE_DEF_CHART

public static final java.lang.String DEMAND_SAVE_DEF_CHART
Saving the chart definition.


DEMAND_CHART_DATA

public static final java.lang.String DEMAND_CHART_DATA
View chart data.


DEMAND_OVERWRITE_FILE

public static final java.lang.String DEMAND_OVERWRITE_FILE
Application end.


SELECT_FILE

public static final java.lang.String SELECT_FILE
Preview inputs.


OVERWRITE_DEF

public static final java.lang.String OVERWRITE_DEF
Preview inputs.


OVERWRITE_DEF_YES

public static final java.lang.String OVERWRITE_DEF_YES
Preview inputs.


OVERWRITE_DEF_NO

public static final java.lang.String OVERWRITE_DEF_NO
Preview inputs.


SAVE_PREFERENCE

public static final java.lang.String SAVE_PREFERENCE
Preview inputs.


SAVE_PREFERENCE_YES

public static final java.lang.String SAVE_PREFERENCE_YES
Preview inputs.


SAVE_PREFERENCE_NO

public static final java.lang.String SAVE_PREFERENCE_NO
Preview inputs.


FILE_NAME_WIDTH

public static final int FILE_NAME_WIDTH
Length of the field to enter the name of the save file (for chart definition).

See Also:
Constant Field Values

DEMAND_SAVE_DATA

public static final java.lang.String DEMAND_SAVE_DATA
Save chart data.

Constructor Detail

LyGraphicalChartController

public LyGraphicalChartController(LySession session,
                                  LyController parent,
                                  LyAction action,
                                  LyClassInfo classInfo,
                                  LyObjectList objects,
                                  LyChartController chartController)
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 ...)
classInfo - always the classInfo of the specified objects.
objects - current context (not null because the view is contextual to a list of objects).
chartController - the parent chart controller

LyGraphicalChartController

public LyGraphicalChartController(LySession session,
                                  LyController parent,
                                  LyAction action,
                                  LyClassInfo classInfo,
                                  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 ...)
classInfo - always the classInfo of the specified objects.
objects - current context (not null because the view is contextual to a list of objects).

LyGraphicalChartController

public LyGraphicalChartController(LySession session,
                                  LyController parent,
                                  LyAction action,
                                  LyClassInfo classInfo)
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 ...)
classInfo - always the classInfo of the specified objects.

LyGraphicalChartController

public LyGraphicalChartController(LySession session,
                                  LyController parent,
                                  LyAction action)
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 ...)
Method Detail

getBehaviorInterface

public java.lang.Class<?> getBehaviorInterface()
Method that gives the interface that must be implemented by the behavior associated to this controller.

Overrides:
getBehaviorInterface in class LyAreaController
Returns:
Class representing the behavior interface of this controller.

getContent

public LyObjectList getContent()
Get content of the chart.

Overrides:
getContent in class LyAreaController
Returns:
the list of objects being displayed

reset

public void reset(boolean full)
Description copied from class: LyAreaController
Reset all the content of the view. This method may be called several times. This method should be overriden, default implementation makes nothing

Overrides:
reset in class LyAreaController
Parameters:
full - Boolean indicating if a full reset (including reset of datas) is requiered or not (only reset graphical area).
See Also:
LyAreaController.reset(boolean)

reloadChartComponent

public void reloadChartComponent()
Reloads the chart component in the parent view.


setContext

public boolean setContext(LyWorkSpace context)
Description copied from class: LyAreaController
Set the current context for the controller. If the context is unchanged, this method just call reset(). If there is a new context, this method free the current one and set the new one.

Specified by:
setContext in interface LyContextInterface
Overrides:
setContext in class LyAreaController
Parameters:
context - Current context, or null if no context is set for the view
Returns:
true if done
See Also:
LyAreaController.setContext(leon.data.LyWorkSpace)

isViewResizable

public boolean isViewResizable()
Indicates if the view for this import controller is resizable.

Overrides:
isViewResizable in class LyAreaController
Returns:
true if the view is resizable, false otherwise.

getChartController

public LyChartController getChartController()
Retrieves the LyChartController parent if there is one (ie the chart is defined by parametring windows).

Returns:
the chartController instance;

getClassInfo

public LyClassInfo getClassInfo()
Retrieves the ClassInfo.

Overrides:
getClassInfo in class LyAreaController
Returns:
the ClassInfo instance;

getChartInfo

public LyChartInfo getChartInfo()
Retrieves the ChartInfo.

Returns:
the ChartInfo instance;

getChartComponent

public LyChart getChartComponent()
Accessor to the chart component (view).

Returns:
The chart view component

setChartInfo

public void setChartInfo(LyChartInfo chartInfo)
Sets the ChartInfo.

Parameters:
chartInfo - the ChartInfo instance;

actionDemand

public void actionDemand(LyActionDemand demand)
Invoked when an action occurs.

Overrides:
actionDemand in class LyAreaController
Parameters:
demand - the demand caught by the listener
See Also:
LyController.demandPerformed(leon.view.event.LyDemand)

free

public void free(LyController controller)
Free this controller on request of the specified controller.

Overrides:
free in class LyAreaController
Parameters:
controller - controller instance which requested the freeing of this controller. If the controller is the parent, this controller is freed otherwise the method does nothing.
See Also:
LyAreaController.free()

run

public void run()
Starting printChart request.

Specified by:
run in interface java.lang.Runnable

print

public void print(int page)
Implementation of LyPrintListenerInterface.

Specified by:
print in interface LyPrintListenerInterface
Parameters:
page - the page to print

getTitle

public java.lang.String getTitle()
Gets title associated with this controller. The method is overriden to check the name of the chartinfo if available

Overrides:
getTitle in class LyAreaController
Returns:
the title corresponding to the action.

(c) January 2013 - W4 S.A.

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