ilog.views.swing
Class IlvJManagerViewControlBar

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JToolBar
                  extended by ilog.views.swing.IlvJManagerViewControlBar
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
IltJManagerViewControlBar, IlvJMapsManagerViewControlBar

public class IlvJManagerViewControlBar
extends JToolBar

This class defines a customizable tool bar that contains tools to pan, zoom, unzoom, scroll, fit to content, or select graphic objects.

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

Since:
ILOG JViews 3.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JToolBar
JToolBar.AccessibleJToolBar, JToolBar.Separator
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
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 javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
IlvJManagerViewControlBar()
          Creates a default control bar with all tools enabled.
 
Method Summary
 JButton addActionButton(String label, URL iconURL, ActionListener action, String tooltip)
          Adds a button than performs an action.
 JToggleButton addInteractorButton(String label, URL iconURL, IlvManagerViewInteractor inter, String tooltip)
          Adds a button than controls an IlvManagerViewInteractor.
 Icon getFitToContentsIcon()
          Returns the icon of the Fit to contents button.
 URL getFitToContentsIconURL()
          Returns the URL of the icon of the Fit to contents button.
 String getFitToContentsToolTipText()
          Returns the text that is displayed in the tooltip when the mouse pointer is kept over the Fit to contents button.
 Icon getPanIcon()
          Returns the icon of the Pan button.
 URL getPanIconURL()
          Returns the URL of the icon of the Pan button.
 IlvManagerViewInteractor getPanInteractor()
          Returns the interactor for Pan tool.
 String getPanToolTipText()
          Returns the text that is displayed in the tooltip when the mouse pointer is kept over the Pan button.
 Icon getSelectIcon()
          Returns the icon of the Select button.
 URL getSelectIconURL()
          Returns the URL of the icon of the Select button.
 IlvManagerViewInteractor getSelectInteractor()
          Returns the selection interactor currently in use.
 String getSelectToolTipText()
          Returns the text that is displayed in the tooltip when the mouse is kept over the Select button.
 IlvManagerView getView()
          Returns the view associated with this control bar.
 float getZoomInFactor()
          Returns the zoom in factor currently in use.
 Icon getZoomInIcon()
          Returns the icon of the Zoom In button.
 URL getZoomInIconURL()
          Returns the URL of the icon of the Zoom In button.
 String getZoomInToolTipText()
          Returns the text that is displayed in the tooltip when the mouse pointer is kept over the Zoom in button.
 float getZoomOutFactor()
          Returns the zoom factor currently in use.
 Icon getZoomOutIcon()
          Returns the icon of the Zoom Out button.
 URL getZoomOutIconURL()
          Returns the URL of the icon of the Zoom Out button.
 String getZoomOutToolTipText()
          Returns the text that is displayed in the tooltip when the mouse is kept over the Zoom out button.
 Icon getZoomViewIcon()
          Returns the icon of the Zoom view button.
 URL getZoomViewIconURL()
          Returns the URL of the icon of the Zoom view button.
 IlvManagerViewInteractor getZoomViewInteractor()
          Returns the zoom view interactor currently in use.
 String getZoomViewToolTipText()
          Returns the text that is displayed in the tooltip when the mouse pointer is kept over the Zoom view button.
 boolean isFitToContentsButtonAvailable()
          Returns true if the Fit to contents tool is available.
 boolean isPanButtonAvailable()
          Returns true if Pan tool is available.
 boolean isSelectButtonAvailable()
          Returns true if the Selection tool is available.
 boolean isZoomInButtonAvailable()
          Returns true if the Zoom in tool is available.
 boolean isZoomOutButtonAvailable()
          Returns true if the Zoom button is available.
 boolean isZoomViewButtonAvailable()
          Returns true if the Zoom view tool is available.
 void setFitToContentsButtonAvailable(boolean available)
          Specifies whether the Fit to contents tool is available.
 void setFitToContentsIcon(Icon icon)
          Indicates the icon of the Fit to contents button.
 void setFitToContentsIconURL(URL iconURL)
          Indicates the icon of the Fit to contents button.
 void setFitToContentsToolTipText(String text)
          Indicates the text to display in the Fit to contents tooltip.
 void setPanButtonAvailable(boolean available)
          /** Specifies whether the Pan tool is available.
 void setPanIcon(Icon icon)
          Indicates the icon of the Pan button.
 void setPanIconURL(URL iconURL)
          Indicates the icon of the Pan button.
 void setPanInteractor(IlvManagerViewInteractor interactor)
          Change the interactor for the Pan tool.
 void setPanToolTipText(String text)
          Indicates the text to display in the Pan button tooltip.
 void setSelectButtonAvailable(boolean available)
          Specifies whether the Selection tool is available.
 void setSelectIcon(Icon icon)
          Indicates the icon of the Select button.
 void setSelectIconURL(URL iconURL)
          Indicates the icon of the Select button.
 void setSelectInteractor(IlvManagerViewInteractor interactor)
          Changes the interactor for the Selection tool.
 void setSelectToolTipText(String text)
          Indicates the text to display in the Select button tooltip.
 void setView(IlvManagerView view)
          Sets the view for this control bar.
 void setZoomInButtonAvailable(boolean available)
          Specifies whether the Zoom in tool is available.
 void setZoomInFactor(float factor)
          Changes the zoom in factor.
 void setZoomInIcon(Icon icon)
          Indicates the icon of the Zoom In button.
 void setZoomInIconURL(URL iconURL)
          Indicates the icon of the Zoom In button.
 void setZoomInToolTipText(String text)
          Indicates the text to display in the Zoom in button tooltip.
 void setZoomOutButtonAvailable(boolean available)
          Specifies whether the Zoom out tool is available.
 void setZoomOutFactor(float factor)
          Changes the zoom out factor.
 void setZoomOutIcon(Icon icon)
          Indicates the icon of the Zoom Out button.
 void setZoomOutIconURL(URL iconURL)
          Indicates the icon of the Zoom Out button.
 void setZoomOutToolTipText(String text)
          Indicates the text to display in the Zoom out button tooltip.
 void setZoomViewButtonAvailable(boolean available)
          Specifies whether the Zoom view tool is available.
 void setZoomViewIcon(Icon icon)
          Indicates the icon of the Zoom view button.
 void setZoomViewIconURL(URL iconURL)
          Indicates the icon of the Zoom view button.
 void setZoomViewInteractor(IlvManagerViewInteractor interactor)
          Changes the zoom view interactor.
 void setZoomViewToolTipText(String text)
          Indicates the text to display in the Zoom view button tooltip.
 
Methods inherited from class javax.swing.JToolBar
add, addImpl, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, 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
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, 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, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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, hide, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvJManagerViewControlBar

public IlvJManagerViewControlBar()
Creates a default control bar with all tools enabled.

Method Detail

addInteractorButton

public JToggleButton addInteractorButton(String label,
                                         URL iconURL,
                                         IlvManagerViewInteractor inter,
                                         String tooltip)
Adds a button than controls an IlvManagerViewInteractor. Note that the buttons have size 26x26 small. You can either put a 16x16 icon inside or a one letter label.

Parameters:
label - The optional label of the button. Can be null.
iconURL - The optional icon of the button. Can be null.
inter - The interactor to be installed on the view when pressing the button.
tooltip - The optional tooltip of the button. Can be null.
Since:
JViews 8.1

addActionButton

public JButton addActionButton(String label,
                               URL iconURL,
                               ActionListener action,
                               String tooltip)
Adds a button than performs an action. Note that the buttons have size 26x26 small. You can either put a 16x16 icon inside or a one letter label.

Parameters:
label - The optional label of the button. Can be null.
iconURL - The optional icon of the button. Can be null.
action - The action to be preformed when pressing the button.
tooltip - The optional tooltip of the button. Can be null.
Since:
JViews 8.1

setPanButtonAvailable

public void setPanButtonAvailable(boolean available)
/** Specifies whether the Pan tool is available.

Parameters:
available - If true, the Pan tool is available.

isPanButtonAvailable

public boolean isPanButtonAvailable()
Returns true if Pan tool is available.


setPanToolTipText

public void setPanToolTipText(String text)
Indicates the text to display in the Pan button tooltip.


getPanToolTipText

public String getPanToolTipText()
Returns the text that is displayed in the tooltip when the mouse pointer is kept over the Pan button.


setPanIconURL

public void setPanIconURL(URL iconURL)
Indicates the icon of the Pan button. The buttons have the size 26x26. We recommend to use icons of size 16x16.

Since:
JViews 8.0

getPanIconURL

public URL getPanIconURL()
Returns the URL of the icon of the Pan button. This may return null if the icon was set using setPanIcon(javax.swing.Icon) instead of setPanIconURL(java.net.URL).

Since:
JViews 8.0

setPanIcon

public void setPanIcon(Icon icon)
Indicates the icon of the Pan button. The buttons have the size 26x26. We recommend to use icons of size 16x16.

Since:
JViews 8.0

getPanIcon

public Icon getPanIcon()
Returns the icon of the Pan button.

Since:
JViews 8.0

setPanInteractor

public void setPanInteractor(IlvManagerViewInteractor interactor)
Change the interactor for the Pan tool.

Parameters:
interactor - The new interactor
See Also:
IlvPanInteractor

getPanInteractor

public IlvManagerViewInteractor getPanInteractor()
Returns the interactor for Pan tool.


setSelectButtonAvailable

public void setSelectButtonAvailable(boolean available)
Specifies whether the Selection tool is available.

Parameters:
available - If true, the Selection tool is available

isSelectButtonAvailable

public boolean isSelectButtonAvailable()
Returns true if the Selection tool is available.


setSelectToolTipText

public void setSelectToolTipText(String text)
Indicates the text to display in the Select button tooltip.


getSelectToolTipText

public String getSelectToolTipText()
Returns the text that is displayed in the tooltip when the mouse is kept over the Select button.


setSelectIconURL

public void setSelectIconURL(URL iconURL)
Indicates the icon of the Select button. The buttons have the size 26x26. We recommend to use icons of size 16x16.

Since:
JViews 8.0

getSelectIconURL

public URL getSelectIconURL()
Returns the URL of the icon of the Select button. This may return null if the icon was set using setSelectIcon(javax.swing.Icon) instead of setSelectIconURL(java.net.URL).

Since:
JViews 8.0

setSelectIcon

public void setSelectIcon(Icon icon)
Indicates the icon of the Select button. The buttons have the size 26x26. We recommend to use icons of size 16x16.

Since:
JViews 8.0

getSelectIcon

public Icon getSelectIcon()
Returns the icon of the Select button.

Since:
JViews 8.0

setSelectInteractor

public void setSelectInteractor(IlvManagerViewInteractor interactor)
Changes the interactor for the Selection tool.

Parameters:
interactor - The new interactor.
See Also:
IlvSelectInteractor

getSelectInteractor

public IlvManagerViewInteractor getSelectInteractor()
Returns the selection interactor currently in use.


setZoomViewButtonAvailable

public void setZoomViewButtonAvailable(boolean available)
Specifies whether the Zoom view tool is available. Zoom view allows the user to zoom the view on a rectangle.

Parameters:
available - If true, the Zoom view tool is available

isZoomViewButtonAvailable

public boolean