com.ribs.plus
Class RJBrowser
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
com.ribs.plus.RJBrowser
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.ScrollPaneConstants, java.io.Serializable
- public class RJBrowser
- extends javax.swing.JScrollPane
This component displays a hierarchy of data like a JTree, however, it does it with a number of distinct JTables
layed out horizontally.
Copyright (c) 2004 ReportMill Software, Inc. All Rights Reserved. Contact ReportMill .
- See Also:
- Serialized Form
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| 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 javax.swing.ScrollPaneConstants |
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
|
Method Summary |
void |
addListSelectionListener(javax.swing.event.ListSelectionListener l)
Adds a list selection listener. |
void |
addMouseListener(java.awt.event.MouseListener l)
Adds a mouse listener. |
javax.swing.JTable |
createTable()
|
javax.swing.JTable |
getColumn(int anIndex)
Returns the specific column table at the given index. |
int |
getColumnCount()
Returns the number of columns currently in the browser. |
javax.swing.JTable |
getColumnLast()
Returns the last column table in the browser. |
javax.swing.Icon |
getDoubleArrowIcon()
Returns the icon of a double right arrow to indicate branch nodes of a "to-many" relationship in a browser. |
java.lang.String |
getPath()
Returns the path constructed by appending the selected row in each column by a dot. |
java.lang.String |
getPath(java.lang.String separator)
Returns the path constructed by appending the selected row in each column by a dot. |
javax.swing.Icon |
getRightArrowIcon()
Returns the icon of a single right arrow to indicate branch nodes in a browser. |
java.lang.Class |
getTableClass()
Returns the table class. |
boolean |
isSelectedLeaf()
Returns whether selected item is leaf. |
boolean |
isSelectedToMany()
Returns whether selected item is to-many. |
void |
removeListSelectionListener(javax.swing.event.ListSelectionListener l)
Removes a list selection listener. |
void |
removeMouseListener(java.awt.event.MouseListener l)
Removes a mouse listener. |
void |
reset(RJBrowser.AbstractBrowserModel aModel)
|
java.lang.Object |
selectedItem()
Returns the selected item. |
javax.swing.event.ListSelectionListener |
selectionListener(int i)
Returns the list selection listener at the given index. |
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setDidDrag(boolean aFlag)
Sets the did drag flag, so that a mouse drag that ends in drag and drop isn't confused for a selection. |
void |
setMinimumNumberOfColumns(int c)
Determines the minimum number of visible columns in the browser. |
void |
setModel(RJBrowser.AbstractBrowserModel aModel)
|
void |
setTableClass(java.lang.Class c)
Sets the table class. |
| Methods inherited from class javax.swing.JScrollPane |
createHorizontalScrollBar, createVerticalScrollBar, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled, 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, 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, setEnabled, 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, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, 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, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, 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 |
_rightArrowIcon
public static javax.swing.Icon _rightArrowIcon
_doubleArrowIcon
public static javax.swing.Icon _doubleArrowIcon
RJBrowser
public RJBrowser()
- Creates a new browser.
RJBrowser
public RJBrowser(RJBrowser.AbstractBrowserModel model)
- Creates a new browser with the given BrowserModel.
RJBrowser
public RJBrowser(RJBrowser.AbstractBrowserModel model,
java.lang.Class tableClass)
- Creates a newe browser with the given browser model and table class.
getPath
public java.lang.String getPath()
- Returns the path constructed by appending the selected row in each column by a dot.
getPath
public java.lang.String getPath(java.lang.String separator)
- Returns the path constructed by appending the selected row in each column by a dot.
getColumnCount
public int getColumnCount()
- Returns the number of columns currently in the browser.
getColumn
public javax.swing.JTable getColumn(int anIndex)
- Returns the specific column table at the given index.
getColumnLast
public javax.swing.JTable getColumnLast()
- Returns the last column table in the browser.
setMinimumNumberOfColumns
public void setMinimumNumberOfColumns(int c)
- Determines the minimum number of visible columns in the browser.
getTableClass
public java.lang.Class getTableClass()
- Returns the table class.
setTableClass
public void setTableClass(java.lang.Class c)
- Sets the table class.
selectedItem
public java.lang.Object selectedItem()
- Returns the selected item.
selectionListener
public javax.swing.event.ListSelectionListener selectionListener(int i)
- Returns the list selection listener at the given index.
addListSelectionListener
public void addListSelectionListener(javax.swing.event.ListSelectionListener l)
- Adds a list selection listener.
removeListSelectionListener
public void removeListSelectionListener(javax.swing.event.ListSelectionListener l)
- Removes a list selection listener.
addMouseListener
public void addMouseListener(java.awt.event.MouseListener l)
- Adds a mouse listener.
removeMouseListener
public void removeMouseListener(java.awt.event.MouseListener l)
- Removes a mouse listener.
setDidDrag
public void setDidDrag(boolean aFlag)
- Sets the did drag flag, so that a mouse drag that ends in drag and drop isn't confused for a selection.
createTable
public javax.swing.JTable createTable()
setModel
public void setModel(RJBrowser.AbstractBrowserModel aModel)
reset
public void reset(RJBrowser.AbstractBrowserModel aModel)
setBounds
public void setBounds(int x,
int y,
int width,
int height)
isSelectedLeaf
public boolean isSelectedLeaf()
- Returns whether selected item is leaf.
isSelectedToMany
public boolean isSelectedToMany()
- Returns whether selected item is to-many.
getRightArrowIcon
public javax.swing.Icon getRightArrowIcon()
- Returns the icon of a single right arrow to indicate branch nodes in a browser.
getDoubleArrowIcon
public javax.swing.Icon getDoubleArrowIcon()
- Returns the icon of a double right arrow to indicate branch nodes of a "to-many" relationship in a browser.