|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An object that controls the editing of a report element. It is essentially used
the same way TableCellEditor
is used with
javax.swing.JTable
; however, there are a few differences. First,
unlike TableCellEditor
, an ElementEditor
has the ability to position the editor
component in the report pane. To do this, it must use a JComponent
,
invoke setBounds
on the component, and ensure
that the client property POSITIONED
is
set to Boolean.TRUE
. If the component is not positioned,
the report pane will position it on top of the element being edited.
Second, an ElementEditor
can provide the report pane with an editing "hint," which appears
when the mouse is over the element in the report pane. This mouse-over component
is installed in the report pane and hence receives all events. An
ElementEditor
is not required to provide a mouse-over hint. If it
does, it may position the component,
as long as it sets the client property POSITIONED
to Boolean.TRUE
.
ElementRenderer
,
JReportPane.getEditor()
,
ReportEditorModel.getEditor(sos.reports.Element)
,
DefaultElementEditor
Field Summary | |
static java.lang.String |
POSITIONED
A property key used to indicate that an editor component has been positioned by the editor and should not be positioned by the report pane. |
Method Summary | |
java.awt.Component |
getElementEditorComponent(JReportPane reportPane,
Element element)
Returns the component that should be added to the client's component hierarchy in order to edit the specified element in the specified report pane. |
java.awt.Component |
getMouseOverComponent(JReportPane reportPane,
Element element)
Returns a component (or null , if none) that provides a
hint or shortcut to editing the specified element in the specified
report pane. |
Methods inherited from interface javax.swing.CellEditor |
addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing |
Field Detail |
public static final java.lang.String POSITIONED
Method Detail |
public java.awt.Component getMouseOverComponent(JReportPane reportPane, Element element)
null
, if none) that provides a
hint or shortcut to editing the specified element in the specified
report pane. This component is installed in the report pane
when the mouse is over the element.
reportPane
- report pane that is rendering element
element
- the element for which the mouse-over component is requested
element
java.lang.NullPointerException
- if reportPane
or element
is null
public java.awt.Component getElementEditorComponent(JReportPane reportPane, Element element)
reportPane
- report pane that is rendering element
element
- the element for which the editor component is requested
java.lang.NullPointerException
- if reportPane
or element
is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |