|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.rad.genui.UIResource<C>
javax.rad.genui.UIComponent<C>
javax.rad.genui.control.AbstractControllable<IEditor>
javax.rad.genui.control.UIEditor
public class UIEditor
Platform and technology independent Editor. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .
| Field Summary |
|---|
| Fields inherited from class javax.rad.genui.UIComponent |
|---|
bTranslate, lLastTranslationModified, parent, popupMenu |
| Fields inherited from class javax.rad.genui.UIResource |
|---|
uiResource |
| Fields inherited from interface javax.rad.ui.IAlignmentConstants |
|---|
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP |
| Fields inherited from interface javax.rad.model.ui.IControllable |
|---|
COMMAND_DELETE, COMMAND_DUPLICATE, COMMAND_EDIT, COMMAND_EXPORT, COMMAND_FIRST, COMMAND_INSERT, COMMAND_INSERT_SUB, COMMAND_LAST, COMMAND_NEXT, COMMAND_PREVIOUS, COMMAND_RESTORE, COMMAND_SEARCH |
| Constructor Summary | |
|---|---|
|
UIEditor()
Creates a new instance of UIEditor. |
|
UIEditor(IDataRow pDataRow,
java.lang.String pColumnName)
Creates a new instance of UIEditor. |
protected |
UIEditor(IEditor pEditor)
Creates a new instance of UIEditor with the given editor. |
| Method Summary | |
|---|---|
void |
cancelEditing()
Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook. |
protected java.lang.String |
createComponentName()
Creates a name for this UIComponent. |
void |
doEdit()
Starts editing. |
IDataBook |
getActiveDataBook()
Gets the controllable IDataBook for this IControllable. |
ICellEditor |
getCellEditor()
Gets the CellEditor that edits the given column in the given DataRow. |
ICellFormatter |
getCellFormatter()
Gets the ICellFormatter. |
java.lang.String |
getColumnName()
Returns the column name displayed by this control. |
IDataRow |
getDataRow()
Returns the DataRow displayed by this control. |
int |
getHorizontalAlignment()
Returns the alignment along the x axis. |
int |
getVerticalAlignment()
Returns the alignment along the y axis. |
boolean |
isBorderVisible()
Returns whether the the border of the text field is visible. |
boolean |
isSavingImmediate()
Tells whether the CellEditor should save immediate. |
void |
notifyRepaint()
The control need to check if the part is visible and then repaint the part. |
void |
saveEditing()
Informs the GUI control, that the last edit should be set into the IDataBook or IDataRow. |
void |
setBorderVisible(boolean pVisible)
Sets the border of the text field visible or invisible. |
void |
setCellEditor(ICellEditor pCellEditor)
Sets the CellEditor that edits the given column in the given DataRow. |
void |
setCellFormatter(ICellFormatter pCellFormatter)
Sets the ICellFormatter. |
void |
setCellFormatter(java.lang.Object pCellFormatter,
java.lang.String pMethodName)
Sets the cell formatter. |
void |
setColumnName(java.lang.String pColumnName)
Sets the column name displayed by this control. |
void |
setDataRow(IDataRow pDataRow)
Sets the DataRow displayed by this control. |
void |
setHorizontalAlignment(int pHorizontalAlignment)
Sets the horizontal alignment. |
void |
setSavingImmediate(boolean pSavingImmediate)
Sets whether the CellEditor should save immediate. |
void |
setVerticalAlignment(int pVerticalAlignment)
Sets the vertical alignment. |
void |
updateTranslation()
Notification for updating the translation. |
| Methods inherited from class javax.rad.genui.control.AbstractControllable |
|---|
addNotify, createCellFormatter, createNodeFormatter, doCommand, doDelete, doDuplicate, doExport, doFirst, doInsert, doInsertSub, doLast, doNext, doNotifyController, doPrevious, doRestore, doSearch, getController, isCommandEnabled, isDeleteEnabled, isDuplicateEnabled, isEditEnabled, isExportEnabled, isFirstEnabled, isInsertEnabled, isInsertSubEnabled, isLastEnabled, isNextEnabled, isPreviousEnabled, isRestoreEnabled, isSearchEnabled, removeNotify, setController |
| Methods inherited from class javax.rad.genui.UIResource |
|---|
eventResourceChanged, eventResourceChanged, fireResourceChanged, getObject, getObjectNames, getUIResource, hasResourceHandler, putObject, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.rad.ui.IResource |
|---|
getResource |
| Methods inherited from interface javax.rad.model.ui.ITranslatable |
|---|
getTranslation, isTranslationEnabled, setTranslation, setTranslationEnabled |
| Methods inherited from interface javax.rad.util.ITranslator |
|---|
translate |
| Constructor Detail |
|---|
public UIEditor()
UIEditor.
IEditorprotected UIEditor(IEditor pEditor)
UIEditor with the given editor.
pEditor - the editorIEditor
public UIEditor(IDataRow pDataRow,
java.lang.String pColumnName)
throws ModelException
UIEditor.
pDataRow - the IDataRow.pColumnName - the column name.
ModelException - if the editor can't be initialized.IEditor| Method Detail |
|---|
public IDataRow getDataRow()
getDataRow in interface IEditorControlIEditorControl.setDataRow(javax.rad.model.IDataRow)
public void setDataRow(IDataRow pDataRow)
throws ModelException
setDataRow in interface IEditorControlpDataRow - the DataRow
ModelException - if the column name is invalidIEditorControl.getDataRow(),
IEditorControl.setColumnName(String)public IDataBook getActiveDataBook()
IDataBook for this IControllable.
IEditorControl should return the set data row, if it is instanceof IDataBook or null otherwise.
ITableControl should return the set data book.
ITreeControl should return the data book of the current selected node.
The controller has to be informed, If the databook changes on a focused IControllable.
eg: ITreeControl node selection of a different databook.
Editor or table has the focus, and a different databook is set on editor or table.
getActiveDataBook in interface IControllableIDataBookpublic java.lang.String getColumnName()
getColumnName in interface IEditorControlIEditorControl.setColumnName(java.lang.String)
public void setColumnName(java.lang.String pColumnName)
throws ModelException
setColumnName in interface IEditorControlpColumnName - the column name.
ModelException - if the column name is invalidIEditorControl.getColumnName()public ICellEditor getCellEditor()
getCellEditor in interface IEditorControlgetCellEditor in interface IEditorIEditor.setCellEditor(javax.rad.model.ui.ICellEditor)
public void setCellEditor(ICellEditor pCellEditor)
throws ModelException
setCellEditor in interface IEditorControlsetCellEditor in interface IEditorpCellEditor - the CellEditor.
ModelException - if the cell editor can not be setIEditor.getCellEditor()public boolean isSavingImmediate()
isSavingImmediate in interface IEditorpublic void setSavingImmediate(boolean pSavingImmediate)
setSavingImmediate in interface IEditorpSavingImmediate - true, if the CellEditor should save immediate.public void notifyRepaint()
notifyRepaint in interface IControl
public void saveEditing()
throws ModelException
IDataBook or IDataRow.
saveEditing in interface IControlModelException - if the value can not be stored.public void cancelEditing()
DataBook.
cancelEditing in interface IControlpublic ICellFormatter getCellFormatter()
ICellFormatter.
The ICellFormatter will be called for every cell and can return a
style for that cell.
getCellFormatter in interface ICellFormatableICellFormatter.ICellFormatable.setCellFormatter(ICellFormatter)public void setCellFormatter(ICellFormatter pCellFormatter)
ICellFormatter.
The ICellFormatter will be called for every cell and can return a
style for that cell.
setCellFormatter in interface ICellFormatablepCellFormatter - the ICellFormatter.ICellFormatable.getCellFormatter()public void setBorderVisible(boolean pVisible)
setBorderVisible in interface IEditorpVisible - true to set the border visible or false to hide
the borderpublic boolean isBorderVisible()
isBorderVisible in interface IEditortrue if the border is visible, false if the border is invisiblepublic int getHorizontalAlignment()
getHorizontalAlignment in interface IAlignmentConstantspublic void setHorizontalAlignment(int pHorizontalAlignment)
setHorizontalAlignment in interface IAlignmentConstantspHorizontalAlignment - the new vertical alignmentpublic int getVerticalAlignment()
getVerticalAlignment in interface IAlignmentConstantspublic void setVerticalAlignment(int pVerticalAlignment)
setVerticalAlignment in interface IAlignmentConstantspVerticalAlignment - the new vertical alignment
public void setCellFormatter(java.lang.Object pCellFormatter,
java.lang.String pMethodName)
pCellFormatter - the cell formatter.pMethodName - the method name.public void updateTranslation()
UIComponent will be added to a displayable containment hierarchy,
when its containment hierarchy is made displayable or the translation table will
be changed.
updateTranslation in class UIComponent<IEditor>UIComponent.setTranslation(TranslationMap),
UIComponent.addNotify()protected java.lang.String createComponentName()
UIComponent.
The returned name needs to be unique in the current root/workscreen and
is ideally, but not necessarily, prefixed with the UIComponent.sRootName,
if there is any.
Overriding classes should be aware that this method will be called in
UIComponent.addNotify() and the returned name will only be assigned to the
UIComponent if there isn't already a name set. Also
UIComponent.stExistingNames can be used to find out if a name has already
been assigned, and UIComponent.sRootName to get the root name.
In rare cases UIComponent.stExistingNames and/or UIComponent.sRootName might
be null when this method is called.
createComponentName in class UIComponent<IEditor>UIComponent.UIComponent.getExistingNames(),
UIComponent.getRootName(),
UIComponent.incrementNameIfExists(String, Set, boolean)
public void doEdit()
throws ModelException
doEdit in class AbstractControllable<IEditor>ModelException - if an edit error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||