ilog.views.diagrammer.faces.dhtml.component
Class IlvFacesDHTMLDiagrammerView

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIGraphic
              extended by ilog.views.faces.component.IlvBasicView
                  extended by ilog.views.faces.component.IlvFacesView
                      extended by ilog.views.diagrammer.faces.component.IlvFacesDiagrammerView
                          extended by ilog.views.diagrammer.faces.dhtml.component.IlvFacesDHTMLDiagrammerView
All Implemented Interfaces:
IlvFacesDiagrammerConstants, IlvFacesComponent, IlvDHTMLHelper, IlvFacesDHTMLViewSupport, IlvDHTMLConstants, IlvFacesConstants, IlvFrameworkConstants, Serializable, StateHolder
Direct Known Subclasses:
IlvFacesDHTMLMapView

public class IlvFacesDHTMLDiagrammerView
extends IlvFacesDiagrammerView
implements IlvFacesDHTMLViewSupport

This class defines the faces diagrammer component that has the properties needed for a DHTML rendering.

Since:
JViews 6.5
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ilog.views.faces.component.IlvFacesView
MAX_ZOOM_DEFAULT_VALUE, MIN_ZOOM_DEFAULT_VALUE, PAN_FACTOR_DEFAULT_VALUE, ZOOM_FACTOR_DEFAULT_VALUE
 
Fields inherited from class ilog.views.faces.component.IlvBasicView
DEFAULT_OBJECT_FINDER
 
Fields inherited from class javax.faces.component.UIGraphic
COMPONENT_FAMILY, COMPONENT_TYPE
 
Fields inherited from interface ilog.views.faces.dhtml.IlvDHTMLConstants
AUTO_SUBMIT, BACKGROUND_COLOR, CAPABILITIES_LOADED_HANDLER, COMPONENT, DO_ACTION_ON_BG_DESELECT, ERROR_MESSAGE, GENERATE_IMAGE_MAP, IMAGE_FORMAT, IMAGE_LOADED_HANDLER, IMAGE_MAP_GENERATOR, IMAGE_MAP_GENERATOR_CLASS, IMAGE_MAP_VISIBLE, IMAGE_SERVLET_CONTEXT, INVOCATION_CONTEXT, JSF_CONTEXT, ON_CLICK, ON_SELECTION_CHANGED, PORTLET_CONTEXT_KEY, PORTLET_SESSION_KEY, REPLACE_PATTERN, RESIZABLE, SESSION_EXP_HANDLER, SUBMITTED_VALUE, WAITING_IMAGE
 
Fields inherited from interface ilog.views.diagrammer.faces.IlvFacesDiagrammerConstants
DASHBOARD_DIAGRAM, DATA_SOURCE, DATA_SOURCE_ID, DATA_URL, DIAGRAMMER, EDITABLE, INPUT_XSL, OUTPUT_XSL, PARAM_CSS, PARAM_XML, PROPERTY_ACCESSOR, STYLE_SHEETS
 
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
IlvFacesDHTMLDiagrammerView()
          Creates a new IlvFacesDHTMLDiagrammerView 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.
static String getComponentType()
          Returns the type of this component.
 String getControllerURL()
          Returns the URL of the controller servlet.
 IlvDiagrammer getDiagrammer()
          Returns the IlvDiagrammer instance wrapped by this IlvFacesDiagrammer instance.
 String getErrorMessage()
          Returns the message displayed by the view if an error occurred during the image generation by the server.
 String getFamily()
          

Returns the identifier of the component family to which this component belongs. This identifier, in conjunction with the value of the rendererType property, may be used to select the appropriate Renderer for this component instance.

This implementation returns the fully qualified class name.

 String getImageFormat()
          Returns the desired format of the image generated by the servlet.
 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 getServlet()
          Returns the servlet that will generate the image displayed by the view.
 String getServletClass()
          
 String getServletURL()
          
 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 that will be displayed by the view.
 String getWaitingImage()
          Returns the path to the image displayed when the view loads the image.
 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 stateObj 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 setImageFormat(String imageFormat)
          Sets the desired format of the image generated by the servlet.
 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 setServlet(String servlet)
          Sets the servlet that will generate the image displayed by the view.
 void setServletClass(String servletClass)
          
 void setServletURL(String servletURL)
          
 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 setValue(Object value)
          Sets the servlet that will generate the image displayed by the view.
 void setWaitingImage(String waitingImage)
          Sets the path of the image displayed when the view loads the image.
 void updateModel(FacesContext ctx)
          This method 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.diagrammer.faces.component.IlvFacesDiagrammerView
getDataSource, getDataSourceId, getDefaultObjectFinder, getProject, getStyleSheets, isEditable, setDataSource, setDataSourceId, setDiagrammer, setEditable, setProject, setStyleSheets, showAll
 
Methods inherited from class ilog.views.faces.component.IlvFacesView
getBoundingBox, getInteractor, getInteractorId, getMaxZoomLevel, getMinZoomLevel, getPanFactor, getStaticLayersCount, getTileSize, getVisibleLayers, getZoomFactor, getZoomLevels, isConstrainedOnContents, processValidators, setBoundingBox, setConstrainedOnContents, setInteractor, setInteractorId, setMaxZoomLevel, setMinZoomLevel, setPanFactor, setStaticLayersCount, setTileSize, setView, setVisibleLayers, setZoomFactor, setZoomLevels
 
Methods inherited from class ilog.views.faces.component.IlvBasicView
clearDecodedPropertyMap, createFacesComponent, getAttributes, getData, getHeight, getMessageBox, getMessageBoxId, getStyle, getStyleClass, getWidth, isDecodedProperty, processUpdates, resetDecodedProperties, setData, setDecodedProperty, setHeight, setMessageBox, setMessageBoxId, setStyle, setStyleClass, setWidth
 
Methods inherited from class javax.faces.component.UIGraphic
getUrl, getValue, getValueBinding, setUrl, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvFacesDHTMLDiagrammerView

public IlvFacesDHTMLDiagrammerView()
Creates a new IlvFacesDHTMLDiagrammerView instance.

Method Detail

getFamily

public String getFamily()

Returns the identifier of the component family to which this component belongs. This identifier, in conjunction with the value of the rendererType property, may be used to select the appropriate Renderer for this component instance.

This implementation returns the fully qualified class name.

Overrides:
getFamily in class IlvFacesDiagrammerView
Returns:
The family to which this component belongs.

getComponentType

public static String getComponentType()
Returns the type of this component.

Returns:
The type of this component.

getBackgroundColor

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

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

getControllerURL

public String getControllerURL()
                        throws Exception
Returns the URL of the controller servlet.

Returns:
The URL of the controller servlet.
Throws:
IllegalStateException - if this type of request is not handled.
Exception

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.

getImageFormat

public String getImageFormat()
Returns the desired format of the image generated by the servlet.

Specified by:
getImageFormat in interface IlvDHTMLHelper
Returns:
The desired format of the image generated by the servlet.

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.

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.

getServlet

public String getServlet()
Returns the servlet that will generate the image displayed by the view. The returned value could be a URL or a fully qualified class.

Specified by:
getServlet in interface IlvDHTMLHelper
Returns:
The image generating servlet.

getServletClass

public String getServletClass()

Specified by:
getServletClass in interface IlvDHTMLHelper

getServletURL

public String getServletURL()

Specified by:
getServletURL in interface IlvDHTMLHelper

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.

getUpdateInterval

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

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

getWaitingImage

public String getWaitingImage()
Returns the path to the image displayed when the view loads the image.

Specified by:
getWaitingImage in interface IlvDHTMLHelper
Returns:
The path to the image displayed when the view loads the image.

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.

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.

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.

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.

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.

setImageFormat

public void setImageFormat(String imageFormat)
Sets the desired format of the image generated by the servlet. Valid values are "JPEG" and "PNG"'.

Specified by:
setImageFormat in interface IlvDHTMLHelper
Parameters:
imageFormat - The desired image format of the image displayed by the view.

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.

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.

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.

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.

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.

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.

setServlet

public void setServlet(String servlet)
Sets the servlet that will generate the image displayed by the view. This method is an alias for setValue. The servlet parameter could be a URL to the servlet or a fully qualified servlet class that will be instantiated to generate the image.

Specified by:
setServlet in interface IlvDHTMLHelper
Parameters:
servlet - The image generating servlet.

setServletClass

public void setServletClass(String servletClass)

Specified by:
setServletClass in interface IlvDHTMLHelper

setServletURL

public void setServletURL(String servletURL)

Specified by:
setServletURL in interface IlvDHTMLHelper

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.

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.

setValue

public void setValue(Object value)
Sets the servlet that will generate the image displayed by the view. The servlet parameter could be a URL to the servlet or a fully qualified servlet class that will be instantiated to generate the image.

Specified by:
setValue in interface IlvDHTMLHelper
Overrides:
setValue in class UIGraphic
Parameters:
value - The image generating servlet.

setWaitingImage

public void setWaitingImage(String waitingImage)
Sets the path of the image displayed when the view loads the image.

Specified by:
setWaitingImage in interface IlvDHTMLHelper
Parameters:
waitingImage - The path of the image displayed when the view loads the image.

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.

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

getView

public IlvManagerView getView()
                       throws Exception
Returns the manager view that will be displayed by the view.

Specified by:
getView in interface IlvFacesDHTMLViewSupport
Overrides:
getView in class IlvFacesView
Returns:
The manager view.
Throws:
Exception

getDiagrammer

public IlvDiagrammer getDiagrammer()
                            throws Exception
Returns the IlvDiagrammer instance wrapped by this IlvFacesDiagrammer instance.

Overrides:
getDiagrammer in class IlvFacesDiagrammerView
Returns:
The IlvDiagrammer instance.
Throws:
Exception - If the session has expired between two requests the IlvDiagrammer instance was lost.

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 ctx)
This method 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 IlvFacesDiagrammerView
Parameters:
ctx - The current faces context.

saveState

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

Specified by:
saveState in interface IlvFacesComponent
Specified by:
saveState in interface IlvDHTMLHelper
Specified by:
saveState in interface StateHolder
Overrides:
saveState in class IlvFacesDiagrammerView
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 stateObj parameter.

Specified by:
restoreState in interface IlvFacesComponent
Specified by:
restoreState in interface IlvDHTMLHelper
Specified by:
restoreState in interface StateHolder
Overrides:
restoreState in class IlvFacesDiagrammerView
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.