Package com.inet.viewer
Class SwingToolBar
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JToolBar
-
- com.inet.viewer.SwingToolBar
-
- All Implemented Interfaces:
ReportViewChangeListener
,ToolBar
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.SwingConstants
public class SwingToolBar extends javax.swing.JToolBar implements ToolBar, java.beans.PropertyChangeListener
The toolbar of the viewer is connected to the current report view and contain a defaultset of buttons and control elements.- Since:
- 7.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JToolBar
javax.swing.JToolBar.AccessibleJToolBar, javax.swing.JToolBar.Separator
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
-
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
-
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 com.inet.viewer.ToolBar
BUTTON_EXPORT, BUTTON_INFO, BUTTON_JRA_LOAD, BUTTON_JRA_SAVE, BUTTON_PRINT, BUTTON_REFRESH, BUTTON_SEARCH, BUTTONS_GENERAL, BUTTONS_NAVIGATION, BUTTONS_REPORT, BUTTONS_VIEW, BUTTONS_ZOOM
-
-
Constructor Summary
Constructors Constructor Description SwingToolBar(ReportViewer viewer)
Construct a new Toolbar for a ReportViewer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Component
getComponent()
Returns the gui component of this toolbar.boolean
isButtonsVisible(int buttons)
Return true if the button or button group is visible otherwise false.void
propertyChange(java.beans.PropertyChangeEvent evt)
Update all components which have to display an information which depends on the total page number or current page numbervoid
reportViewChanged(ReportView rv)
this method will be called if the current report view has been changed.void
setButtonsVisible(int buttons, boolean visible)
Sets a button or a button group visible or invisible.-
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, 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
-
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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.inet.viewer.ToolBar
isVisible, setVisible
-
-
-
-
Constructor Detail
-
SwingToolBar
public SwingToolBar(ReportViewer viewer)
Construct a new Toolbar for a ReportViewer.- Parameters:
viewer
- The viewer to comunicate with.- Since:
- 7.0
-
-
Method Detail
-
getComponent
public java.awt.Component getComponent()
Returns the gui component of this toolbar.- Specified by:
getComponent
in interfaceToolBar
- Returns:
- The gui component of this toolbar
- Since:
- 7.0
-
setButtonsVisible
public void setButtonsVisible(int buttons, boolean visible)
Sets a button or a button group visible or invisible.- Specified by:
setButtonsVisible
in interfaceToolBar
- Parameters:
buttons
- The identifier for the button or button groupvisible
- True if the button shoulb be visible otherwise false- Since:
- 7.0
- See Also:
ToolBar.BUTTON_EXPORT
,ToolBar.BUTTON_PRINT
,ToolBar.BUTTON_REFRESH
,ToolBar.BUTTON_SEARCH
,ToolBar.BUTTONS_GENERAL
,ToolBar.BUTTONS_NAVIGATION
,ToolBar.BUTTONS_REPORT
,ToolBar.BUTTONS_VIEW
,ToolBar.BUTTONS_ZOOM
,ToolBar.BUTTON_INFO
-
isButtonsVisible
public boolean isButtonsVisible(int buttons)
Return true if the button or button group is visible otherwise false.- Specified by:
isButtonsVisible
in interfaceToolBar
- Parameters:
buttons
- The specified button or button group- Returns:
- true if it is visible otherwise false
- Since:
- 7.0
- See Also:
ToolBar.BUTTON_EXPORT
,ToolBar.BUTTON_PRINT
,ToolBar.BUTTON_REFRESH
,ToolBar.BUTTON_SEARCH
,ToolBar.BUTTONS_GENERAL
,ToolBar.BUTTONS_NAVIGATION
,ToolBar.BUTTONS_REPORT
,ToolBar.BUTTONS_VIEW
,ToolBar.BUTTONS_ZOOM
,ToolBar.BUTTON_INFO
-
reportViewChanged
public void reportViewChanged(ReportView rv)
this method will be called if the current report view has been changed.- Specified by:
reportViewChanged
in interfaceReportViewChangeListener
- Parameters:
rv
- ReportView- Since:
- 7.0
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
Update all components which have to display an information which depends on the total page number or current page number- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
- Parameters:
evt
- The property change event- Since:
- 7.0
-
-