|
||||||||||
| PREV CLASS Documentation homepage. NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JToolBar
ilog.views.swing.IlvJManagerViewControlBar
public class IlvJManagerViewControlBar
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.
| 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IlvJManagerViewControlBar()
| Method Detail |
|---|
public JToggleButton addInteractorButton(String label,
URL iconURL,
IlvManagerViewInteractor inter,
String tooltip)
IlvManagerViewInteractor.
Note that the buttons have size 26x26 small. You can either put a 16x16 icon
inside or a one letter label.
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.
public JButton addActionButton(String label,
URL iconURL,
ActionListener action,
String tooltip)
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.public void setPanButtonAvailable(boolean available)
available - If true, the Pan tool is available.public boolean isPanButtonAvailable()
true if Pan tool is available.
public void setPanToolTipText(String text)
public String getPanToolTipText()
public void setPanIconURL(URL iconURL)
public URL getPanIconURL()
null if the icon was set using
setPanIcon(javax.swing.Icon) instead of setPanIconURL(java.net.URL).
public void setPanIcon(Icon icon)
public Icon getPanIcon()
public void setPanInteractor(IlvManagerViewInteractor interactor)
interactor - The new interactorIlvPanInteractorpublic IlvManagerViewInteractor getPanInteractor()
public void setSelectButtonAvailable(boolean available)
available - If true, the Selection tool is availablepublic boolean isSelectButtonAvailable()
true if the Selection tool is available.
public void setSelectToolTipText(String text)
public String getSelectToolTipText()
public void setSelectIconURL(URL iconURL)
public URL getSelectIconURL()
null if the icon was set using
setSelectIcon(javax.swing.Icon) instead of setSelectIconURL(java.net.URL).
public void setSelectIcon(Icon icon)
public Icon getSelectIcon()
public void setSelectInteractor(IlvManagerViewInteractor interactor)
interactor - The new interactor.IlvSelectInteractorpublic IlvManagerViewInteractor getSelectInteractor()
public void setZoomViewButtonAvailable(boolean available)
available - If true, the Zoom view tool is availablepublic boolean isZoomViewButtonAvailable()
true if the Zoom view tool is available.
public void setZoomViewToolTipText(