Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvGanttComponentView

IlvObject
   |
   +--IlvEmptyView
      |
      +--IlvResizableView
         |
         +--IlvAbstractView
            |
            +--IlvGanttComponentView

Category:
Gantt Chart component
JavaScript File:
IlvGanttView.js
Description:
An IlvGanttComponentView is the abstract base class of the DHTML components that display an image of a Gantt chart subcomponent. The image is obtained from an IlvGanttServlet running on the server. You must call the setServletURL() method to set the URL of the servlet. The class IlvInteractor allows you to implement some interaction on the view.

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvGanttComponentView(comp, left, top, width, height, reload, namespace)
Method Summary
Method Attributes Method Name and Description
 
Adds a listener to be called when the capabilities have been loaded.
 
addErrorListener(listener)
Adds a listener to be called when an error occurs during the current request to the server.
 
Adds a listener to be called when the view has begun loading a new image.
 
Adds a listener to be called when the view has loaded a new image.
 
Adds a listener to be called when the view has loaded a new image, but before the new image is made visible.
 
Adds a listener to be called when an interactor has changed on the view.
 
Adds a listener to be called when a timeout has occurred during the current request to the server.
 
Adds a listener to be called when the image has scrolled vertically.
 
childrenToHTML(parentNode)
Creates the HTML for this component's children.
 
Creates the HTTP request for capabilities.
 
createImageRequestURL(imageWidth, imageHeight)
Creates the URL for the image request.
 
Disposes of all resources being used by the view.
 
Returns a time stamp parameter for the requests.
 
Returns whether new images will be revealed by fading the previous image.
 
Queries the server for the capabilities.
 
getDateParam(name, date)
Returns a date parameter for the requests.
 
Returns the IlvGanttView that is the parent of this view.
 
Returns the image format used by the server to render this view's contents.
 
Returns the scroll position of this view's image on the client side.
 
Returns the maximum vertical scroll position.
 
Returns the message panel where the messages will be displayed
 
Returns the pop-up menu on set this view.
 
Returns the URL of the servlet as set using setServletURL.
 
Returns an array of the siblings of this view, or null if this view has no siblings.
 
Returns the timeout interval for requests to the server, in seconds.
 
Returns whether the view should request a new image from the server based upon the resize that has just occurred.
 
Returns the automatic update interval of the view, in seconds.
 
Returns the vertical scroll position of the image.
 
Returns the URL of the image used to show that the component is waiting for a server response.
 
init()
Initializes the view.
 
Returns whether the automatic update will also update the capabilities.
 
Indicates if the capabilities have been loaded from the server.
 
Returns whether an image is loaded in the view.
 
Return the component view is visible or not.
 
keyDown(e)
Handles Key down events
 
Handles Key press events
 
keyUp(e)
Handles Key up events
 
Handles Mouse down events.
 
Handles Mouse drag events.
 
Handles Mouse move events.
 
Handles Mouse out events.
 
Handles Mouse over events.
 
mouseUp(e)
Handles Mouse up events.
 
This method is automatically invoked when the capabilities have been loaded from the server.
 
performAction(actionName, params, udpateAll)
Performs an action on the server side.
 
Reads additional information generated by the capabilities request.
 
Removes a listener installed with addCapabilitiesLoadListener.
 
Removes a listener installed with addErrorListener.
 
Removes a listener installed with addImageLoadListener.
 
Removes a listener installed with addImagePreloadListener.
 
Removes a listener installed with addInteractorListener.
 
Removes a listener installed with addTimeoutErrorListener.
 
When set to true the automatic update will also update the capabilities.
 
Sets whether new images will be revealed by fading the previous image.
 
setChildrenBounds(left, top, width, height)
Changes the size of this view's children.
 
setImageFormat(format)
Sets the image format used by the server to render this view's contents.
 
Sets the scroll position of this view's image on the client side.
 
setMessagePanel(ilvHTMLPanel)
Sets the message panel where the message will be displayed
 
setPopupMenu(popupMenu)
Sets the pop-up menu on this view.
 
setServletURL(servletURL)
Sets the URL of the servlet that the view will send requests to.
 
Sets the timeout interval for requests to the server.
 
Sets the automatic update interval of the view.
 
Queries a new image showing the image scrolled to the specified vertical position.
 
setVisible(visible)
Sets the component view is visible or not.
 
Sets the URL of the image used to show that the component is waiting for a server response.
 
Starts a timer for errors.
 
Starts the update timer.
 
Stops the error timer.
 
Stops the update timer.
 
This method is automatically invoked when a timeout error occurs during a request to the server.
 
Trims the view's current time scroll and vertical scroll values to be within the valid ranges determined by the capabilities.
 
Queries new capabilities and a new image from the server.
 
Queries the server for a new image.
Methods inherited from class IlvAbstractView
getCursor, getGlassView, getHitInfos, getHitInfoTypes, getInteractor, putHitInfoType, setAccessible, setAdditionalParameters, setCursor, setHitmapLayers, setInteractor, setScrollBarSize, setScrollBarState
Methods inherited from class IlvResizableView
getMaximumSize, getMinimumSize, isResizable, setHotkeys, setMaximumSize, setMinimumSize, setResizable, toHTML
Methods inherited from class IlvEmptyView
addSizeListener, getBounds, getHeight, getLeft, getLocation, getSize, getTop, getWidth, isStateInCookie, removeSizeListener, restoreState, saveState, setBounds, setLocation, setSize, setStateInCookie
Methods inherited from class IlvObject
getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvGanttComponentView
IlvGanttComponentView(comp, left, top, width, height, reload, namespace)
Parameters:
comp - The Gantt chart subcomponent to be displayed in the panel. The value must be one of the strings: "chart", "table", or "sheet".
left - The absolute x position of the view on the page.
top - The absolute y position of the view on the page.
width - The width of the view.
height - The height of the view.
reload - An optional Boolean value that specifies whether the view should be initialized from a temporary cookie that persists for the current browser session. When omitted, defaults to false.
namespace - An optional parameter to place the view in a namespace. This is useful when using IlvGanttComponentViews in multiple browser windows or in multiple frames of a frameset and the views must store cookies that should not conflict with each other. In this case, use the namespace to uniquely identify the views that belong to a specific browser window or frameset frame. For example, if you have created a new window with a unique name:

                    open(childPageURL, uniqueWindowName, ...);
                  
you can then use the window name to define the namespace for views within the child page:

                    var view = new IlvGanttComponentView(..., window.name);
                  
Method Detail
addCapabilitiesLoadListener
addCapabilitiesLoadListener(listener)
Adds a listener to be called when the capabilities have been loaded.
Parameters:
listener - The listener function, which must have the following parameter:
  1. view: The IlvGanttComponentView.

addErrorListener
addErrorListener(listener)
Adds a listener to be called when an error occurs during the current request to the server.
Parameters:
listener - The listener function, which must have the following parameter:
  1. view: The IlvGanttComponentView.

addImageLoadingListener
addImageLoadingListener(listener)
Adds a listener to be called when the view has begun loading a new image.
Parameters:
listener - The listener function, which must have the following parameter:
  1. view: The IlvGanttComponentView.

addImageLoadListener
addImageLoadListener(listener)
Adds a listener to be called when the view has loaded a new image.
Parameters:
listener - The listener function, which must have the following parameter:
  1. view: The IlvGanttComponentView.

addImagePreloadListener
addImagePreloadListener(listener)
Adds a listener to be called when the view has loaded a new image, but before the new image is made visible.
Parameters:
listener - The listener function, which must have the following parameter:
  1. view: The IlvGanttComponentView.

addInteractorListener
addInteractorListener(listener)
Adds a listener to be called when an interactor has changed on the view.
Parameters:
listener - The listener function, which must have the following parameters:
  1. view: The IlvGanttComponentView.
  2. oldInteractor: The old interactor (IlvInteractor).
  3. newInteractor: The new interactor (IlvInteractor).

addTimeoutErrorListener
addTimeoutErrorListener(listener)
Adds a listener to be called when a timeout has occurred during the current request to the server.
Parameters:
listener - The listener function, which must have the following parameter:
  1. view: The IlvGanttComponentView.

addVerticalScrollListener
addVerticalScrollListener(listener)
Adds a listener to be called when the image has scrolled vertically.
Parameters:
listener - The listener function, which must have the following parameter:
  1. view: The IlvGanttComponentView.

childrenToHTML
childrenToHTML(parentNode)
Creates the HTML for this component's children. Warning: This method is considered to be part of an IlvGanttComponentView's internal implementation and is not a public API.
Parameters:
parentNode

createCapabilitiesRequestURL
createCapabilitiesRequestURL()
Creates the HTTP request for capabilities.

createImageRequestURL
createImageRequestURL(imageWidth, imageHeight)
Creates the URL for the image request.
Parameters:
imageWidth
imageHeight

dispose
dispose()
Disposes of all resources being used by the view. Make sure to call IlvObject.callDispose() function on the onunload event of the page:
 <body onunload="IlvObject.callDispose()">

getAgainParam
getAgainParam()
Returns a time stamp parameter for the requests. This parameter is not used by the server side. Instead, it can be appended to requests in order to prevent caching by the browser and force the request to be sent to the server.

getBlendTransform
getBlendTransform()
Returns whether new images will be revealed by fading the previous image. The default value is true.

getCapabilities
getCapabilities()
Queries the server for the capabilities. When the capabilities are completely loaded into the view, the onCapabilitiesLoaded method is automatically invoked. The default capabilities sent by the server side are stored as the following instance variables of the view: Refer to the documentation for the IlvGanttServletSupport class for an explanation of the capabilities format sent by the server side.

getDateParam
getDateParam(name, date)
Returns a date parameter for the requests.
Parameters:
name
date

getGanttView
getGanttView()
Returns the IlvGanttView that is the parent of this view. This method returns null if this view has no parent.

getImageFormat
getImageFormat()
Returns the image format used by the server to render this view's contents. The default value is 'JPEG'.

getImageScrollPosition
getImageScrollPosition()
Returns the scroll position of this view's image on the client side. Note: this is very different from the getVerticalPosition or getVisibleInterval methods that return the scroll position of the component on the server side.
Returns:
An object with two properties: x and y.

getMaxVerticalScrollPosition
getMaxVerticalScrollPosition()
Returns the maximum vertical scroll position.

getMessagePanel
getMessagePanel()
Returns the message panel where the messages will be displayed

getPopupMenu
getPopupMenu()
Returns the pop-up menu on set this view.
Since:
JViews 7.5
Returns:
the pop-up menu.

getServletURL
getServletURL()
Returns the URL of the servlet as set using setServletURL.

getSiblingViews
getSiblingViews()
Returns an array of the siblings of this view, or null if this view has no siblings. For example, if this view is an IlvGanttTableView that is a child of an IlvGanttView, this method will return a single element array containing the Gantt view's IlvGanttSheetView child.

getTimeoutErrorInterval
getTimeoutErrorInterval()
Returns the timeout interval for requests to the server, in seconds. The default value is 600 (or 10 minutes).

getUpdateImageOnResize
getUpdateImageOnResize()
Returns whether the view should request a new image from the server based upon the resize that has just occurred.

getUpdateInterval
getUpdateInterval()
Returns the automatic update interval of the view, in seconds. The default value is 0, indicating no updates.

getVerticalScrollPosition
getVerticalScrollPosition()
Returns the vertical scroll position of the image.

getWaitingImage
getWaitingImage()
Returns the URL of the image used to show that the component is waiting for a server response. The default value is the image: IlvConstants.ilvImagePath + "wait.gif", where IlvConstants.ilvImagePath = "script/images/".

init
init()
Initializes the view. This method must be called on the onLoad event of the page containing the view.

isAutoUpdateCapabilities
isAutoUpdateCapabilities()
Returns whether the automatic update will also update the capabilities.

isCapabilitiesLoaded
isCapabilitiesLoaded()
Indicates if the capabilities have been loaded from the server.

isImageLoaded
isImageLoaded()
Returns whether an image is loaded in the view.

isVisible
isVisible()
Return the component view is visible or not.
Since:
JViews 8.8

keyDown
keyDown(e)
Handles Key down events
Parameters:
e - The key event with the following read-only properties:

keyPress
keyPress(e)
Handles Key press events
Parameters:
e - The key event with the following read-only properties:

keyUp
keyUp(e)
Handles Key up events
Parameters:
e - The key event with the following read-only properties:

mouseDown
mouseDown(e)
Handles Mouse down events.
Parameters:
e - The mouse event with the following read-only properties:

mouseDrag
mouseDrag(e)
Handles Mouse drag events.
Parameters:
e - The mouse event with the following read-only properties:

mouseMove
mouseMove(e)
Handles Mouse move events.
Parameters:
e - The mouse event with the following read-only properties:

mouseOut
mouseOut(e)
Handles Mouse out events.
Parameters:
e - The mouse event with the following read-only properties:

mouseOver
mouseOver(e)
Handles Mouse over events.
Parameters:
e - The mouse event with the following read-only properties:

mouseUp
mouseUp(e)
Handles Mouse up events.
Parameters:
e - The mouse event with the following read-only properties:

onCapabilitiesLoaded
onCapabilitiesLoaded(context)
This method is automatically invoked when the capabilities have been loaded from the server. This method stores the default capabilities and then calls the readAdditionalCapabilities method to store any additional information sent by the server. The default capabilities sent by the server side are stored as the following instance variables of the view: Refer to the documentation for the IlvGanttServletSupport class for an explanation of the capabilities format sent by the server side.
Parameters:
context

performAction
performAction(actionName, params, udpateAll)
Performs an action on the server side. This method requests a new image from the server. Optionally, new capabilities can also be requested from the server before the image is retrieved. Additional parameters are sent in the request so that an action can be performed on the server side before the capabilities and image are generated. This allows you to define a new type of interaction on the image. To implement the action on the server side, you must implement the IlvServerAction interface and register the action with an instance of IlvGanttServletSupport. An action is defined by a name and a list of parameters.
Parameters:
actionName - The name of the action.
params - The parameters of the action as an array of strings.
udpateAll - true to update capabilities and the image, false to update only the image.

readAdditionalCapabilities
readAdditionalCapabilities(context)
Reads additional information generated by the capabilities request. This implementation does nothing. Subclasses should override this method to read additional variables generated by the server.
Parameters:
context - The object that contains the JavaScript variables generated by the server.

removeCapabilitiesLoadListener
removeCapabilitiesLoadListener(listener)
Removes a listener installed with addCapabilitiesLoadListener.
Parameters:
listener - The listener to remove.

removeErrorListener
removeErrorListener(listener)
Removes a listener installed with addErrorListener.
Parameters:
listener - The listener to remove.

removeImageLoadListener
removeImageLoadListener(listener)
Removes a listener installed with addImageLoadListener.
Parameters:
listener - The listener to remove.

removeImagePreloadListener
removeImagePreloadListener(listener)
Removes a listener installed with addImagePreloadListener.
Parameters:
listener - The listener to remove.

removeInteractorListener
removeInteractorListener(listener)
Removes a listener installed with addInteractorListener.
Parameters:
listener - The listener to remove.

removeTimeoutErrorListener
removeTimeoutErrorListener(listener)
Removes a listener installed with addTimeoutErrorListener.
Parameters:
listener - The listener to remove.

setAutoUpdateCapabilities
setAutoUpdateCapabilities(set)
When set to true the automatic update will also update the capabilities.
Parameters:
set

setBlendTransform
setBlendTransform(set)
Sets whether new images will be revealed by fading the previous image. The default value is true. This method is available only on Internet Explorer and will be ignored on Netscape Communicator.
Parameters:
set

setChildrenBounds
setChildrenBounds(left, top, width, height)
Changes the size of this view's children. Warning: This method is considered to be part of an IlvGanttComponentView's internal implementation and is not a public API.
Parameters:
left - The absolute x position of the view on the page.
top - The absolute y position of the view on the page.
width - The width of the view.
height - The height of the view.

setImageFormat
setImageFormat(format)
Sets the image format used by the server to render this view's contents.
Parameters:
format - The image format to use. Possible values are: 'JPEG', 'PNG', or any other format that has been registered on the server side with IlvGanttServletSupport.setImageEncoder. The default value is 'JPEG'.

setImageScrollPosition
setImageScrollPosition(x, y)
Sets the scroll position of this view's image on the client side. Note: this is very different from the setVerticalPosition or scrollTo methods that query an image of a scrolled component from the server.
Parameters:
x - The scroll position along the x-axis, relative to the top of the view.
y - The scroll position along the y-axis, relative to the left side of the view.

setMessagePanel
setMessagePanel(ilvHTMLPanel)
Sets the message panel where the message will be displayed
Parameters:
ilvHTMLPanel - An instance of IlvHTMLPanel.

setPopupMenu
setPopupMenu(popupMenu)
Sets the pop-up menu on this view.
Parameters:
popupMenu - the pop-up menu to set.
Since:
JViews 7.5

setServletURL
setServletURL(servletURL)
Sets the URL of the servlet that the view will send requests to.
Parameters:
servletURL

setTimeoutErrorInterval
setTimeoutErrorInterval(interval)
Sets the timeout interval for requests to the server.
Parameters:
interval - The timeout, specified in seconds. The default value is 600 (or 10 minutes).

setUpdateInterval
setUpdateInterval(rate)
Sets the automatic update interval of the view.
Parameters:
rate - The automatic update interval, specified in seconds. The default value of 0 indicates that automatic updates should stop.

setVerticalScrollPosition
setVerticalScrollPosition(y)
Queries a new image showing the image scrolled to the specified vertical position.
Parameters:
y - The vertical scroll position.

setVisible
setVisible(visible)
Sets the component view is visible or not.
Parameters:
visible
Since:
JViews 8.8

setWaitingImage
setWaitingImage(image)
Sets the URL of the image used to show that the component is waiting for a server response. The image may be an animated GIF. The default value is the image: IlvConstants.ilvImagePath + "wait.gif", where IlvConstants.ilvImagePath = "script/images/".
Parameters:
image

startErrorTimer
startErrorTimer()
Starts a timer for errors.

startUpdateTimer
startUpdateTimer()
Starts the update timer.

stopErrorTimer
stopErrorTimer()
Stops the error timer.

stopUpdateTimer
stopUpdateTimer()
Stops the update timer.

timeoutError
timeoutError()
This method is automatically invoked when a timeout error occurs during a request to the server.

trimScrollPosition
trimScrollPosition()
Trims the view's current time scroll and vertical scroll values to be within the valid ranges determined by the capabilities.

updateAll
updateAll()
Queries new capabilities and a new image from the server.

updateImage
updateImage()
Queries the server for a new image.

©Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.