ilog.views.faces.dhtml.component
Class IlvFacesDHTMLViewSupportImpl

java.lang.Object
  extended by ilog.views.faces.dhtml.component.IlvDHTMLHelperImpl
      extended by ilog.views.faces.dhtml.component.IlvFacesDHTMLViewSupportImpl
All Implemented Interfaces:
IlvDHTMLHelper, IlvFacesDHTMLViewSupport, IlvDHTMLConstants, IlvDHTMLFrameworkConstants, IlvFacesConstants, IlvFrameworkConstants, Serializable
Direct Known Subclasses:
IltFacesDHTMLGraphViewSupportImpl

public class IlvFacesDHTMLViewSupportImpl
extends IlvDHTMLHelperImpl
implements IlvDHTMLFrameworkConstants, IlvFacesDHTMLViewSupport

This class is the implementation of the IlvDHTMLViewSupport that defines a view that has the properties necessary to have a DHTML render.

Since:
JViews 6.5
See Also:
Serialized Form

Field Summary
static Boolean GENERATE_IMAGE_MAP_DEFAULT_VALUE
          Flag indicating whether an image map should be generated or not.
static Boolean IMAGE_MAP_VISIBLE_DEFAULT_VALUE
          Flag indicating whether an image map should be visible or not (if generated).
static Boolean RESIZABLE_DEFAULT_VALUE
          Default value of resizable property.
static Integer UPDATE_INTERVAL_DEFAULT_VALUE
          The interval in seconds between two automatic updates.
 
Fields inherited from class ilog.views.faces.dhtml.component.IlvDHTMLHelperImpl
helped
 
Fields inherited from interface ilog.views.faces.dhtml.IlvDHTMLFrameworkConstants
SESSION_ID_PREFIX, STATE_URL, STATIC_LAYERS_COUNT_PARAM, TILE_MANAGER, UPDATE_INTERVAL
 
Fields inherited from interface ilog.views.faces.IlvFrameworkConstants
ACTION_NAME, AUTO_REFRESH, BOUNDING_BOX, CONSTRAINED_ON_CONTENTS, INTERACTOR, INTERACTOR_ID, MAX_ZOOM_LEVEL, MIN_ZOOM_LEVEL, NB_BUTTONS, ORIENTATION, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL, PAN_FACTOR, STATIC_LAYERS_COUNT, TILE_SIZE, VISIBLE_LAYERS, ZOOM_FACTOR, ZOOM_LEVELS
 
Constructor Summary
IlvFacesDHTMLViewSupportImpl(IlvBasicView helped)
          Creates a new IlvFacesDHTMLViewSupportImpl instance.
 
Method Summary
 Color getBackgroundColor()
          Returns the background color of the view
 String getBeforeSessionExpirationHandler()
          Returns the JavaScript code that will be called when the session is about to expire.
 String getErrorMessage()
          Returns the message displayed by the view if an error occurred during the image generation by the server.
 String getFamily()
          Returns null as this component is a helper and not a real component.
 IlvImageMapAreaGenerator getImageMapGenerator()
          

Returns the image map generator.

 String getImageMapGeneratorClass()
          

Returns the image map generator class name.

 String getOnCapabilitiesLoaded()
          Returns the JavaScript code executed when the capabilities are loaded from the server.
 String getOnImageLoaded()
          Returns the JavaScript code that is executed when the image is loaded.
 String getStateURL()
          Returns a string that represents the client view state.
 IlvTileManager getTileManager()
          Returns the tile manager.
 int getUpdateInterval()
          Returns the interval in seconds between two automatic updates.
 IlvManagerView getView()
          Returns the manager view to be displayed by the helped view.
 IlvManagerView getView(IlvManagerView superView)
          Returns the manager view to be displayed by the helped view.
 boolean isGenerateImageMap()
          Returns the flag indicating that an image map should be generated.
 boolean isImageMapVisible()
          Returns the flag indicating whether an image map should be visible or not (if generated)
 boolean isResizable()
          Returns whether the view is resizable or not.
 void restoreState(FacesContext context, Object stateObj)
          Restores the state of this component from the state parameter.
 Object saveState(FacesContext context)
          Returns the state of this component.
 void setBackgroundColor(Color backgroundColor)
          Sets the background color of the view.
 void setBeforeSessionExpirationHandler(String handler)
          Sets the JavaScript code that will be called when the session is about to expire.
 void setErrorMessage(String errorMessage)
          The message displayed by the view if an error occurred during the image generation by the server.
 void setGenerateImageMap(boolean generateImageMap)
          Sets the flag indicating whether an image map should be generated or not.
 void setImageMapGenerator(IlvImageMapAreaGenerator imageMapGenerator)
          

Sets the image map generator.

 void setImageMapGeneratorClass(String imageMapGeneratorClass)
          

Sets the image map generator class name.

 void setImageMapVisible(boolean imageMapVisible)
          Sets the flag indicating whether an image map should be visible or not (if generated)
 void setOnCapabilitiesLoaded(String onCapabilitiesLoaded)
          The JavaScript code executed when the capabilities are loaded from the server.
 void setOnImageLoaded(String onImageLoaded)
          The JavaScript code that is executed when the image is loaded.
 void setResizable(boolean resizable)
          Sets whether the view is resizable or not.
 void setStateURL(String clientState)
          Sets the client state of the component.
 void setTileManager(IlvTileManager tileManager)
          Sets the tile manager.
 void setUpdateInterval(int updateInterval)
          The interval in seconds between two automatic updates.
 void updateModel(FacesContext context)
          Updates the referenced values with the local values of the component if these values were updated from the client.
 
Methods inherited from class ilog.views.faces.dhtml.component.IlvDHTMLHelperImpl
getHelped, getImageFormat, getServlet, getServletClass, getServletURL, getWaitingImage, setHelped, setImageFormat, setServlet, setServletClass, setServletURL, setValue, setWaitingImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.views.faces.dhtml.component.IlvDHTMLHelper
getImageFormat, getServlet, getServletClass, getServletURL, getWaitingImage, setImageFormat, setServlet, setServletClass, setServletURL, setValue, setWaitingImage
 

Field Detail

UPDATE_INTERVAL_DEFAULT_VALUE

public static final Integer UPDATE_INTERVAL_DEFAULT_VALUE
The interval in seconds between two automatic updates.


GENERATE_IMAGE_MAP_DEFAULT_VALUE

public static final Boolean GENERATE_IMAGE_MAP_DEFAULT_VALUE
Flag indicating whether an image map should be generated or not.


IMAGE_MAP_VISIBLE_DEFAULT_VALUE

public static final Boolean IMAGE_MAP_VISIBLE_DEFAULT_VALUE
Flag indicating whether an image map should be visible or not (if generated).


RESIZABLE_DEFAULT_VALUE

public static final Boolean RESIZABLE_DEFAULT_VALUE
Default value of resizable property.

Constructor Detail

IlvFacesDHTMLViewSupportImpl

public IlvFacesDHTMLViewSupportImpl(IlvBasicView helped)
Creates a new IlvFacesDHTMLViewSupportImpl instance.

Parameters:
helped - The component to support.
Method Detail

getFamily

public String getFamily()
Returns null as this component is a helper and not a real component.

Returns:
null.

getUpdateInterval

public int getUpdateInterval()
Returns the interval in seconds between two automatic updates.

Specified by:
getUpdateInterval in interface IlvFacesDHTMLViewSupport
Returns:
The update interval.

setUpdateInterval

public void setUpdateInterval(int updateInterval)
The interval in seconds between two automatic updates.

Specified by:
setUpdateInterval in interface IlvFacesDHTMLViewSupport
Parameters:
updateInterval - The new update interval to set.

isGenerateImageMap

public boolean isGenerateImageMap()
Returns the flag indicating that an image map should be generated.

Specified by:
isGenerateImageMap in interface IlvFacesDHTMLViewSupport
Returns:
true if the image map will be generated, false otherwise.

setGenerateImageMap

public void setGenerateImageMap(boolean generateImageMap)
Sets the flag indicating whether an image map should be generated or not.

Specified by:
setGenerateImageMap in interface IlvFacesDHTMLViewSupport
Parameters:
generateImageMap - The flag value to set.

isImageMapVisible

public boolean isImageMapVisible()
Returns the flag indicating whether an image map should be visible or not (if generated)

Specified by:
isImageMapVisible in interface IlvFacesDHTMLViewSupport
Returns:
true if the image map will be shown, false otherwise.

setImageMapVisible

public void setImageMapVisible(boolean imageMapVisible)
Sets the flag indicating whether an image map should be visible or not (if generated)

Specified by:
setImageMapVisible in interface IlvFacesDHTMLViewSupport
Parameters:
imageMapVisible - The flag value to set.

getImageMapGenerator

public IlvImageMapAreaGenerator getImageMapGenerator()

Returns the image map generator.

If thegenerateImageMap property is true, this generator will be invoked to dynamically create the image map.

Specified by:
getImageMapGenerator in interface IlvFacesDHTMLViewSupport
Returns:
The image map generator.
Since:
JViews 7.5

setImageMapGenerator

public void setImageMapGenerator(IlvImageMapAreaGenerator imageMapGenerator)

Sets the image map generator.

If thegenerateImageMap property is true, this generator will be invoked to dynamically create the image map.

Specified by:
setImageMapGenerator in interface IlvFacesDHTMLViewSupport
Parameters:
imageMapGenerator - The image map generator.
Since:
JViews 7.5

getImageMapGeneratorClass

public String getImageMapGeneratorClass()

Returns the image map generator class name.

If the generateImageMap property is true, and the imageMapgenerator property is not set, an instance of this generator will be created and this generator will be invoked to dynamically create the image map.

Specified by:
getImageMapGeneratorClass in interface IlvFacesDHTMLViewSupport
Returns:
The image map generator class name.
Since:
JViews 7.5

setImageMapGeneratorClass

public void setImageMapGeneratorClass(String imageMapGeneratorClass)

Sets the image map generator class name.

If the generateImageMap property is true, and the imageMapgenerator property is not set, an instance of this generator will be created and this generator will be invoked to dynamically create the image map.

Specified by:
setImageMapGeneratorClass in interface IlvFacesDHTMLViewSupport
Parameters:
imageMapGeneratorClass - The image map generator class name.
Since:
JViews 7.5

getBackgroundColor

public Color getBackgroundColor()
Returns the background color of the view

Specified by:
getBackgroundColor in interface IlvFacesDHTMLViewSupport
Returns:
The background color of the view.

setBackgroundColor

public void setBackgroundColor(Color backgroundColor)
Sets the background color of the view.

Specified by:
setBackgroundColor in interface IlvFacesDHTMLViewSupport
Parameters:
backgroundColor - The background color to set.

getOnImageLoaded

public String getOnImageLoaded()
Returns the JavaScript code that is executed when the image is loaded.

Specified by:
getOnImageLoaded in interface IlvFacesDHTMLViewSupport
Returns:
The JavaScript function registered on the imageLoaded event.

setOnImageLoaded

public void setOnImageLoaded(String onImageLoaded)
The JavaScript code that is executed when the image is loaded.

Specified by:
setOnImageLoaded in interface IlvFacesDHTMLViewSupport
Parameters:
onImageLoaded - The new JavaScript function handler.

getOnCapabilitiesLoaded

public String getOnCapabilitiesLoaded()
Returns the JavaScript code executed when the capabilities are loaded from the server.

Specified by:
getOnCapabilitiesLoaded in interface IlvFacesDHTMLViewSupport
Returns:
The JavaScript function registered on the capabilitiesLoaded event.

setOnCapabilitiesLoaded

public void setOnCapabilitiesLoaded(String onCapabilitiesLoaded)
The JavaScript code executed when the capabilities are loaded from the server.

Specified by:
setOnCapabilitiesLoaded in interface IlvFacesDHTMLViewSupport
Parameters:
onCapabilitiesLoaded - The new JavaScript function handler.

getErrorMessage

public String getErrorMessage()
Returns the message displayed by the view if an error occurred during the image generation by the server.

Specified by:
getErrorMessage in interface IlvFacesDHTMLViewSupport
Returns:
The message when an error occurred.

setErrorMessage

public void setErrorMessage(String errorMessage)
The message displayed by the view if an error occurred during the image generation by the server.

Specified by:
setErrorMessage in interface IlvFacesDHTMLViewSupport
Parameters:
errorMessage - The new error message to set.

getStateURL

public String getStateURL()
Returns a string that represents the client view state.

Specified by:
getStateURL in interface IlvFacesDHTMLViewSupport
Returns:
The client state of the component.

setStateURL

public void setStateURL(String clientState)
Sets the client state of the component.

Specified by:
setStateURL in interface IlvFacesDHTMLViewSupport
Parameters:
clientState - The client state of the component.

isResizable

public boolean isResizable()
Returns whether the view is resizable or not.

Specified by:
isResizable in interface IlvFacesDHTMLViewSupport
Returns:
The resizable flag.

setResizable

public void setResizable(boolean resizable)
Sets whether the view is resizable or not.

Specified by:
setResizable in interface IlvFacesDHTMLViewSupport
Parameters:
resizable - The resizable flag to set.

getView

public IlvManagerView getView()
Returns the manager view to be displayed by the helped view.
A call to this method is similar to getView(null).

Specified by:
getView in interface IlvFacesDHTMLViewSupport
Returns:
The manager view to be displayed.

getView

public IlvManagerView getView(IlvManagerView superView)
Returns the manager view to be displayed by the helped view.
The algorithm to find this manager view is:

Parameters:
superView - The manager view resulting by a call to super.getView() by the helped view.
Returns:
The manager view to be displayed.

getTileManager

public IlvTileManager getTileManager()
Returns the tile manager. The tile manager is responsible for retrieving and/or storing image tiles on the server side.

The tile manager is used when the view is tiled, that is, if the tileSize property is greater or equals to 0.

Specified by:
getTileManager in interface IlvFacesDHTMLViewSupport
Returns:
The tile manager.
Since:
JViews 8.0

setTileManager

public void setTileManager(IlvTileManager tileManager)
Sets the tile manager.

The tile manager is used when the view is tiled, that is, if the tileSize property is greater or equals to 0.

Specified by:
setTileManager in interface IlvFacesDHTMLViewSupport
Parameters:
tileManager - The tile manager to set.
Since:
JViews 8.0

getBeforeSessionExpirationHandler

public String getBeforeSessionExpirationHandler()
Returns the JavaScript code that will be called when the session is about to expire.

Specified by:
getBeforeSessionExpirationHandler in interface IlvFacesDHTMLViewSupport
Returns:
The JavasScript code to execute when the session is about to expire.
Since:
JViews 8.1

setBeforeSessionExpirationHandler

public void setBeforeSessionExpirationHandler(String handler)
Sets the JavaScript code that will be called when the session is about to expire.

This code can use the view implicit variable that represents the JavaScript proxy of this component.

Specified by:
setBeforeSessionExpirationHandler in interface IlvFacesDHTMLViewSupport
Parameters:
handler - The JavasScript code.
Since:
JViews 8.1

updateModel

public void updateModel(FacesContext context)
Updates the referenced values with the local values of the component if these values were updated from the client.

Specified by:
updateModel in interface IlvDHTMLHelper
Overrides:
updateModel in class IlvDHTMLHelperImpl
Parameters:
context - The current faces context.

saveState

public Object saveState(FacesContext context)
Returns the state of this component.

Specified by:
saveState in interface IlvDHTMLHelper
Overrides:
saveState in class IlvDHTMLHelperImpl
Parameters:
context - The current faces context.
Returns:
The state of this component.

restoreState

public void restoreState(FacesContext context,
                         Object stateObj)
Restores the state of this component from the state parameter.

Specified by:
restoreState in interface IlvDHTMLHelper
Overrides:
restoreState in class IlvDHTMLHelperImpl
Parameters:
context - The current faces context.
stateObj - The previously saved state of this component.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.