ilog.views.awt
Class IlvScrollManagerView

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by ilog.views.awt.IlvScrollManagerView
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class IlvScrollManagerView
extends Panel

A panel containing an IlvManagerView and two scrollbars. The scrollbars help translate the view of the manager.

This component must be used in an AWT Application. Note that if your application is a Swing application you should use the class IlvJScrollManagerView.

See Also:
IlvManagerView, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
IlvScrollManagerView()
          Creates a new IlvScrollManagerView.
IlvScrollManagerView(IlvManager manager, IlvTransformer t)
          Creates a new IlvScrollManagerView.
IlvScrollManagerView(IlvManager manager, IlvTransformer t, Adjustable verticalScrollbar, Adjustable horizontalScrollbar)
          Creates a new IlvScrollManagerView.
IlvScrollManagerView(IlvManagerView view)
          Creates a new IlvScrollManagerView.
IlvScrollManagerView(IlvManagerView view, Adjustable verticalScrollbar, Adjustable horizontalScrollbar)
          Creates a new IlvScrollManagerView.
 
Method Summary
protected  void addImpl(Component comp, Object constraints, int index)
          Adds the specified component to this container at the specified index.
 void addNotify()
          Notifies the Component that it has been added to a container.
 void adjustScrollbars()
          Adjusts the scrollbars so that they reflect the content of the manager.
 void adjustView()
          Translates the view according to the values of the scrollbars.
protected  IlvManagerView createManagerView(IlvManager manager, IlvTransformer t)
          Creates an IlvManagerView for the IlvScrollManagerView.
 void doLayout()
          Performs the layout of the components.
 int getBorderThickness()
          Returns the thickness of the border around the manager view.
 Adjustable getHorizontalAdjustable()
          Returns the horizontal scrollbar.
 Dimension getMaximumSize()
          Returns the maximum size of the component.
 Dimension getMinimumSize()
          Returns the minimum size of the component.
 Dimension getPreferredSize()
          Returns the preferred size of the component.
 Adjustable getVerticalAdjustable()
          Returns the vertical scrollbar.
 IlvManagerView getView()
          Returns the IlvManagerView that is scrolled.
 boolean isDoubleBuffering()
          Returns the double buffering state of the manager view.
 boolean isHorizontalScrollbarVisible()
          Returns true if the horizontal scrollbar is visible.
 boolean isVerticalScrollbarVisible()
          Returns true if the vertical scrollbar is visible.
 boolean isWheelScrollingEnabled()
          Indicates whether or not scrolling will take place in response to movement of the mouse wheel.
 void paint(Graphics g)
          Paints the component.
protected  void processFocusEvent(FocusEvent event)
          Dispatches focus event to the view of the manager.
 void removeNotify()
          Notifies the Component that it has been removed from its container.
 void setBorderThickness(int thickness)
          Changes the thickness of the border around the manager view.
 void setDoubleBuffering(boolean set)
          Sets the manager view in double buffering mode.
 void setHorizontalScrollbarVisible(boolean set)
          Shows or hides the horizontal scrollbar.
 void setVerticalScrollbarVisible(boolean set)
          Shows or hides the vertical scrollbar.
 void setWheelScrollingEnabled(boolean handleWheel)
          Enables/disables scrolling in response to movement of the mouse wheel.
 void update(Graphics dst)
          Updates the view.
 
Methods inherited from class java.awt.Panel
getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvScrollManagerView

public IlvScrollManagerView()
Creates a new IlvScrollManagerView. This method creates an IlvManager and a view of the manager by calling the createManagerView method.


IlvScrollManagerView

public IlvScrollManagerView(IlvManager manager,
                            IlvTransformer t)
Creates a new IlvScrollManagerView. This method creates an IlvManagerView that is added to the manager by calling the createManagerView method.

Parameters:
manager - the manager to scroll.
t - the initial transformer to draw the content of the manager. This is the initial transformer of the IlvManagerView that is created.

IlvScrollManagerView

public IlvScrollManagerView(IlvManager manager,
                            IlvTransformer t,
                            Adjustable verticalScrollbar,
                            Adjustable horizontalScrollbar)
Creates a new IlvScrollManagerView. This method creates an IlvManagerView that is added to the manager by calling the createManagerView method. This constructor also allows you to specify the scrollbars that you want.

Parameters:
manager - the manager to scroll.
t - the initial transformer to draw the content of the manager. This is the initial transformer of the IlvManagerView that is created.
verticalScrollbar - the vertical scrollbar. Note this must be a Component.
horizontalScrollbar - the horizontal scrollbar. Note this must be a Component.
See Also:
createManagerView(ilog.views.IlvManager, ilog.views.IlvTransformer)

IlvScrollManagerView

public IlvScrollManagerView(IlvManagerView view)
Creates a new IlvScrollManagerView.

Parameters:
view - the manager view that is scrolled.

IlvScrollManagerView

public IlvScrollManagerView(IlvManagerView view,
                            Adjustable verticalScrollbar,
                            Adjustable horizontalScrollbar)
Creates a new IlvScrollManagerView. This constructor also allows you to specify the scrollbars that you want. It may be, for example, instances of JFC's JScrollbar.

Parameters:
view - the manager view that is scrolled.
verticalScrollbar - the vertical scrollbar. Note this must be a Component.
horizontalScrollbar - the horizontal scrollbar. Note this must be a Component.
Method Detail

getBorderThickness

public final int getBorderThickness()
Returns the thickness of the border around the manager view. The default value is 2.

See Also:
setBorderThickness(int)

setBorderThickness

public final void setBorderThickness(int thickness)
Changes the thickness of the border around the manager view. The default value is 2.

See Also:
getBorderThickness()

getVerticalAdjustable

public final Adjustable getVerticalAdjustable()
Returns the vertical scrollbar. The default implementation for scrollbars in this class is the java.awt.Scrollbar class, but you can use any type of component that implements the Adjustable interface for the implementation of scrollbars. That is the reason why this method returns a Adjustable that you can cast in Scrollbar.


getHorizontalAdjustable

public final Adjustable getHorizontalAdjustable()
Returns the horizontal scrollbar. The default implementation for scrollbars in this class is the java.awt.Scrollbar class, but you can use any type of component that implements the Adjustable interface for the implementation of scrollbars. That is the reason why this method returns a Adjustable that you can cast in Scrollbar.


createManagerView

protected IlvManagerView createManagerView(IlvManager manager,
                                           IlvTransformer t)
Creates an IlvManagerView for the IlvScrollManagerView. This method is called by the constructor to create the IlvManagerView.


update

public void update(Graphics dst)
Updates the view.

Overrides:
update in class Container

paint

public void paint(Graphics g)
Paints the component.

Overrides:
paint in class Container
Parameters:
g - The Graphics.

removeNotify

public void removeNotify()
Notifies the Component that it has been removed from its container.

Overrides:
removeNotify in class Container

addNotify

public void addNotify()
Notifies the Component that it has been added to a container.

Overrides:
addNotify in class Panel

doLayout

public void doLayout()
Performs the layout of the components.

Overrides:
doLayout in class Container

getPreferredSize

public Dimension getPreferredSize()
Returns the preferred size of the component. The preferred size is computed using the preferred size of the view of the manager and the preferred sizes of the scrollbars.

Overrides:
getPreferredSize in class Container

getMinimumSize

public Dimension getMinimumSize()
Returns the minimum size of the component. The minimum size is computed using the minimum size of the view of the manager and the minimum sizes of the scrollbars.

Overrides:
getMinimumSize in class Container

getMaximumSize

public Dimension getMaximumSize()
Returns the maximum size of the component. The maximum size is computed using the maximum size of the view of the manager and the maximum sizes of the scrollbars.

Overrides:
getMaximumSize in class Container

getView

public final IlvManagerView getView()
Returns the IlvManagerView that is scrolled.


adjustScrollbars

public void adjustScrollbars()
Adjusts the scrollbars so that they reflect the content of the manager.


adjustView

public void adjustView()
Translates the view according to the values of the scrollbars.


isDoubleBuffering

public final boolean isDoubleBuffering()
Returns the double buffering state of the manager view.


setDoubleBuffering

public final void setDoubleBuffering(boolean set)
Sets the manager view in double buffering mode.


isVerticalScrollbarVisible

public boolean isVerticalScrollbarVisible()
Returns true if the vertical scrollbar is visible.


setVerticalScrollbarVisible

public void setVerticalScrollbarVisible(boolean set)
Shows or hides the vertical scrollbar.

Parameters:
set - if true the scrollbar is shown.

isHorizontalScrollbarVisible

public boolean isHorizontalScrollbarVisible()
Returns true if the horizontal scrollbar is visible.


setHorizontalScrollbarVisible

public void setHorizontalScrollbarVisible(boolean set)
Shows or hides the horizontal scrollbar.

Parameters:
set - if true the scrollbar is shown.

isWheelScrollingEnabled

public boolean isWheelScrollingEnabled()
Indicates whether or not scrolling will take place in response to movement of the mouse wheel. Wheel scrolling is disabled by default.

Since:
JViews 6.5
See Also:
setWheelScrollingEnabled(boolean)

setWheelScrollingEnabled

public void setWheelScrollingEnabled(boolean handleWheel)
Enables/disables scrolling in response to movement of the mouse wheel. Wheel scrolling is disabled by default.

Parameters:
handleWheel - true if scrolling should be done automatically for a MouseWheelEvent, false otherwise.
Since:
JViews 6.5
See Also:
isWheelScrollingEnabled()

processFocusEvent

protected void processFocusEvent(FocusEvent event)
Dispatches focus event to the view of the manager.

Overrides:
processFocusEvent in class Component

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Adds the specified component to this container at the specified index. This method is overridden to track every add request.

Overrides:
addImpl in class Container


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