|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--sos.reports.JReportPane
A report renderer and editor. This Swing component is a combination
of javax.swing.JTable and javax.swing.JTextPane.
It displays and edits text
and images in a report format but works with objects, renderers,
and editors, rather than text.
The report pane internally maps the report's Element hierarchy
to a View hierarchy,
where each view is responsible for the rendering of a particular element.
In most cases, clients need not worry about the View used to
render an element. The methods in JReportPane take and return
instances of Element.
JReportPane gets some of its behavior from an
instance of ReportEditorKit.
The default editor kit is typically sufficient to handle
most reports. However, if it does not suffice, clients should pass
a custom editor kit into either the constructor or the setEditorKit method.
TraversalPolicy.
TextHighlighter via
getTextHighlighter and invoke addHighlight to
reportPane.addMouseListener( new MouseAdapter() {
public void mouseClicked( MouseEvent event )
{
if( !event.isPopupTrigger() )
return;
Element selectedElement = reportPane.getSelectionAt( event.getPoint() );
if( selectedElement != null )
{
// perform the desired action
}
return;
}
} );
| Nested Class Summary | |
protected class |
JReportPane.AccessibleJReportPane
A class that implements accessibility support for a JReportPane. |
static interface |
JReportPane.HeaderFooterFactory
An object that specifies page headers and footers. |
| Field Summary | |
static java.lang.String |
DRAG_ENABLED_PROPERTY
Constant used by property change events to signal that the JReportPane's
desire to edit by dragging has changed. |
static java.lang.String |
EDITABLE_PROPERTY
Constant used by property change events to signal that the JReportPane's
desire to be edited has changed. |
static java.lang.String |
EDITOR_KIT_PROPERTY
Constant used by property change events to signal that the JReportPane's
editor kit has changed. |
static java.lang.String |
EDITOR_MODEL_PROPERTY
Constant used by property change events to signal that the JReportPane's
editor model has changed. |
static java.lang.String |
MARGIN_PROPERTY
Constant used by property change events to signal that the JReportPane's
margins have changed. |
static java.lang.String |
MOUSE_OVER_ENABLED_PROPERTY
Constant used by property change events to signal that the JReportPane's
desire to show mouse-over hints has changed. |
static java.lang.String |
REPORT_PROPERTY
Constant used by property change events to signal that the JReportPane's
underlying report has changed. |
static java.lang.String |
SELECTION_BACKGROUND_PROPERTY
Constant used by property change events to signal that the JReportPane's
preferred selection background color has changed. |
static java.lang.String |
SELECTION_FOREGROUND_PROPERTY
Constant used by property change events to signal that the JReportPane's
preferred selection foreground color has changed. |
static java.lang.String |
SELECTION_MODEL_PROPERTY
Constant used by property change events to signal that the JReportPane's
selection model has changed. |
static java.lang.String |
TEXT_HIGHLIGHTER_PROPERTY
Constant used by property change events to signal that the JReportPane's
text highlighter has changed. |
| 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
JReportPane()
Creates a JReportPane with a default report and editor kit. |
|
JReportPane(Report report)
Creates a JReportPane with the specified report and a default editor kit. |
|
JReportPane(Report report,
ReportEditorKit editorKit)
Creates a JReportPane with the specified
report and editor kit. |
|
| Method Summary | |
boolean |
changeSelection(Element element,
boolean toggle,
boolean extend)
Changes the selection of report elements. |
protected ReportEditorKit |
createDefaultEditorKit()
Creates a returns an editor kit to use if the client does not specify one. |
protected ReportEditorModel |
createDefaultEditorModel()
Creates and returns an editor model to use if the client does not specify one. |
protected Report |
createDefaultReport()
Creates and returns a report to render if the client does not specify one. |
protected ReportSelectionModel |
createDefaultSelectionModel()
Creates and returns a selection model to use if the client does not specify one. |
boolean |
editElement(Element element,
java.util.EventObject event)
Attempts to edit the specified element as a result of the specified event. |
javax.accessibility.AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JReportPane. |
boolean |
getDragEnabled()
Returns true if this report pane allows the dragging of its report
contents to other components or applications. |
Element |
getEditingElement()
Returns the element that is currently being edited. |
ElementEditor |
getEditor()
Returns the editor in charge of the current editing. |
java.awt.Component |
getEditorComponent()
Returns the editor component that is editing an element. |
ReportEditorKit |
getEditorKit()
Returns the currently installed editor kit. |
ReportEditorModel |
getEditorModel()
Returns the editor model that controls the editing of report elements. |
java.awt.Rectangle |
getElementRectangle(Element element)
Returns the region occupied by the specified element. |
java.util.Set |
getElementsAt(java.awt.Point point)
Returns a set of the elements being rendered at the specified point. |
TraversalPolicy |
getElementTraversalPolicy()
Returns the policy that controls the tab order among elements. |
java.awt.print.Pageable |
getFittedPageable(java.awt.print.PageFormat pageFormat)
Returns a Pageable that scales the report
to fit the page width and then breaks the report
into pages for printing. |
java.awt.print.Pageable |
getFittedPageable(java.awt.print.PageFormat pageFormat,
JReportPane.HeaderFooterFactory headerFooterFactory,
java.awt.Component underlaidWatermark,
java.awt.Component overlaidWatermark)
Returns a Pageable that scales the report
to fit the page width and then breaks the report
into stylized pages for printing. |
java.awt.Insets |
getMargin()
Returns the amount of space between this report pane's border and report. |
java.awt.print.Pageable |
getPageable(java.awt.print.PageFormat pageFormat)
Returns a Pageable that breaks the report
into pages for printing. |
java.awt.print.Pageable |
getPageable(java.awt.print.PageFormat pageFormat,
JReportPane.HeaderFooterFactory headerFooterFactory,
java.awt.Component underlaidWatermark,
java.awt.Component overlaidWatermark)
Returns a Pageable that breaks the report
into stylized pages for printing. |
java.awt.Dimension |
getPreferredScrollableViewportSize()
Returns the preferred size of the viewport for a view component. |
Report |
getReport()
Returns the report being rendered by this report pane. |
int |
getScrollableBlockIncrement(java.awt.Rectangle rectangle,
int param,
int param2)
Returns the scrollable block increment. |
boolean |
getScrollableTracksViewportHeight()
Returns true if a viewport should always force
this component's height to match the height of the viewport. |
boolean |
getScrollableTracksViewportWidth()
Returns true if a viewport should always force
this component's width to match the width of the viewport. |
int |
getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
Returns the scrollable unit increment. |
Element |
getSelectionAt(java.awt.Point point)
Returns the first selected element at the specified point. |
java.awt.Color |
getSelectionBackground()
Returns the color to paint the background of selected elements, or null
if no color is specified. |
java.awt.Color |
getSelectionForeground()
Returns the color to use in the foreground of selected elements, or null
if no color is specified. |
ReportSelectionModel |
getSelectionModel()
Returns the model that controls the selection of report contents. |
boolean |
getSelectionNeededForDrag()
Returns true if an element must be selected before the user can
drag it. |
boolean |
getSurrendersFocusOnKeystroke()
Returns true if this report pane should give up the focus
and give it to the editor when a keystroke activates editing. |
TextHighlighter |
getTextHighlighter()
Returns the object that controls text highlighting. |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event)
Returns the string to be used as the tooltip for event. |
ReportPaneUI |
getUI()
Returns the look and feel delegate that renders this report pane. |
java.lang.String |
getUIClassID()
Returns the UIDefaults key used to look up the name
of the swing.plaf.ComponentUI class that defines the look and feel
for this component. |
boolean |
isEditable()
Returns true if this report pane can be edited. |
boolean |
isEditing()
Returns true if this report pane is currently editing
its report contents. |
boolean |
isFocusable()
Returns whether this component can be focused. |
boolean |
isMouseOverEnabled()
Returns true if mouse-over hints are enabled. |
void |
mouseOver(java.awt.Point point)
Informs this report pane that the mouse is over the specified point. |
protected boolean |
processKeyBinding(javax.swing.KeyStroke keyStroke,
java.awt.event.KeyEvent event,
int condition,
boolean pressed)
Invoked to process the key bindings for keyStroke as a result of
the KeyEvent. |
void |
removeEditor()
Cancels the current editing, if any. |
void |
removeNotify()
Notifies this component that it no longer has a parent component. |
void |
scrollElementToVisible(Element element)
Scrolls this report pane, as needed, to ensure that the specified element is visible. |
void |
setBounds(int x,
int y,
int width,
int height)
Moves and resizes this report pane. |
void |
setDragEnabled(boolean dragEnabled)
Sets whether or not this report pane should allow dragging of its report contents to other components or applications. |
void |
setEditable(boolean editable)
Sets whether or not this report pane can be edited. |
void |
setEditorKit(ReportEditorKit editorKit)
Sets the editor kit. |
void |
setEditorModel(ReportEditorModel editorModel)
Sets the editor model, which controls the editing of report elements. |
void |
setElementTraversalPolicy(TraversalPolicy traversalPolicy)
Sets the policy that controls the tab order among elements. |
void |
setMargin(java.awt.Insets margin)
Sets the amount of space between this report pane's border and report. |
void |
setMouseOverEnabled(boolean enabled)
Sets whether this component should provide mouse-over hints. |
void |
setReport(Report report)
Establishes the report that this report pane should render and edit. |
void |
setSelectionBackground(java.awt.Color color)
Sets the selection background color. |
void |
setSelectionForeground(java.awt.Color color)
Sets the selection foreground color. |
void |
setSelectionModel(ReportSelectionModel selectionModel)
Sets the selection model, which governs how elements are selected. |
void |
setSelectionNeededForDrag(boolean selectionNeededForDrag)
Sets if an element must be selected before the user can drag it. |
void |
setSurrendersFocusOnKeystroke(boolean surrendersFocusOnKeystroke)
Sets whether editors get the focus after a keystroke activates editing. |
void |
setTextHighlighter(TextHighlighter textHighlighter)
Sets the object that controls text highlighting. |
void |
setUI(ReportPaneUI newUI)
Sets the look and feel delegate for this report pane. |
boolean |
stopEditing()
Stops the editing of an element. |
void |
stopMouseOver()
Hides any mouse-over hints that are being shown. |
void |
updateUI()
Resets the UI property with the value from the current look and feel. |
| 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, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, 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, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, 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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String EDITABLE_PROPERTY
JReportPane's
desire to be edited has changed.
public static final java.lang.String EDITOR_KIT_PROPERTY
JReportPane's
editor kit has changed.
public static final java.lang.String EDITOR_MODEL_PROPERTY
JReportPane's
editor model has changed.
public static final java.lang.String DRAG_ENABLED_PROPERTY
JReportPane's
desire to edit by dragging has changed.
public static final java.lang.String MARGIN_PROPERTY
JReportPane's
margins have changed.
public static final java.lang.String MOUSE_OVER_ENABLED_PROPERTY
JReportPane's
desire to show mouse-over hints has changed.
public static final java.lang.String REPORT_PROPERTY
JReportPane's
underlying report has changed.
public static final java.lang.String SELECTION_BACKGROUND_PROPERTY
JReportPane's
preferred selection background color has changed.
public static final java.lang.String SELECTION_FOREGROUND_PROPERTY
JReportPane's
preferred selection foreground color has changed.
public static final java.lang.String SELECTION_MODEL_PROPERTY
JReportPane's
selection model has changed.
public static final java.lang.String TEXT_HIGHLIGHTER_PROPERTY
JReportPane's
text highlighter has changed.
| Constructor Detail |
public JReportPane()
JReportPane with a default report and editor kit.
JReportPane(Report,ReportEditorKit)public JReportPane(Report report)
JReportPane with the specified report and a default editor kit.
report - document to display and possibly editJReportPane(Report,ReportEditorKit)
public JReportPane(Report report,
ReportEditorKit editorKit)
JReportPane with the specified
report and editor kit.
report - document to display and possibly editeditorKit - object that controls the editing of the report| Method Detail |
public boolean changeSelection(Element element,
boolean toggle,
boolean extend)
This method is provided because javax.swing.JTable provides a similar
method. To be consistent with JTable, whenever the UI or the editor kit
changes the selection, it should use this method, thereby allowing
a subclass to override this method and change the behavior of
all selection changes.
element - report element on which the selection change is madetoggle - whether or not the selection should be toggledextend - whether or not the selection should be extended to include
the specified element
NotSelectableException)
java.lang.NullPointerException - if element is nullReportSelectionModel.select(sos.reports.Element, boolean, boolean)protected ReportEditorKit createDefaultEditorKit()
protected ReportEditorModel createDefaultEditorModel()
protected Report createDefaultReport()
protected ReportSelectionModel createDefaultSelectionModel()
public java.awt.print.Pageable getPageable(java.awt.print.PageFormat pageFormat)
Pageable that breaks the report
into pages for printing. The pages will not have a header,
footer, or watermark.
pageFormat - the page format to be used for all pages
Pageable that can print this JReportPane
java.lang.NullPointerException - if pageFormat is nullgetPageable(PageFormat,JReportPane.HeaderFooterFactory,Component,Component)
public java.awt.print.Pageable getPageable(java.awt.print.PageFormat pageFormat,
JReportPane.HeaderFooterFactory headerFooterFactory,
java.awt.Component underlaidWatermark,
java.awt.Component overlaidWatermark)
Pageable that breaks the report
into stylized pages for printing. The pages will have the specified header,
footer, and watermarks.
pageFormat - the page format to be used for all pagesheaderFooterFactory - an object that provides the page headers and footers
(may be null)underlaidWatermark - object that draws on the page background before
the header, footer, and report pages are drawn (may be null)overlaidWatermark - object that draws on the page after
the header, footer, and report pages are drawn (may be null)
Pageable that can print this JReportPane
java.lang.NullPointerException - if pageFormat is nullgetPageable(PageFormat)public java.awt.print.Pageable getFittedPageable(java.awt.print.PageFormat pageFormat)
Pageable that scales the report
to fit the page width and then breaks the report
into pages for printing. If the report is smaller
than the page width, then no scaling occurs.The pages will not have a header, footer, or watermark.
pageFormat - the page format to be used for all pages
Pageable that can print this JReportPane
java.lang.NullPointerException - if pageFormat is nullgetFittedPageable(PageFormat,JReportPane.HeaderFooterFactory,Component,Component)
public java.awt.print.Pageable getFittedPageable(java.awt.print.PageFormat pageFormat,
JReportPane.HeaderFooterFactory headerFooterFactory,
java.awt.Component underlaidWatermark,
java.awt.Component overlaidWatermark)
Pageable that scales the report
to fit the page width and then breaks the report
into stylized pages for printing. If the report is smaller
than the page width, then no scaling occurs.The pages will not have a header, footer, or watermark.
pageFormat - the page format to be used for all pagesheaderFooterFactory - an object that provides the page headers and footers
(may be null)underlaidWatermark - object that draws on the page background before
the header, footer, and report pages are drawn (may be null)overlaidWatermark - object that draws on the page after
the header, footer, and report pages are drawn (may be null)
Pageable that can print this JReportPane
java.lang.NullPointerException - if pageFormat is nullgetFittedPageable(PageFormat)
public boolean editElement(Element element,
java.util.EventObject event)
Editing cannot start if any one of the following conditions holds:
element - element to editevent - event to trigger the editing
true if editing of element has successfully started
java.lang.NullPointerException - if element is nullCellEditor.stopCellEditing(),
isEditable(),
Component.isEnabled(),
Report.isElementEditable(sos.reports.Element),
ReportEditorModel.getEditor(sos.reports.Element),
CellEditor.isCellEditable(java.util.EventObject)public javax.accessibility.AccessibleContext getAccessibleContext()
AccessibleContext associated with this JReportPane.
getAccessibleContext in interface javax.accessibility.AccessiblegetAccessibleContext in class javax.swing.JComponentAccessibleContext associated with this JReportPanepublic boolean getDragEnabled()
true if this report pane allows the dragging of its report
contents to other components or applications.
true if dragging is enabledsetDragEnabled(boolean)public Element getEditingElement()
null, if noneeditElement(sos.reports.Element, java.util.EventObject),
isEditing()public ElementEditor getEditor()
null,
if no element is being editededitElement(sos.reports.Element, java.util.EventObject),
isEditing(),
getEditorComponent()public java.awt.Component getEditorComponent()
null, if no element is being editededitElement(sos.reports.Element, java.util.EventObject),
isEditing(),
getEditor()public ReportEditorKit getEditorKit()
null)setEditorKit(sos.reports.ReportEditorKit)public ReportEditorModel getEditorModel()
setEditorModel(sos.reports.ReportEditorModel)public java.awt.Rectangle getElementRectangle(Element element)
element - report element for which the bounding area is requested
Rectangle containing element
java.lang.IllegalArgumentException - if element is not being rendered by
this report pane
java.lang.NullPointerException - if element is nullpublic TraversalPolicy getElementTraversalPolicy()
setElementTraversalPolicy(sos.reports.TraversalPolicy)public java.awt.Insets getMargin()
setMargin(java.awt.Insets)public java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize in interface javax.swing.ScrollableJViewport whose view
is this Scrollablepublic Report getReport()
setReport(sos.reports.Report)public java.util.Set getElementsAt(java.awt.Point point)
point - (x,y) position within this component at which to
retrieve the elements
point
java.lang.NullPointerException - if point is null
public int getScrollableBlockIncrement(java.awt.Rectangle rectangle,
int param,
int param2)
getScrollableBlockIncrement in interface javax.swing.Scrollablerectangle - The view area visible within the viewport
public boolean getScrollableTracksViewportHeight()
true if a viewport should always force
this component's height to match the height of the viewport.
getScrollableTracksViewportHeight in interface javax.swing.Scrollabletrue if a viewport should keep the
container's height the same height of the viewportpublic boolean getScrollableTracksViewportWidth()
true if a viewport should always force
this component's width to match the width of the viewport.
getScrollableTracksViewportWidth in interface javax.swing.Scrollabletrue if a viewport should keep the
container's width the same width of the viewport
public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
getScrollableUnitIncrement in interface javax.swing.Scrollableorientation - The axis of the scrolling--either
SwingConstants.VERTICAL or SwingConstants.HORIZONTALdirection - A negative number to indicate scrolling left or up, or
a positive number to indicate scrolling right or down
public Element getSelectionAt(java.awt.Point point)
point - x,y coordinates at which the selected element is requested
point, or null, if none
selectedpublic java.awt.Color getSelectionBackground()
null
if no color is specified.
setSelectionBackground(java.awt.Color)public java.awt.Color getSelectionForeground()
null
if no color is specified.
setSelectionForeground(java.awt.Color)public ReportSelectionModel getSelectionModel()
public boolean getSelectionNeededForDrag()
true if an element must be selected before the user can
drag it. A value of false means the user can select and drag in one action.
true if selection is needed in order to dragsetSelectionNeededForDrag(boolean)public boolean getSurrendersFocusOnKeystroke()
true if this report pane should give up the focus
and give it to the editor when a keystroke activates editing.
true if the editor should get the focus when keystrokes
activate editingsetSurrendersFocusOnKeystroke(boolean)public TextHighlighter getTextHighlighter()
setTextHighlighter(sos.reports.TextHighlighter)public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
event.
This implementation forwards the request to the look-and-feel delegate.
getToolTipText in class javax.swing.JComponentgetUI()public ReportPaneUI getUI()
public java.lang.String getUIClassID()
UIDefaults key used to look up the name
of the swing.plaf.ComponentUI class that defines the look and feel
for this component.
getUIClassID in class javax.swing.JComponentUIDefaults key for a ComponentUI subclasspublic boolean isEditable()
true if this report pane can be edited.
setEditable(boolean)public boolean isEditing()
true if this report pane is currently editing
its report contents.
true if this report pane is allowing the user to edit
a portion of the reportpublic boolean isFocusable()
true.
isFocusable in class java.awt.Componenttrue if this component is focusable; false otherwisepublic boolean isMouseOverEnabled()
true if mouse-over hints are enabled.
true if mouse-over hints are enabledsetMouseOverEnabled(boolean)
public void mouseOver(java.awt.Point point)
throws java.lang.NullPointerException
Note that this report pane does not care if the mouse cursor is actually at the specified point.
point - x and y coordinates for which to provide hints
java.lang.NullPointerException - if point is nullisMouseOverEnabled(),
stopMouseOver(),
ReportEditorKit.getMouseOverComponent(sos.reports.View)
protected boolean processKeyBinding(javax.swing.KeyStroke keyStroke,
java.awt.event.KeyEvent event,
int condition,
boolean pressed)
keyStroke as a result of
the KeyEvent.
processKeyBinding in class javax.swing.JComponentkeyStroke - the KeyStroke queriedevent - the KeyEventcondition - one of the following values:
JComponent.WHEN_FOCUSED,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
JComponent.WHEN_IN_FOCUSED_WINDOWpressed - true if the key is pressed
true if there was a binding to an action, and the action was enabledpublic void removeEditor()
public void removeNotify()
removeNotify in class javax.swing.JComponent
public void scrollElementToVisible(Element element)
throws java.lang.NullPointerException
element - element to make ensure visible
java.lang.NullPointerException - if element is null
public void setBounds(int x,
int y,
int width,
int height)
setBounds in class java.awt.Componentx - the new x-coordinate of this report paney - the new y-coordinate of this report panewidth - the new width of this report paneheight - the new height of thie report pane
public void setDragEnabled(boolean dragEnabled)
throws java.awt.HeadlessException
dragEnabled - true if dragging should be allowed
java.awt.HeadlessException - if dragEnabled is true and
GraphicsEnvironment.isHeadless returns truegetDragEnabled()public void setEditable(boolean editable)
editable - true if editing is allowed on this report paneisEditable()public void setEditorKit(ReportEditorKit editorKit)
editorKit - the object to control the rendering and editing of
the report
java.lang.NullPointerException - if editorKit is nullgetEditorKit()public void setEditorModel(ReportEditorModel editorModel)
editorModel - the new editor model
java.lang.NullPointerException - if editorModel is nullgetEditorModel()public void setElementTraversalPolicy(TraversalPolicy traversalPolicy)
traversalPolicy - the traversal policypublic void setMargin(java.awt.Insets margin)
margin - the padding between the border and reportgetMargin()public void setMouseOverEnabled(boolean enabled)
enabled - true if this component should provide mouse-over hintsisMouseOverEnabled(),
mouseOver(java.awt.Point)
public void setReport(Report report)
throws java.lang.NullPointerException
report - the report that this report pane should render and edit
java.lang.NullPointerException - if report is nullpublic void setSelectionBackground(java.awt.Color color)
color - color to paint the background of selected elementsgetSelectionBackground()public void setSelectionForeground(java.awt.Color color)
color - color to use in the foreground of selected elementsgetSelectionForeground()public void setSelectionModel(ReportSelectionModel selectionModel)
selectionModel - the selection model
java.lang.NullPointerException - if selectionModel is nullgetSelectionModel()public void setSelectionNeededForDrag(boolean selectionNeededForDrag)
false means the user can select and drag in one action.
selectionNeededForDrag - true if selection is needed in order to drag;
false if the user can select and drag in one actiongetSelectionNeededForDrag()public void setSurrendersFocusOnKeystroke(boolean surrendersFocusOnKeystroke)
surrendersFocusOnKeystroke - true if editors should get the focus
after a keystroke activates editinggetSurrendersFocusOnKeystroke()public void setTextHighlighter(TextHighlighter textHighlighter)
textHighlighter - the text highlightergetTextHighlighter()public void setUI(ReportPaneUI newUI)
newUI - the new UI delegatepublic boolean stopEditing()
false if the editing cannot be stoppedCellEditor.stopCellEditing()public void stopMouseOver()
mouseOver. To turn off mouse-over
hints permamently, use setMouseOverEnabled.
mouseOver(java.awt.Point),
setMouseOverEnabled(boolean)public void updateUI()
updateUI in class javax.swing.JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||