Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvGanttView

IlvObject
   |
   +--IlvEmptyView
      |
      +--IlvResizableView
         |
         +--IlvGanttView

Category:
Gantt Chart component
JavaScript File:
IlvGanttView.js
Description:
An IlvGanttView is a DHTML component that displays an image of a Gantt chart that is obtained from an IlvGanttServlet running on the server. You must call the setServletURL() method to set the URL of the servlet.

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvGanttView(left, top, width, height, reload, namespace)
Method Summary
Method Attributes Method Name and Description
 
childrenToHTML(parentNode)
Creates the HTML for this component's children.
 
Returns the location of the divider as the number of pixels from the left side of the view.
 
Returns the image format that the server will use for responses to this view.
 
Returns the maximum location of the divider.
 
Returns the maximum vertical scroll position.
 
Returns the message panel where the messages will be displayed.
 
Returns the minimum location of the divider.
 
Returns the pop-up menu on set this view.
 
Returns the URL of the servlet as set using setServletURL.
 
Returns the extent of the move when one click on the background of the horizontal scrollbar.
 
Returns this Gantt view's IlvGanttSheetView child view.
 
Returns this Gantt view's IlvGanttTableView child view.
 
Returns the timeout interval for requests to the server, in seconds.
 
Returns the automatic update interval of the view, in seconds.
 
Returns the vertical scroll position of the chart.
 
Returns the current time interval displayed by the sheet.
 
Returns the URL of the image used to show that the component is waiting for a server response.
 
Returns the factor used when calling the zoomIn and zoomOut methods.
 
init()
Initializes the view.
 
Returns whether sheet horizental scrollbar is scrollable.
 
Returns whether sheet vertical scrollbar is scrollable.
 
Removes an additional parameter in both the table view and the sheet view.
 
Resets the timer that will invoke the session expiration handler.
 
scrollTo(startTime, y)
Queries a new image showing the sheet scrolled to the specified position.
 
scrollToDay(date, delta)
Queries a new image showing the specified day.
 
scrollToMonth(date, delta)
Queries a new image showing the specified month.
 
scrollToWeek(date, delta)
Queries a new image showing the specified week.
 
scrollToYear(date, delta)
Queries a new image showing the specified year.
 
setAccessible(accessible)
Set whether this view is accessible or not.
 
Sets the additional parameters on both the table view and the sheet view.
 
setChildrenBounds(left, top, width, height)
Changes the size of this view's children.
 
setDividerLocation(location)
Sets the location of the divider as the number of pixels from the left side of the view.
 
setHotkeys(hotkeys)
 
setImageFormat(format)
Sets the image format that the server will use for responses to this view.
 
setMessagePanel(ilvHTMLPanel)
Sets the message panel where the message will be displayed.
 
setPopupMenu(pop-up)
Sets the pop-up menu on this view.
 
setScrollBarSize(scrollBarSize)
Sets the size of scroll bar.
 
setServletURL(servletURL)
Sets the URL of the servlet that the view will send requests to.
 
Sets a listener that will be called when the HTTP session is about to be invalidated.
 
setSheetHScrollable(scrollable)
Sets sheet view can scroll horizontally by horizon scrollbar or not.
 
Sets the extent of the move when one click on the background of the horizontal scrollbar.
 
setSheetVisible(visible)
Set gantt sheet view to be visible or not.
 
setSheetVScrollable(scrollable)
Sets sheet view can scroll vertically by vertical scrollbar or not.
 
Sets the arrows of splitter of gantt view visible or not, these arrows are used for set table and sheet visible.
 
setTableVisible(visible)
Set gantt table view to be visible or not.
 
Sets the timeout interval for requests to the server.
 
Sets the automatic update interval of the view.
 
Queries a new image showing the chart scrolled to the specified vertical position.
 
setVisibleInterval(startTime, endTime)
Queries a new image showing the specified time interval.
 
Sets the URL of the image used to show that the component is waiting for a server response.
 
setZoomFactor(factor)
Sets the factor used when calling the zoomIn and zoomOut methods.
 
Queries new capabilities and a new images from the server.
 
Queries the server for new images.
 
zoomBy(z)
Zooms the view to a specified factor by querying a new image from the server.
 
zoomIn()
Zooms the view in by querying a new image from the server.
 
Zooms the view out by querying a new image from the server.
 
Zooms the view to fit the data by querying a new image from the server.
Methods inherited from class IlvResizableView
getMaximumSize, getMinimumSize, isResizable, 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
dispose, getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvGanttView
IlvGanttView(left, top, width, height, reload, namespace)
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.
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 IlvGanttViews 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 IlvGanttView(..., window.name);
                  
Method Detail
childrenToHTML
childrenToHTML(parentNode)
Creates the HTML for this component's children. Warning: This method is considered to be part of an IlvGanttView's internal implementation and is not a public API.
Parameters:
parentNode

getDividerLocation
getDividerLocation()
Returns the location of the divider as the number of pixels from the left side of the view.

getImageFormat
getImageFormat()
Returns the image format that the server will use for responses to this view. The default value is 'JPEG'.

getMaxDividerLocation
getMaxDividerLocation()
Returns the maximum location of the divider.

getMaxVerticalScrollPosition
getMaxVerticalScrollPosition()
Returns the maximum vertical scroll position.

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

getMinDividerLocation
getMinDividerLocation()
Returns the minimum location of the divider.

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.

getSheetHScrollBackgroundClickExtent
getSheetHScrollBackgroundClickExtent()
Returns the extent of the move when one click on the background of the horizontal scrollbar.

getSheetView
getSheetView()
Returns this Gantt view's IlvGanttSheetView child view.

getTableView
getTableView()
Returns this Gantt view's IlvGanttTableView child view.

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

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

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

getVisibleInterval
getVisibleInterval()
Returns the current time interval displayed by the sheet. This method returns an object with three properties: start and end are Date values that give the start and end of the time interval. The third property is duration. It is an integer value that gives the interval duration in milliseconds.

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/".

getZoomFactor
getZoomFactor()
Returns the factor used when calling the zoomIn and zoomOut methods.

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

isSheetHScrollable
isSheetHScrollable()
Returns whether sheet horizental scrollbar is scrollable.

isSheetVScrollable
isSheetVScrollable()
Returns whether sheet vertical scrollbar is scrollable.

removeAdditionalParameter
removeAdditionalParameter(key)
Removes an additional parameter in both the table view and the sheet view.
Parameters:
key

resetSessionExpirationTimer
resetSessionExpirationTimer()
Resets the timer that will invoke the session expiration handler.
Since:
JViews 8.1
See also:
#setSessionExpirationHandler

scrollTo
scrollTo(startTime, y)
Queries a new image showing the sheet scrolled to the specified position.
Parameters:
startTime - The visible start time, as a Date.
y - The vertical scroll position.

scrollToDay
scrollToDay(date, delta)
Queries a new image showing the specified day.
Parameters:
date - The Date object that specifies the day to be displayed.
delta - The optional day offset from the specified date.

scrollToMonth
scrollToMonth(date, delta)
Queries a new image showing the specified month.
Parameters:
date - The Date object that specifies the month to be displayed.
delta - The optional month offset from the specified date.

scrollToWeek
scrollToWeek(date, delta)
Queries a new image showing the specified week.
Parameters:
date - The Date object that specifies the week to be displayed.
delta - The optional week offset from the specified date.

scrollToYear
scrollToYear(date, delta)
Queries a new image showing the specified year.
Parameters:
date - The Date object that specifies the year to be displayed.
delta - The optional year offset from the specified date.

setAccessible
setAccessible(accessible)
Set whether this view is accessible or not.
Parameters:
accessible

setAdditionalParameters
setAdditionalParameters(key, value)
Sets the additional parameters on both the table view and the sheet view.
Parameters:
key - The key to set.
value - The value to 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 IlvGanttView'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.

setDividerLocation
setDividerLocation(location)
Sets the location of the divider as the number of pixels from the left side of the view.
Parameters:
location - The location of the divider to set.

setHotkeys
setHotkeys(hotkeys)
Parameters:
hotkeys
Since:
JViews 9.0

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

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

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

setScrollBarSize
setScrollBarSize(scrollBarSize)
Sets the size of scroll bar.
Parameters:
scrollBarSize - An integer bigger than 0 to set the size of scroll bar.
Since:
JViews 8.8

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

setSessionExpirationHandler
setSessionExpirationHandler(handler)
Sets a listener that will be called when the HTTP session is about to be invalidated.

This method works if and only if the session inactivity is reset by a JViews request. If the session inactivity is reset by an external request, the #resetSessionExpirationTimer method must be called.

This method must be called before the capabilities request is made.

Parameters:
handler - The session expiration handler. This must be a function with one parameter: the view.
Since:
JViews 8.1

setSheetHScrollable
setSheetHScrollable(scrollable)
Sets sheet view can scroll horizontally by horizon scrollbar or not.
Parameters:
scrollable - true make the sheet view's horizon scrollbar can scroll, otherwise cannot.
Since:
JViews 8.7

setSheetHScrollBackgroundClickExtent
setSheetHScrollBackgroundClickExtent(extent)
Sets the extent of the move when one click on the background of the horizontal scrollbar.
Parameters:
extent - A strictly positive float which will be used as a multiplier to the sheet visible interval

setSheetVisible
setSheetVisible(visible)
Set gantt sheet view to be visible or not.
Parameters:
visible - true as visible, false as invisible
Since:
JViews 8.8
Returns:
true if change the visible state, false if not change the visible state.

setSheetVScrollable
setSheetVScrollable(scrollable)
Sets sheet view can scroll vertically by vertical scrollbar or not.
Parameters:
scrollable - true make the sheet view's vertical scrollbar can scroll, otherwise cannot.
Since:
JViews 8.7

setSplitterArrowsVisible
setSplitterArrowsVisible(visible)
Sets the arrows of splitter of gantt view visible or not, these arrows are used for set table and sheet visible.
Parameters:
visible - a boolean value to decide whether arrow icons visible or not.
Since:
JViews 8.8

setTableVisible
setTableVisible(visible)
Set gantt table view to be visible or not.
Parameters:
visible - true as visible, false as invisible
Since:
JViews 8.8
Returns:
true if change the visible state, false if not change the visible state.

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 chart scrolled to the specified vertical position.
Parameters:
y - The vertical scroll position.

setVisibleInterval
setVisibleInterval(startTime, endTime)
Queries a new image showing the specified time interval.
Parameters:
startTime - The visible start time, as a Date.
endTime - The visible end time, as a Date.

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

setZoomFactor
setZoomFactor(factor)
Sets the factor used when calling the zoomIn and zoomOut methods. The default value is 1.5.
Parameters:
factor

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

updateImage
updateImage()
Queries the server for new images.

zoomBy
zoomBy(z)
Zooms the view to a specified factor by querying a new image from the server.
Parameters:
z - The zoom factor.

zoomIn
zoomIn()
Zooms the view in by querying a new image from the server.

zoomOut
zoomOut()
Zooms the view out by querying a new image from the server.

zoomToFit
zoomToFit()
Zooms the view to fit the data by querying a new image from the server.

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