ilog.tgo.faces.equipment.dhtml.component
Class IltFacesDHTMLEquipmentView

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.tgo.faces.graph.component.IltFacesGraphView
                          extended by ilog.tgo.faces.equipment.component.IltFacesEquipmentView
                              extended by ilog.tgo.faces.equipment.dhtml.component.IltFacesDHTMLEquipmentView
All Implemented Interfaces:
IltFacesJTGOConstants, IlvFacesComponent, IlvDHTMLHelper, IlvFacesDHTMLViewSupport, IlvDHTMLConstants, IlvDHTMLFrameworkConstants, IlvFacesConstants, IlvFrameworkConstants, Serializable, StateHolder

public class IltFacesDHTMLEquipmentView
extends IltFacesEquipmentView
implements IlvDHTMLFrameworkConstants, IlvFacesDHTMLViewSupport

This class defines the JTGO Equipment Faces component for DHTML rendering.

Since:
JViews 7.5
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ilog.tgo.faces.equipment.component.IltFacesEquipmentView
DefaultConfigurationFileName
 
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 class javax.faces.component.UIComponent
bindings
 
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
 
Fields inherited from interface ilog.tgo.faces.IltFacesJTGOConstants
CONTEXT, DATA_SOURCE, DATA_SOURCE_ID, DEFAULT_STYLE_SHEET, EQUIPMENT, NETWORK, OBJECT_ACTION_MB, PROPERTY_ACCESSOR, STYLE_SHEETS
 
Constructor Summary
IltFacesDHTMLEquipmentView()
          Creates a new IltFacesDHTMLEquipmentView instance.
 
Method Summary
protected  IlpEquipment createEquipmentComponent(String defaultStyleSheet, IlpContext context)
          Method called only once when creating the underlying IlpEquipment.
 Color getBackgroundColor()
          Returns the backgroundColor property.
 String getBeforeSessionExpirationHandler()
          Returns the JavaScript code that will be called when the session is about to expire.
static String getComponentType()
          Returns the component type identifier of this component.
 String getControllerURL()
          Retrieves the controllerURL property.
 IlpEquipment getEquipment()
          Returns the IlpEquipment instance wrapped by this IltFacesEquipmentView instance.
 String getErrorMessage()
          Returns the errorMessage property.
 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()
          Retrieves the imageFormat property.
 IlvImageMapAreaGenerator getImageMapGenerator()
          Returns the image map generator.
 String getImageMapGeneratorClass()
          Returns the image map generator class name.
 String getOnCapabilitiesLoaded()
          Retrieves the onCapabilitiesLoaded property.
 String getOnImageLoaded()
          Retrieves the onImageLoaded property.
 String getServlet()
          Retrieves the servlet property.
 String getServletClass()
          Retrieves the servletClass property.
 String getServletURL()
          Retrieves the servletURL property.
 String getStateURL()
          Retrieves the stateURL property.
 IlvTileManager getTileManager()
          Returns the tile manager.
 int getUpdateInterval()
          Retrieves the updateInterval property.
 IlvManagerView getView()
          Returns the IlvManagerView associated with the IlpEquipmentView.
 String getWaitingImage()
          Retrieves the waitingImage property.
 boolean isGenerateImageMap()
          Returns whether the generateImageMap property is true or false.
 boolean isImageMapVisible()
          Returns whether the imageMapVisible property is true or false.
 boolean isResizable()
          Returns whether the resizable property is true or false.
 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 backgroundColor property.
 void setBeforeSessionExpirationHandler(String handler)
          Sets the JavaScript code that will be called when the session is about to expire.
 void setErrorMessage(String errorMessage)
          Sets the errorMessage property.
 void setGenerateImageMap(boolean generateImageMap)
          Sets the generateImageMap property.
 void setImageFormat(String imageFormat)
          Sets the imageFormat property.
 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 imageMapVisible property.
 void setOnCapabilitiesLoaded(String onCapabilitiesLoaded)
          Sets the onCapabilitiesLoaded property.
 void setOnImageLoaded(String onImageLoaded)
          Sets the onImageLoaded property.
 void setResizable(boolean resizable)
          Sets the resizable property.
 void setServlet(String servlet)
          Sets the servlet property.
 void setServletClass(String servletClass)
          Sets the servletClass property.
 void setServletURL(String servletURL)
          Sets the servletURL property.
 void setStateURL(String clientState)
          Sets the stateURL property.
 void setTileManager(IlvTileManager tileManager)
          Sets the tile manager.
 void setUpdateInterval(int updateInterval)
          Sets the updateInterval property.
 void setValue(Object value)
          Sets the value property.
 void setWaitingImage(String waitingImage)
          Sets the waitingImage property.
 void updateModel(FacesContext context)
          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.tgo.faces.equipment.component.IltFacesEquipmentView
getDefaultStyleSheet, setEquipment
 
Methods inherited from class ilog.tgo.faces.graph.component.IltFacesGraphView
getBoundingBox, getBoundingBox, getContext, getDataSource, getDataSourceId, getDefaultObjectFinder, getGraphView, getProject, getStyleSheets, setContext, setDataSource, setDataSourceId, setDefaultStyleSheet, setProject, setStyleSheets, setView, supportsDynamicLayers
 
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, 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, getValueExpression, setUrl, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltFacesDHTMLEquipmentView

public IltFacesDHTMLEquipmentView()
Creates a new IltFacesDHTMLEquipmentView instance.

Method Detail

getComponentType

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

Returns:
The component type identifier of this component.

getUpdateInterval

public int getUpdateInterval()

Retrieves the updateInterval property.

Specified by:
getUpdateInterval in interface IlvFacesDHTMLViewSupport
Returns:
The update interval.
See Also:
IlvFacesDHTMLViewSupport.getUpdateInterval()

setUpdateInterval

public void setUpdateInterval(int updateInterval)

Sets the updateInterval property.

Specified by:
setUpdateInterval in interface IlvFacesDHTMLViewSupport
Parameters:
updateInterval - The new update interval to set.
See Also:
IlvFacesDHTMLViewSupport.setUpdateInterval(int)

isGenerateImageMap

public boolean isGenerateImageMap()

Returns whether the generateImageMap property is true or false.

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

setGenerateImageMap

public void setGenerateImageMap(boolean generateImageMap)

Sets the generateImageMap property.

Specified by:
setGenerateImageMap in interface IlvFacesDHTMLViewSupport
Parameters:
generateImageMap - The flag value to set.
See Also:
IlvFacesDHTMLViewSupport.setGenerateImageMap(boolean)

isImageMapVisible

public boolean isImageMapVisible()

Returns whether the imageMapVisible property is true or false.

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

setImageMapVisible

public void setImageMapVisible(boolean imageMapVisible)

Sets the imageMapVisible property.

Specified by:
setImageMapVisible in interface IlvFacesDHTMLViewSupport
Parameters:
imageMapVisible - The flag value to set.
See Also:
IlvFacesDHTMLViewSupport.setImageMapVisible(boolean)

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.
See Also:
IlvFacesDHTMLViewSupport.getImageMapGenerator()

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.
See Also:
IlvFacesDHTMLViewSupport.setImageMapGenerator(ilog.views.servlet.IlvImageMapAreaGenerator)

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.
See Also:
IlvFacesDHTMLViewSupport.getImageMapGeneratorClass()

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.
See Also:
IlvFacesDHTMLViewSupport.setImageMapGeneratorClass(java.lang.String)

getBackgroundColor

public Color getBackgroundColor()

Returns the backgroundColor property.

Specified by:
getBackgroundColor in interface IlvFacesDHTMLViewSupport
Returns:
The background color of the view.
See Also:
IlvFacesDHTMLViewSupport.getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(Color backgroundColor)

Sets the backgroundColor property.

Specified by:
setBackgroundColor in interface IlvFacesDHTMLViewSupport
Parameters:
backgroundColor - The background color to set.
See Also:
IlvFacesDHTMLViewSupport.setBackgroundColor(java.awt.Color)

getOnImageLoaded

public String getOnImageLoaded()

Retrieves the onImageLoaded property.

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

setOnImageLoaded

public void setOnImageLoaded(String onImageLoaded)

Sets the onImageLoaded property.

Specified by:
setOnImageLoaded in interface IlvFacesDHTMLViewSupport
Parameters:
onImageLoaded - The new JavaScript function handler.
See Also:
IlvFacesDHTMLViewSupport.setOnImageLoaded(java.lang.String)

getOnCapabilitiesLoaded

public String getOnCapabilitiesLoaded()

Retrieves the onCapabilitiesLoaded property.

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

setOnCapabilitiesLoaded

public void setOnCapabilitiesLoaded(String onCapabilitiesLoaded)

Sets the onCapabilitiesLoaded property.

Specified by:
setOnCapabilitiesLoaded in interface IlvFacesDHTMLViewSupport
Parameters:
onCapabilitiesLoaded - The new JavaScript function handler.
See Also:
IlvFacesDHTMLViewSupport.setOnCapabilitiesLoaded(java.lang.String)

getErrorMessage

public String getErrorMessage()

Returns the errorMessage property.

Specified by:
getErrorMessage in interface IlvFacesDHTMLViewSupport
Returns:
The message when an error occurred.
See Also:
IlvFacesDHTMLViewSupport.getErrorMessage()

setErrorMessage

public void setErrorMessage(String errorMessage)

Sets the errorMessage property.

Specified by:
setErrorMessage in interface IlvFacesDHTMLViewSupport
Parameters:
errorMessage - The new error message to set.
See Also:
IlvFacesDHTMLViewSupport.setErrorMessage(java.lang.String)

getStateURL

public String getStateURL()

Retrieves the stateURL property.

Specified by:
getStateURL in interface IlvFacesDHTMLViewSupport
Returns:
The client state of the component.
See Also:
IlvFacesDHTMLViewSupport.getStateURL()

setStateURL

public void setStateURL(String clientState)

Sets the stateURL property.

Specified by:
setStateURL in interface IlvFacesDHTMLViewSupport
Parameters:
clientState - The client state of the component.
See Also:
IlvFacesDHTMLViewSupport.setStateURL(java.lang.String)

isResizable

public boolean isResizable()

Returns whether the resizable property is true or false.

Specified by:
isResizable in interface IlvFacesDHTMLViewSupport
Returns:
The resizable flag.
See Also:
IlvFacesDHTMLViewSupport.isResizable()

setResizable

public void setResizable(boolean resizable)

Sets the resizable property.

Specified by:
setResizable in interface IlvFacesDHTMLViewSupport
Parameters:
resizable - The resizable flag to set.
See Also:
IlvFacesDHTMLViewSupport.setResizable(boolean)

getView

public IlvManagerView getView()
                       throws Exception

Returns the IlvManagerView associated with the IlpEquipmentView.

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

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.

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.

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

setServlet

public void setServlet(String servlet)

Sets the servlet property.

Specified by:
setServlet in interface IlvDHTMLHelper
Parameters:
servlet - The image generating servlet.
See Also:
IlvDHTMLHelper.setServlet(java.lang.String)

getServlet

public String getServlet()

Retrieves the servlet property.

Specified by:
getServlet in interface IlvDHTMLHelper
Returns:
The image generating servlet.
See Also:
IlvDHTMLHelper.getServlet()

setServletClass

public void setServletClass(String servletClass)

Sets the servletClass property.

Specified by:
setServletClass in interface IlvDHTMLHelper
See Also:
IlvDHTMLHelper.setServletClass(java.lang.String)

getServletClass

public String getServletClass()

Retrieves the servletClass property.

Specified by:
getServletClass in interface IlvDHTMLHelper
See Also:
IlvDHTMLHelper.getServletClass()

setServletURL

public void setServletURL(String servletURL)

Sets the servletURL property.

Specified by:
setServletURL in interface IlvDHTMLHelper
See Also:
IlvDHTMLHelper.setServletURL(java.lang.String)

getServletURL

public String getServletURL()

Retrieves the servletURL property.

Specified by:
getServletURL in interface IlvDHTMLHelper
See Also:
IlvDHTMLHelper.getServletURL()

getImageFormat

public String getImageFormat()

Retrieves the imageFormat property.

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

getWaitingImage

public String getWaitingImage()

Retrieves the waitingImage property.

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

setImageFormat

public void setImageFormat(String imageFormat)

Sets the imageFormat property.

Specified by:
setImageFormat in interface IlvDHTMLHelper
Parameters:
imageFormat - The desired image format of the image displayed by the view.
See Also:
IlvDHTMLHelper.setImageFormat(java.lang.String)

setWaitingImage

public void setWaitingImage(String waitingImage)

Sets the waitingImage property.

Specified by:
setWaitingImage in interface IlvDHTMLHelper
Parameters:
waitingImage - The path of the image displayed when the view loads the image.
See Also:
IlvDHTMLHelper.setWaitingImage(java.lang.String)

getControllerURL

public String getControllerURL()
                        throws Exception

Retrieves the controllerURL property.

Throws:
Exception
See Also:
IlvDHTMLUtil.getControllerURL()

createEquipmentComponent

protected IlpEquipment createEquipmentComponent(String defaultStyleSheet,
                                                IlpContext context)

Method called only once when creating the underlying IlpEquipment.

Specified by:
createEquipmentComponent in class IltFacesEquipmentView
Parameters:
defaultStyleSheet - The default CSS style sheet to be applied.
context - The ILOG JTGO context to be used.
Returns:
The newly created IlpEquipment.

getEquipment

public IlpEquipment getEquipment()
                          throws Exception

Returns the IlpEquipment instance wrapped by this IltFacesEquipmentView instance.

Overrides:
getEquipment in class IltFacesEquipmentView
Returns:
The IlpEquipment instance.
Throws:
Exception - If the session has expired between two requests and the IlpEquipment instance was lost.

updateModel

public void updateModel(FacesContext context)
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 IltFacesGraphView
Parameters:
context - 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 IltFacesGraphView
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 IltFacesGraphView
Parameters:
context - The current faces context.
stateObj - The previously saved state of this component.

setValue

public void setValue(Object value)

Sets the value property.

Specified by:
setValue in interface IlvDHTMLHelper
Overrides:
setValue in class UIGraphic
Parameters:
value - The image generating servlet.
See Also:
UIGraphic.setValue(java.lang.Object)

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 IltFacesEquipmentView
Returns:
The family to which this component belongs.


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