public class IlvJScrollGanttSheet extends JComponent implements IlvTimeScrollable, IlvVerticalScrollable
IlvJScrollGanttSheet
is a user interface component
that consists of an IlvGanttTimeScale
positioned above an
IlvGanttSheet
. By default, an IlvTimeScrollBar
is
placed along the bottom and a vertical scroll bar is placed against the
right margin.
The IlvJScrollGanttSheet
class implements both the
IlvTimeScrollable
and IlvVerticalScrollable
interfaces.
A Gantt configuration
is used to
coordinate the horizontal scrolling of the time scale, the Gantt sheet,
and the time scroll bar and the vertical scrolling of the Gantt sheet
and the vertical scroll bar. The Gantt configuration can be provided
when the sheet is constructed or by calling the
setGanttConfiguration(ilog.views.gantt.IlvGanttConfiguration)
method. However, it is important
to note that the scrollable APIs cannot be used until the
sheet is provided with a configuration.
Two horizontal time scrolling modes are supported:
minimum visible time
and the
maximum visible time
. Both values must be
valid and non-null.
In bounded scrolling mode there are four interrelated time properties: minVisibleTime, maxVisibleTime, visibleTime, and visibleDuration. These four values define two nested ranges like this:
minVisibleTime <= visibleTime <= visibleTime + visibleDuration <= maxVisibleTime
The sheet enforces this relationship by correcting or trimming properties in the following way:
setMinVisibleTime(java.util.Date)
and setMaxVisibleTime(java.util.Date)
methods first validate that:
minVisibleTime <= maxVisibleTime
If not, an IllegalArgumentException
is thrown.
setVisibleTime(java.util.Date)
and setVisibleDuration(ilog.views.gantt.IlvDuration)
methods trim their argument to fit within the limits defined by the
other three properties. For example, if
maxVisibleTime.equals(visibleTime.add(IlvDuration.ONE_DAY))
,
then setVisibleDuration(IlvDuration.ONE_WEEK)
would
change the duration to IlvDuration.ONE_DAY
.
The sheet uses the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method to
perform consistent validation and trimming of the time value arguments.
minimum visible time
and the
maximum visible time
are undefined and are
set to null
.
Even in unbounded scrolling mode, there is an inherent limitation on the
minimum
and maximum
times that can be
scrolled to. As in bounded scrolling mode, this is enforced by having
the sheet use the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method to
perform validation and trimming of the time value arguments.
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static int |
HORIZONTAL
Horizontal orientation.
|
static int |
VERTICAL
Vertical orientation.
|
static int |
VERTICAL_SCROLLBAR_ALWAYS
The vertical scroll bar will always be displayed.
|
static int |
VERTICAL_SCROLLBAR_AS_NEEDED
The vertical scroll bar will be displayed as needed.
|
static int |
VERTICAL_SCROLLBAR_NEVER
The vertical scroll bar will never be displayed.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DEFAULT_MINIMUM_DURATION
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvJScrollGanttSheet()
Creates an
IlvJScrollGanttSheet with a default
Gantt sheet ,
time scale , and
horizontal time scroll bar . |
IlvJScrollGanttSheet(IlvGanttConfiguration ganttConfig)
Creates an
IlvJScrollGanttSheet with a default
Gantt sheet ,
time scale , and
horizontal time scroll bar . |
IlvJScrollGanttSheet(IlvGanttConfiguration ganttConfig,
IlvGanttSheet sheet,
IlvTimeScale timeScale,
IlvTimeScrollBar scrollbar)
Creates an
IlvJScrollGanttSheet component that is
composed of the specified Gantt sheet, time scale, and horizontal time
scroll bar. |
IlvJScrollGanttSheet(IlvGanttSheet sheet,
IlvTimeScale timeScale,
IlvTimeScrollBar scrollbar)
Creates an
IlvJScrollGanttSheet component that is
composed of the specified Gantt sheet, time scale, and horizontal time
scroll bar. |
Modifier and Type | Method and Description |
---|---|
void |
addTimeScrollListener(TimeScrollListener listener)
Adds the specified listener to receive time scroll events from this
sheet.
|
void |
addVerticalScrollListener(VerticalScrollListener listener)
Adds the specified listener to receive vertical scroll events from
this scrolling Gantt sheet.
|
protected void |
baseTextDirectionChanged()
This method is invoked when the effective base text direction has changed.
|
protected IlvGanttSheet |
createDefaultGanttSheet()
Creates a default Gantt sheet to place in the center of this
component.
|
protected IlvTimeScale |
createDefaultTimeScale()
Creates a default time scale to place along the top of this component.
|
protected IlvTimeScrollBar |
createDefaultTimeScrollBar()
Creates a default horizontal time scroll bar to place along the top of
this component.
|
void |
doLayout()
Performs the Gantt sheet layout.
|
int |
getBaseTextDirection()
Returns the base text direction for this scrollable Gantt sheet.
|
IlvGanttSheet |
getGanttSheet()
Returns the child Gantt sheet component.
|
int |
getMaxVerticalPosition()
Returns the maximum vertical position that the scrolling Gantt sheet
can display.
|
Date |
getMaxVisibleTime()
Returns the maximum time that the sheet can show in bounded
scrolling mode.
|
IlvDuration |
getMinVisibleDuration()
Returns the minimum duration that the sheet can show.
|
Date |
getMinVisibleTime()
Returns the minimum time that the sheet can show in bounded
scrolling mode.
|
int |
getMouseWheelPreferredOrientation()
Returns the preferred orientation of scrolling by the mouse wheel, either
VERTICAL or HORIZONTAL . |
int |
getResolvedBaseTextDirection()
Returns the resolved base text direction.
|
IlvTimeScale |
getTimeScale()
Returns the time scale that is displayed along the top of the Gantt sheet.
|
IlvTimeScrollBar |
getTimeScrollBar()
Returns the horizontal time scroll bar.
|
int |
getVerticalExtent()
Returns the extent of the vertical range displayed by the scrolling
Gantt sheet.
|
int |
getVerticalPosition()
Returns the beginning of the vertical range displayed by the scrolling
Gantt sheet.
|
IlvVerticalScrollBar |
getVerticalScrollBar()
Returns the vertical scroll bar.
|
int |
getVerticalScrollBarPolicy()
Returns the vertical scroll bar policy, which will be one of the
values:
VERTICAL_SCROLLBAR_AS_NEEDED ,
VERTICAL_SCROLLBAR_NEVER , or
VERTICAL_SCROLLBAR_ALWAYS . |
IlvDuration |
getVisibleDuration()
Returns the duration of the time interval displayed by the sheet.
|
IlvTimeInterval |
getVisibleInterval()
Returns the time interval displayed by the sheet.
|
Date |
getVisibleTime()
Returns the beginning of the time interval displayed by the sheet.
|
boolean |
isMouseWheelEnabled()
Indicates whether or not scrolling and zooming will take place in
response to movement of the mouse wheel.
|
boolean |
isTimeScrollBarVisible()
Returns the visibility status of the time scroll bar.
|
void |
processManagerViewKeyEvent(KeyEvent event)
This method is invoked by this Swing container's
IlvManagerView for any keystrokes that have not
been consumed by the view's interactor or registered key listeners. |
void |
removeTimeScrollListener(TimeScrollListener listener)
Removes the specified listener so that it will no longer receive time
scroll events from this sheet.
|
void |
removeVerticalScrollListener(VerticalScrollListener listener)
Removes the specified listener so that it will no longer receive
vertical scroll events from this scrolling Gantt sheet.
|
void |
setBaseTextDirection(int btd)
Sets the base text direction for this scrollable Gantt sheet.
|
void |
setGanttConfiguration(IlvGanttConfiguration ganttConfig)
Sets the Gantt configuration that will coordinate horizontal time
scrolling, vertical scrolling, row visibility, and centralized event
routing.
|
void |
setMaxVerticalPosition(int max)
Sets the maximum position that the scrolling Gantt sheet can display.
|
void |
setMaxVisibleTime(Date max)
Sets the maximum time that the sheet can show in bounded
scrolling mode.
|
void |
setMinVisibleDuration(IlvDuration duration)
Sets the minimum duration that the sheet can show.
|
void |
setMinVisibleTime(Date min)
Sets the minimum time that the sheet can show in bounded
scrolling mode.
|
void |
setMouseWheelEnabled(boolean handleWheel)
Enables/disables scrolling and zooming in response to movement of the
mouse wheel.
|
void |
setMouseWheelPreferredOrientation(int orientation)
Sets the preferred orientation of scrolling by the mouse wheel, either
VERTICAL or HORIZONTAL . |
void |
setTimeScale(IlvTimeScale timeScale)
Sets the time scale that is displayed along the top of the Gantt
sheet.
|
void |
setTimeScrollBar(IlvTimeScrollBar scrollbar)
Sets the horizontal time scroll bar.
|
void |
setTimeScrollBarVisible(boolean visible)
Sets the visibility status of the time scroll bar.
|
void |
setVerticalExtent(int extent)
Sets the extent of the vertical range displayed by the scrolling Gantt
sheet.
|
void |
setVerticalPosition(int position)
Sets the beginning of the vertical range displayed by the scrolling
Gantt sheet.
|
void |
setVerticalScrollBar(IlvVerticalScrollBar scrollbar)
Sets the vertical scroll bar.
|
void |
setVerticalScrollBar(JScrollBar scrollbar)
Deprecated.
Beginning with Perforce JViews 7.5 use the
setVerticalScrollBar(IlvVerticalScrollBar) method instead. |
void |
setVerticalScrollBarPolicy(int policy)
Sets the vertical scroll bar policy.
|
void |
setVisibleDuration(IlvDuration duration)
Sets the duration of the time interval displayed by the sheet.
|
void |
setVisibleInterval(Date time,
IlvDuration duration)
Sets the time interval displayed by the sheet.
|
void |
setVisibleTime(Date time)
Sets the beginning of the time interval displayed by the sheet.
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int VERTICAL_SCROLLBAR_AS_NEEDED
public static final int VERTICAL_SCROLLBAR_NEVER
public static final int VERTICAL_SCROLLBAR_ALWAYS
public static final int HORIZONTAL
public static final int VERTICAL
public IlvJScrollGanttSheet()
IlvJScrollGanttSheet
with a default
Gantt sheet
,
time scale
, and
horizontal time scroll bar
. The
child components will not be coordinated until a Gantt configuration
is set by calling the setGanttConfiguration(ilog.views.gantt.IlvGanttConfiguration)
method.public IlvJScrollGanttSheet(IlvGanttSheet sheet, IlvTimeScale timeScale, IlvTimeScrollBar scrollbar)
IlvJScrollGanttSheet
component that is
composed of the specified Gantt sheet, time scale, and horizontal time
scroll bar. The child components will not be coordinated until a Gantt
configuration is set by calling the setGanttConfiguration(ilog.views.gantt.IlvGanttConfiguration)
method.sheet
- The Gantt sheet. If null
, a default sheet
will be created by calling createDefaultGanttSheet()
.timeScale
- The time scale. If null
, a default
time scale will be created by calling
createDefaultTimeScale()
.scrollbar
- The time scroll bar. If null
, a
default scroll bar will be created by calling
createDefaultTimeScrollBar()
.public IlvJScrollGanttSheet(IlvGanttConfiguration ganttConfig)
IlvJScrollGanttSheet
with a default
Gantt sheet
,
time scale
, and
horizontal time scroll bar
. The
internal components will be coordinated by the specified Gantt
configuration.ganttConfig
- The Gantt configuration.public IlvJScrollGanttSheet(IlvGanttConfiguration ganttConfig, IlvGanttSheet sheet, IlvTimeScale timeScale, IlvTimeScrollBar scrollbar)
IlvJScrollGanttSheet
component that is
composed of the specified Gantt sheet, time scale, and horizontal time
scroll bar. The internal components will be coordinated by the
specified Gantt configuration.ganttConfig
- The Gantt configuration.sheet
- The Gantt sheet. If null
, a default sheet
will be created by calling createDefaultGanttSheet()
.timeScale
- The time scale. If null
, a default
time scale will be created by calling
createDefaultTimeScale()
.scrollbar
- The time scroll bar. If null
, a
default scroll bar will be created by calling
createDefaultTimeScrollBar()
.protected IlvGanttSheet createDefaultGanttSheet()
protected IlvTimeScale createDefaultTimeScale()
protected IlvTimeScrollBar createDefaultTimeScrollBar()
public void setGanttConfiguration(IlvGanttConfiguration ganttConfig)
ganttConfig
- The Gantt configuration.public IlvVerticalScrollBar getVerticalScrollBar()
setVerticalScrollBar(IlvVerticalScrollBar)
@Deprecated public void setVerticalScrollBar(JScrollBar scrollbar)
setVerticalScrollBar(IlvVerticalScrollBar)
method instead.scrollbar
- The vertical scroll bar, which must be an instance of
IlvVerticalScrollBar
.public void setVerticalScrollBar(IlvVerticalScrollBar scrollbar)
scrollbar
- The vertical scroll bar.getVerticalScrollBar()
public int getVerticalScrollBarPolicy()
VERTICAL_SCROLLBAR_AS_NEEDED
,
VERTICAL_SCROLLBAR_NEVER
, or
VERTICAL_SCROLLBAR_ALWAYS
.setVerticalScrollBarPolicy(int)
public void setVerticalScrollBarPolicy(int policy)
policy
- The new scroll bar policy. Must be one of the following
constants: VERTICAL_SCROLLBAR_AS_NEEDED
,
VERTICAL_SCROLLBAR_NEVER
, or
VERTICAL_SCROLLBAR_ALWAYS
.setVerticalScrollBarPolicy(int)
public IlvTimeScrollBar getTimeScrollBar()
public void setTimeScrollBar(IlvTimeScrollBar scrollbar)
scrollbar
- The time scroll bar.public boolean isTimeScrollBarVisible()
public void setTimeScrollBarVisible(boolean visible)
visible
- true
to make the time scroll bar visible, or
false
to make it invisible.public IlvTimeScale getTimeScale()
public void setTimeScale(IlvTimeScale timeScale)
constantZoomFactorOnWidthChange
property of the time scale is set to
match that of the
Gantt sheet.timeScale
- The time scale.public IlvGanttSheet getGanttSheet()
public void doLayout()
public void processManagerViewKeyEvent(KeyEvent event)
IlvManagerView
for any keystrokes that have not
been consumed by the view's interactor or registered key listeners.
This container simply invokes its own processKeyEvent
method so that the keystrokes are routed up the Swing container
hierarchy and any registered keyboard actions and/or menu accelerators
are properly handled.event
- The keyboard event.public Date getMinVisibleTime()
getMinVisibleTime
in interface IlvTimeScrollable
null
if the sheet
is in unbounded scrolling mode.setMinVisibleTime(java.util.Date)
public void setMinVisibleTime(Date min)
time
and
duration
are trimmed to fit the new
min-max interval by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A
minVisibleTimeChanged
event
is then fired to all registered
listeners
. If min > maxVisibleTime
an
IllegalArgumentException
will be thrown.setMinVisibleTime
in interface IlvTimeScrollable
min
- The minimum visible time or null
to set the
sheet to unbounded scrolling mode.getMinVisibleTime()
public Date getMaxVisibleTime()
getMaxVisibleTime
in interface IlvTimeScrollable
null
if the sheet
is in unbounded scrolling mode.setMaxVisibleTime(java.util.Date)
public void setMaxVisibleTime(Date max)
time
and
duration
are trimmed to fit the new
min-max interval by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A
maxVisibleTimeChanged
event
is then fired to all registered
listeners
. If max < minVisibleTime
an
IllegalArgumentException
will be thrown.setMaxVisibleTime
in interface IlvTimeScrollable
max
- The maximum visible time or null
to set the
sheet to unbounded scrolling mode.getMaxVisibleTime()
public IlvDuration getMinVisibleDuration()
getMinVisibleDuration
in interface IlvTimeScrollable
setMinVisibleDuration(ilog.views.gantt.IlvDuration)
public void setMinVisibleDuration(IlvDuration duration)
minVisibleDurationChanged event
is fired to all
registered listeners
.setMinVisibleDuration
in interface IlvTimeScrollable
duration
- The minimum visible duration.getMinVisibleDuration()
public Date getVisibleTime()
getVisibleTime
in interface IlvTimeScrollable
setVisibleTime(java.util.Date)
public void setVisibleTime(Date time)
min
and max
visible times and is trimmed
if necessary by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A VisibleTimeChangedEvent
is
then fired to all registered listeners
.
If you are changing both the visible time and duration, it is
preferable to use the setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)
method instead.setVisibleTime
in interface IlvTimeScrollable
time
- The new time value.getVisibleTime()
public IlvDuration getVisibleDuration()
getVisibleDuration
in interface IlvTimeScrollable
setVisibleDuration(ilog.views.gantt.IlvDuration)
public void setVisibleDuration(IlvDuration duration)
min
and max
visible times and is trimmed
if necessary by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. A VisibleDurationChangedEvent
is then fired to all
registered listeners
. If you are
changing both the visible time and duration, it is preferable to use
the setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)
method instead.setVisibleDuration
in interface IlvTimeScrollable
duration
- The new duration value.getVisibleDuration()
public IlvTimeInterval getVisibleInterval()
getVisibleInterval
in interface IlvTimeScrollable
setVisibleInterval(java.util.Date, ilog.views.gantt.IlvDuration)
public void setVisibleInterval(Date time, IlvDuration duration)
min
and
max
visible times and is trimmed if
necessary by calling the IlvTimeScrollUtil.trimInterval(ilog.views.gantt.IlvTimeInterval, java.util.Date, java.util.Date, ilog.views.gantt.IlvDuration)
method. This method then fires an adjusting
VisibleTimeChangedEvent
followed by a
VisibleDurationChangedEvent
to all
registered listeners
.setVisibleInterval
in interface IlvTimeScrollable
time
- The new time value.duration
- The new duration value.public void addTimeScrollListener(TimeScrollListener listener)
addTimeScrollListener
in interface IlvTimeScrollable
listener
- The listener that will be subscribed to subsequent
time scroll events.removeTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)
public void removeTimeScrollListener(TimeScrollListener listener)
removeTimeScrollListener
in interface IlvTimeScrollable
listener
- The listener that will be unsubscribed from receiving
time scroll events.addTimeScrollListener(ilog.views.gantt.event.TimeScrollListener)
public int getMaxVerticalPosition()
getMaxVerticalPosition
in interface IlvVerticalScrollable
setMaxVerticalPosition(int)
public void setMaxVerticalPosition(int max)
setMaxVerticalPosition
in interface IlvVerticalScrollable
max
- The maximum vertical position.getMaxVerticalPosition()
public int getVerticalPosition()
getVerticalPosition
in interface IlvVerticalScrollable
setVerticalPosition(int)
public void setVerticalPosition(int position)
max
displayable value and is trimmed
if necessary. A verticalPositionChanged event
is then fired to all
registered listeners
.setVerticalPosition
in interface IlvVerticalScrollable
position
- The new vertical position.getVerticalPosition()
public int getVerticalExtent()
getVerticalExtent
in interface IlvVerticalScrollable
setVerticalExtent(int)
public void setVerticalExtent(int extent)
layout algorithm
to arrange and position all of the
child components.setVerticalExtent
in interface IlvVerticalScrollable
extent
- The new vertical extent.getVerticalExtent()
public void addVerticalScrollListener(VerticalScrollListener listener)
addVerticalScrollListener
in interface IlvVerticalScrollable
listener
- The listener that will be subscribed to subsequent
scroll events.removeVerticalScrollListener(ilog.views.gantt.event.VerticalScrollListener)
public void removeVerticalScrollListener(VerticalScrollListener listener)
removeVerticalScrollListener
in interface IlvVerticalScrollable
listener
- The listener that will be unsubscribed from receiving
vertical scroll events.addVerticalScrollListener(ilog.views.gantt.event.VerticalScrollListener)
public boolean isMouseWheelEnabled()
setMouseWheelEnabled(boolean)
public void setMouseWheelEnabled(boolean handleWheel)
handleWheel
- true
if scrolling should be done
automatically for a MouseWheelEvent, and zooming should be
performed on CTRL+MouseWheelEvent false
otherwise.isMouseWheelEnabled()
public int getMouseWheelPreferredOrientation()
VERTICAL
or HORIZONTAL
. If scrolling in the preferred orientation
is disabled or the user presses the SHIFT key while using the mouse wheel, then
scrolling will occur along the opposite axis. The default value is VERTICAL
.VERTICAL
or HORIZONTAL
.setMouseWheelPreferredOrientation(int)
public void setMouseWheelPreferredOrientation(int orientation)
VERTICAL
or HORIZONTAL
. If scrolling in the preferred orientation
is disabled or the user presses the SHIFT key while using the mouse wheel, then
scrolling will occur along the opposite axis.orientation
- The preferred scrolling orientation, which must be
VERTICAL
or HORIZONTAL
.getMouseWheelPreferredOrientation()
public final int getBaseTextDirection()
The base text direction influences the display of text strings that are composed of segments that are read from left to right as well as of segments that are read from right to left. It determines the order of these segments.
IlvBidiUtil.COMPONENT_DIRECTION
,
IlvBidiUtil.CONTEXTUAL_DIRECTION
,
IlvBidiUtil.LEFT_TO_RIGHT
,
IlvBidiUtil.RIGHT_TO_LEFT
,
IlvBidiUtil.INHERITED_DIRECTION
.setBaseTextDirection(int)
,
getResolvedBaseTextDirection()
public void setBaseTextDirection(int btd)
The base text direction influences the display of text strings that are composed of segments that are read from left to right as well as of segments that are read from right to left. It determines the order of these segments.
Possible values are:
IlvBidiUtil.COMPONENT_DIRECTION
,
IlvBidiUtil.CONTEXTUAL_DIRECTION
,
IlvBidiUtil.LEFT_TO_RIGHT
, IlvBidiUtil.RIGHT_TO_LEFT
,
and IlvBidiUtil.INHERITED_DIRECTION
.
The base text direction affects, in particular:
btd
- The base text direction.getBaseTextDirection()
public int getResolvedBaseTextDirection()
The base text direction influences the display of text strings that are composed of segments that are read from left to right as well as of segments that are read from right to left. It determines the order of these segments.
This method is based on getBaseTextDirection()
but determines
the value when it is inherited from a parent component
(IlvBidiUtil.INHERITED_DIRECTION
) or dependent on
the component orientation (IlvBidiUtil.COMPONENT_DIRECTION
).
IlvBidiUtil.CONTEXTUAL_DIRECTION
,
IlvBidiUtil.LEFT_TO_RIGHT
,
IlvBidiUtil.RIGHT_TO_LEFT
.protected void baseTextDirectionChanged()
getResolvedBaseTextDirection()
has
changed, orgetComponentOrientation()
has changed
and the value of getResolvedBaseTextDirection()
is
IlvBidiUtil.CONTEXTUAL_DIRECTION
.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.