|
||||||||||
PREV CLASS 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.JPanel
org.openswing.swing.client.NavigatorBar
Title: OpenSwing Framework
Description: Navigator bar: contains first, previous, next and last buttons. This class must be used inside a GridControl.
Copyright: Copyright (C) 2006 Mauro Carniel
This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
static java.lang.String |
DOWN_KEY
|
static java.lang.String |
FIRST_BUTTON
|
static java.lang.String |
LAST_BUTTON
|
static java.lang.String |
LEFT_MOUSE_BUTTON
|
static java.lang.String |
NEXT_BUTTON
|
static java.lang.String |
NEXT_PG_BUTTON
|
static java.lang.String |
PREV_BUTTON
|
static java.lang.String |
PREV_PG_BUTTON
|
static java.lang.String |
UP_KEY
|
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
NavigatorBar()
|
Method Summary | |
void |
addAfterActionListener(java.awt.event.ActionListener listener)
Add an ActionListener that will be called AFTER a navigator button has been pressed (AFTER selecting row event). |
void |
addBeforeActionListener(java.awt.event.ActionListener listener)
Add an ActionListener that will be called as the first instruction when a navigator button is being pressed (BEFORE selecting row event). |
void |
fireButtonPressedEvent(java.lang.String buttonType)
Method invoked by the grid control when pressing a navigator button. |
void |
firstButton_actionPerformed(java.awt.event.ActionEvent e)
|
void |
initNavigator(NavigatorBarController resultSetController)
|
boolean |
isFirstButtonEnabled()
|
boolean |
isLastButtonEnabled()
|
boolean |
isNextButtonEnabled()
|
boolean |
isPrevButtonEnabled()
|
boolean |
isShowPageNumber()
|
boolean |
isShowPaginationButtons()
|
void |
lastButton_actionPerformed(java.awt.event.ActionEvent e)
|
void |
nextButton_actionPerformed(java.awt.event.ActionEvent e)
|
void |
nextPgButton_actionPerformed(java.awt.event.ActionEvent e)
|
void |
prevButton_actionPerformed(java.awt.event.ActionEvent e)
|
void |
prevPgButton_actionPerformed(java.awt.event.ActionEvent e)
|
void |
removeAfterActionListener(java.awt.event.ActionListener listener)
Remove the specified ActionListener. |
void |
removeBeforerActionListener(java.awt.event.ActionListener listener)
Remove the specified ActionListener. |
void |
setEnabled(boolean enabled)
|
void |
setFirstRow(boolean isFirstRecord)
Method called by grid component each time a row is selected. |
void |
setLastRow(boolean isLastRecord)
Method called by grid component each time a row is selected. |
void |
setShowPageNumber(boolean showPageNumber)
true to show page number input field in navigator bar; false to do not show it.
|
void |
setShowPaginationButtons(boolean showPaginationButtons)
Show/hide pagination buttons in navigator bar; false to do not show them. |
void |
updatePageNumber(int pageNr)
Show/update/hide page number field, according to loading policy and current data length. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String FIRST_BUTTON
public static final java.lang.String PREV_BUTTON
public static final java.lang.String NEXT_BUTTON
public static final java.lang.String LAST_BUTTON
public static final java.lang.String NEXT_PG_BUTTON
public static final java.lang.String PREV_PG_BUTTON
public static final java.lang.String UP_KEY
public static final java.lang.String DOWN_KEY
public static final java.lang.String LEFT_MOUSE_BUTTON
Constructor Detail |
public NavigatorBar()
Method Detail |
public final void updatePageNumber(int pageNr)
public void firstButton_actionPerformed(java.awt.event.ActionEvent e)
public void prevPgButton_actionPerformed(java.awt.event.ActionEvent e)
public void prevButton_actionPerformed(java.awt.event.ActionEvent e)
public void nextButton_actionPerformed(java.awt.event.ActionEvent e)
public void nextPgButton_actionPerformed(java.awt.event.ActionEvent e)
public void lastButton_actionPerformed(java.awt.event.ActionEvent e)
public void setFirstRow(boolean isFirstRecord)
public void setLastRow(boolean isLastRecord)
public void setEnabled(boolean enabled)
public void initNavigator(NavigatorBarController resultSetController)
public boolean isFirstButtonEnabled()
public boolean isPrevButtonEnabled()
public boolean isNextButtonEnabled()
public boolean isLastButtonEnabled()
public final void addAfterActionListener(java.awt.event.ActionListener listener)
listener
- ActionListener to register.public final void removeAfterActionListener(java.awt.event.ActionListener listener)
listener
- ActionListener to remove.public final void fireButtonPressedEvent(java.lang.String buttonType)
buttonType
- possible values: NavigatorBar.xxx_BUTTONpublic final void addBeforeActionListener(java.awt.event.ActionListener listener)
listener
- ActionListener to register.public final void removeBeforerActionListener(java.awt.event.ActionListener listener)
listener
- ActionListener to remove.public final boolean isShowPaginationButtons()
true
to show pagination buttons in navigator bar; false
to do not show thempublic final void setShowPaginationButtons(boolean showPaginationButtons)
false
to do not show them.
showPaginationButtons
- true
to show pagination buttons in navigator bar; false
to do not show thempublic final boolean isShowPageNumber()
true
to show page number input field in navigator bar; false
to do not show it; default value: true
public final void setShowPageNumber(boolean showPageNumber)
true
to show page number input field in navigator bar; false
to do not show it.
Note: it is automatically hided if result set is fully loaded in grid, independently from this setting.
showPageNumber
- true
to show page number input field in navigator bar; false
to do not show it
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |