public class IlvJManagerViewControlBar extends JToolBar
This component must be used in a Swing Application. Note that
if your application is an AWT application, you should use the class
IlvManagerViewControlBar
.
JToolBar.AccessibleJToolBar, JToolBar.Separator
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
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
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvJManagerViewControlBar()
Creates a default control bar with all tools enabled.
|
Modifier and Type | Method and Description |
---|---|
JButton |
addActionButton(String label,
URL iconURL,
ActionListener action,
String tooltip)
Adds a button than performs an action.
|
JToggleButton |
addActionToggleButton(String label,
URL iconURL,
ActionListener action,
String tooltip)
Adds a toggle 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.
|
double |
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.
|
double |
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(double 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(double 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.
|
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
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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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
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, 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, 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 IlvJManagerViewControlBar()
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 JToggleButton addActionToggleButton(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 interactorIlvPanInteractor
public 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.IlvSelectInteractor
public 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(String text)
public String getZoomViewToolTipText()
public void setZoomViewIconURL(URL iconURL)
public URL getZoomViewIconURL()
null
if the icon was set using
setZoomViewIcon(javax.swing.Icon)
instead of setZoomViewIconURL(java.net.URL)
.public void setZoomViewIcon(Icon icon)
public Icon getZoomViewIcon()
public void setZoomViewInteractor(IlvManagerViewInteractor interactor)
interactor
- The new interactorIlvZoomViewInteractor
public IlvManagerViewInteractor getZoomViewInteractor()
public void setZoomInButtonAvailable(boolean available)
available
- If true
, the Zoom in tool is available.public boolean isZoomInButtonAvailable()
true
if the Zoom in tool is available.public void setZoomInToolTipText(String text)
public String getZoomInToolTipText()
public void setZoomInIconURL(URL iconURL)
public URL getZoomInIconURL()
null
if the icon was set using
setZoomInIcon(javax.swing.Icon)
instead of setZoomInIconURL(java.net.URL)
.public void setZoomInIcon(Icon icon)
public Icon getZoomInIcon()
public void setZoomInFactor(double factor)
factor
- The zoom in factor (greater than 1.0)public double getZoomInFactor()
public void setZoomOutButtonAvailable(boolean available)
public boolean isZoomOutButtonAvailable()
true
if the Zoom button is available.public void setZoomOutToolTipText(String text)
public String getZoomOutToolTipText()
public void setZoomOutIconURL(URL iconURL)
public URL getZoomOutIconURL()
null
if the icon was set using
setZoomOutIcon(javax.swing.Icon)
instead of setZoomOutIconURL(java.net.URL)
.public void setZoomOutIcon(Icon icon)
public Icon getZoomOutIcon()
public void setZoomOutFactor(double factor)
factor
- the new zoom factor.public double getZoomOutFactor()
public void setFitToContentsButtonAvailable(boolean available)
public boolean isFitToContentsButtonAvailable()
true
if the Fit to contents tool is available.public void setFitToContentsToolTipText(String text)
public String getFitToContentsToolTipText()
public void setFitToContentsIconURL(URL iconURL)
public URL getFitToContentsIconURL()
null
if the icon was set using
setFitToContentsIcon(javax.swing.Icon)
instead of setFitToContentsIconURL(java.net.URL)
.public void setFitToContentsIcon(Icon icon)
public Icon getFitToContentsIcon()
public void setView(IlvManagerView view)
public IlvManagerView getView()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.